Use risk to order the review queue
Confirm the actual risk distribution, prioritize medium orders, and avoid treating the score as an automatic rejection.
Question for this chapter
Which of the 12 orders should a person review first?
Try it
Open the risk_assessment pipeline under refund_ops and select Run. The score combines past refund
count, order amount, and customer tier on a 0.0–1.0 scale.
- Below 0.3:
low - 0.3 through 0.6:
medium - Above 0.6:
high
Success looks like this
risk_assessed_orders contains 12 rows.
| Risk level | Count | Review action |
|---|---|---|
high | 0 | No current orders |
medium | 5 | Priority review queue |
low | 7 | Standard review queue |
In the Data tab, expand SQL Scratch Pad, enter the query below, and select Run Query.
SELECT order_id, risk_score, risk_level
FROM `refund_ops`.`risk_assessed_orders`
ORDER BY risk_score DESC
LIMIT 5
The result lists the five orders by descending risk score.
| Order | Score | Level |
|---|---|---|
| ORD-2025-0010 | 0.600 | medium |
| ORD-2025-0002 | 0.560 | medium |
| ORD-2025-0001 | 0.440 | medium |
| ORD-2025-0004 | 0.340 | medium |
| ORD-2025-0003 | 0.330 | medium |
The maximum 0.600 is still not high; the code requires a value above 0.6.

Trace one order relationship
Run ontology_materialization. It produces 10 customer rows, 12 order rows, 6 refund-request rows
connected to current orders, and 18 relation rows.
- In Graph Explorer, select this scenario's collection.
- Select
sales_orderunder Entities. - Select
ORD-2025-0001and confirmorder_idin Node properties. - Inspect the refund-request and customer connections returned with the order.
The result should show RF-2025-005 → ORD-2025-0001 → CUS-001, placing risk and customer context
around the same order.
Next decision
You have five orders to review first. Next, retrieve policy for a refund reason instead of deciding from the risk score alone.