extraction-qa-invoice

Criteria

keytypeprimitivetier
valid_extraction_shapemust_havejson_schema@1
invoice_number_formatmust_haveregex_match@1
total_is_positivemust_havenumeric_threshold@1
matches_source_documentscoredllm_judge@12

extraction-qa-invoice

**Judges:** structured data extracted from an invoice — schema-valid, well-formed identifiers, positive totals (all deterministic), and field-level fidelity to the source document (judged against references). **Use when:** an LLM/OCR pipeline extracts financial documents and silent transcription errors cost real money (AP automation, expense ingestion, billing reconciliation).

curl -s -X POST $API/v1/rubrics -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d @templates/extraction-qa-invoice/rubric.json
# typed roles: the extraction JSON is the output; the source invoice text travels as context
curl -s -X POST $API/v1/verify -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"rubric_id":"<id>","submission":{"output":"{\"invoice_number\":\"INV-48213\",...}","context":[{"label":"doc-1","value":"INVOICE INV-48213 dated 2026-05-14. Total due USD 1,250.50."}]},"options":{"wait_ms":45000}}'

MCP: `verify_submit` with the extraction JSON as `output` and the source document text as `context` so `matches_source_document` has ground truth. The legacy `submission.inline` shape still works unchanged.