Design it step by step
Define schema and missingness
Invented fields: name, event date, contact email. Permit null with clear reasons. Schema checks validate shape, not whether an email belongs to the intended person.
Produce candidates before writing
A smaller generator or rules can produce JSON. Save inputs, versions, spans, and parse errors. Validate schema, email syntax, and dates in code; failed attempts remain part of cost.
Verify field-level semantic support
The official cascade uses judgments about unsupported or misplaced values. Ask whether the email is explicitly the contact’s, not merely present. For an error-directed Noul question, high probability triggers escalation.
Bound escalation and recheck
Escalate errors, missing support, conflicts, or verifier failures. Revalidate stronger-model output and end with human review after bounded attempts. Keep accepted and unresolved fields distinct.
Measure misses and complete cost
Invented costs 0.01 initial + 0.005 verification + 25%×0.04 escalation = 0.025. These are arithmetic assumptions, not prices. Measure wrong candidates accepted, unnecessary escalations, final errors, and p95 latency.
Worked example · Invented by this site
| Observation | Judgment | Application action |
|---|---|---|
| Valid email, wrong person | Correct type, wrong role | Escalate that field |
| Date absent from source | Unsupported | Return null or re-extract and review |
| Supported fields, valid structure | Meets acceptance conditions | Save results with provenance |
A copyable design draft
Original examples. JSON illustrates request or input structure; Python calculates invented scores without an API call. Verify current interfaces and task policy before integrating.
# Offline arithmetic only; invented costs, not current prices.
initial, verification, escalation = 0.01, 0.005, 0.04
escalation_rate = 0.25
average = initial + verification + escalation_rate * escalation
print(round(average, 3)) # 0.025
# Add retries, other services, and review costs for a real study.Design a decisionCommon mistakes
- Equating schema success with meaning.
- Skipping verification after escalation.
- Omitting verifier and retry costs.
TRY / THINK / COMPARE
Think first, then compare
The name is correct but email wrong. Accept the record?
Show explanation
No. Keep field-level states, repair or escalate the email, then check business requirements.
Before handing it over
- Schema, null, and roles explicit.
- Question direction and provenance recorded.
- Escalation cap and review endpoint defined.
- All-stage cost and missed errors measured.
Common questions
Is a cascade always cheaper?
No. Verification cost and escalation rate may outweigh savings.
Is Jev generating extracted text here?
No. This design uses it to verify candidates from other components.
Sources and further reading
Inspired by official patterns and Datawhale practice topics. Explanations, examples, and exercises are independently written. These are teaching designs, not live API runs or benchmarks.