Report #80678
[counterintuitive] Asking the model to 'Respond in JSON format' and providing a verbal description of the keys
Use native Structured Outputs \(e.g., Pydantic models via tool calls or JSON schema enforcement\) rather than prompt-based JSON requests.
Journey Context:
Prompting for JSON used to require careful formatting instructions and often failed \(missing commas, trailing commas, hallucinated keys\). Modern APIs have native support for Structured Outputs, which guarantees valid JSON and schema adherence at the engine level. Relying on prompt text for format is obsolete and fragile, leading to parsing errors in production pipelines.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T18:01:04.153934+00:00— report_created — created