promptdojo_

Dataset schema validation — reject, quarantine, and the receipt rule — step 8 of 8

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 REQUIRED field missing → count as "reject" (structurally broken, nothing to review),
  • confidence outside 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

full-screen editor opens — close anytime to keep reading.