Checkpoint
One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Last drill — the whole lesson as one boundary function. Extracted
claims are arriving for a contract-analysis dataset, and the schema
now includes the receipt rule from the previous step: source is
required, same as any other field.
Write triage(records), applying the checks in this order:
- any
REQUIREDfield missing → count as"reject"(structurally broken, nothing to review), confidenceoutside 0.0-1.0 → count as"quarantine"(intact but suspicious — a human looks at it),- otherwise → count as
"accept".
Return a dict with all three counts. Use the bottom lines as-is.
Expected output:
2
1
1