promptdojo_

Numbers with receipts — every figure in the ops report traces to the export or it doesn't ship — step 7 of 8

Write verify_report(claims, export) — the incoming inspection for an AI-drafted report. Recompute the four metrics from the export:

  • orders_shipped — row count
  • avg_days — mean of days
  • late_orders — count of rows with days > 5
  • damage_rate_pct — percent of rows with damaged truthy (100 * count / rows)

Then for each (name, claimed) pair in order, compare with tolerance 0.05:

  • within tolerance → {name}: VERIFIED ({claimed})
  • otherwise → {name}: MISMATCH — report {claimed}, export {actual}

Expected output:

orders_shipped: VERIFIED (5)
avg_days: MISMATCH — report 4.2, export 6.0
late_orders: VERIFIED (2)
damage_rate_pct: VERIFIED (20.0)

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