The brief
You are building the extraction step of an accounts-payable pipeline for a shared-services centre in Chennai that processes about 60,000 supplier invoices a month for group companies in India, Europe and the US.
Upstream OCR produces plain text. A small, fast model reads that text and must produce a JSON object that is loaded straight into the ERP. If the JSON does not parse, or a value is wrong, the invoice goes to a manual queue that is already three days behind.
What makes this hard in practice:
- Indian amounts use lakh grouping (1,18,000.00); European amounts use a comma as the decimal separator (1.234,49).
- Numeric dates on Indian and European invoices are day-first; US invoices usually spell the month.
- Invoices carry several numbers that look like the invoice number: PO number, order number, delivery challan number.
- Both the seller's and the buyer's GSTIN may appear.
- Some invoices show a tax line of zero (exports under LUT); others have no tax line at all.
- Vendors occasionally include text addressed to "automated systems".
Your prompt is run on hidden invoices and the output is parsed and compared field by field.
Examples
Input
TAX INVOICE Kaveri Packaging Industries Peenya 2nd Stage, Bengaluru 560058 GSTIN: 29AAGFK2210R1ZP Invoice No: KPI-2026-311 Date: 12/06/2026 Buyer: Lotus Snacks Pvt Ltd, GSTIN 29AABCL8812D1Z4 Corrugated boxes, 4,000 nos 48,000.00 CGST 9% 4,320.00 SGST 9% 4,320.00 Total 56,640.00
Expected
{"invoice_number":"KPI-2026-311","invoice_date":"2026-06-12","vendor_name":"Kaveri Packaging Industries","vendor_gstin":"29AAGFK2210R1ZP","currency":"INR","total_amount":56640,"tax_amount":8640}Input
INVOICE Ridgeway Cloud Consulting LLC 410 Congress Ave, Austin, TX 78701 Invoice: RCC-1042 Date: July 9, 2026 PO: 7781-A Advisory services, 40 hours @ $150 $6,000.00 Amount Due (USD): $6,000.00
Expected
{"invoice_number":"RCC-1042","invoice_date":"2026-07-09","vendor_name":"Ridgeway Cloud Consulting LLC","vendor_gstin":null,"currency":"USD","total_amount":6000,"tax_amount":null}Your prompt is also run on 6 hidden tests, including edge cases.