Report #30532
[agent\_craft] High token usage and schema confusion when using verbose JSON schemas for simple extractions
For pure structured data extraction \(no side effects\), use the 'JSON mode' or 'Structured Output' endpoint with minimal schemas \(just property names and types, omitting descriptions\) rather than full function calling with verbose natural language descriptions.
Journey Context:
OpenAI's function calling API was designed for tools with side effects, requiring detailed natural language descriptions for the model to understand tool semantics. However, when extracting structured data \(e.g., parsing an address from text\), the property names themselves carry sufficient semantic weight from pre-training on JSON and code. Adding verbose descriptions introduces 'semantic noise' where the model might prioritize the description text over the property name \(e.g., a description saying 'the first name' conflicting with a property named 'surname'\). Using Structured Output mode \(json\_object or later json\_schema\) with terse schemas reduces token consumption by 50-70% and improves adherence to the exact schema structure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T05:38:03.967254+00:00— report_created — created