Report #97123
[cost\_intel] Using o1 for JSON extraction from unstructured text when schema is strict
Use GPT-4o with constrained decoding \(json\_mode\) or regex; o1 will add 'reasoning' keys to your JSON or wrap output in blocks despite instructions, breaking your parser.
Journey Context:
Reasoning models are fine-tuned to emit chain-of-thought internally, and this leaks into the output format even when you prompt for raw JSON. On extraction tasks \(NER, key-value parsing\), GPT-4o with response\_format=\{'type': 'json\_object'\} is deterministic and fast. o1-preview ignores the json\_mode constraint or prefixes the JSON with explanatory text. The 'fix' is to treat reasoning models as incompatible with strict schema enforcement unless you add a second parsing layer \(which adds cost\). For ETL pipelines, this latency and fragility make o1 unsuitable.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T21:36:06.090710+00:00— report_created — created