Stop automation and hand off with a reason
Apply ordered rules and record both the human-review decision and its reason in decision_log.
Question for this chapter
When
confidenceis below the threshold, what should automation record before it stops?
Why this matters now
A generic “processing failed” result forces the next reviewer to investigate from the beginning. The decision and its reason must travel together so a person can continue from the same evidence.
Try it
Open decision_workflow in processed. claim_adjudicator tests each claim against ordered rules and
stops at the first matching decision.
Before selecting Run, predict CLM-2025-006. The first rule is:
When
confidence < 0.6, stop automated handling and recordESCALATED.
Select Run, then open decision_log.
Success looks like this
One row contains the decision and reason together:
claim_id | decision | reason |
|---|---|---|
CLM-2025-006 | ESCALATED | confidence 0.52 below threshold 0.6 |

Interpret the result
By amount, this is a standard claim above USD 1,000 and below USD 5,000. But it stops at the first quality rule, so later amount rules do not run. The order of rules is itself part of the policy.
ESCALATED is a responsible handoff, not a failure. The reviewer can read reason and compare the
amount and diagnosis against the source first. If they differ, correct the value; if they match,
investigate why the quality signal was low.
Deep dive — six rules and the full sample distribution
| Order | Question | Condition | Decision |
|---|---|---|---|
| 1 | Can the structured result be trusted? | confidence < 0.6 | ESCALATED |
| 2 | Is the required diagnosis present? | diagnosis_code is empty | ESCALATED |
| 3 | Is the diagnosis excluded? | diagnosis_code = EXCLUDED | REJECTED |
| 4 | Is it a low-value fast approval? | claim_amount <= 1000 | APPROVED |
| 5 | Is it a high-value manual review? | claim_amount >= 5000 | ESCALATED |
| 6 | Does no exception apply? | Otherwise | APPROVED |
Across all ten samples, the result is 4 APPROVED, 1 REJECTED, and 5 ESCALATED. This distribution
is not a quality score. It shows which route the current sample and rules assigned to each claim.
Next decision
The decision and reason are recorded, but another reviewer also needs claimant and policy context. Next, connect the scattered data through relationships and trace the same decision.