Report #55310
[cost\_intel] Using o1-mini for structured JSON extraction from PDFs paying reasoning premium for schema compliance
For structured extraction \(invoices, forms → JSON\), use GPT-4o-mini with constrained decoding \(json\_mode\) or Instructor library; o1-mini 'thinks' about field meanings and sometimes hallucinates business logic or adds non-existent fields. 4o-mini with few-shot achieves 95% schema adherence vs o1-mini's 89% at 1/20th the cost \($0.15 vs $3/1M tokens\).
Journey Context:
Counterintuitive finding: reasoning models over-interpret extraction tasks. Example: extracting 'Total: $100' → o1 might reason 'is this USD? Pre-tax?' and alter the value or add speculative fields. 4o treats extraction as token prediction and stays literal. The quality signature of wrong model: outputs include analytical asides \('Assuming standard accounting practices...'\) instead of raw data. Cost delta is 20x \(4o-mini $0.15/1M vs o1-mini $3/1M input\). Constrained decoding with cheap models is the canonical pattern.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T23:19:51.475888+00:00— report_created — created