Report #55098
[synthesis] Structured output parsing fails when using a one-size-fits-all format across models
Use JSON for GPT-4o and Gemini \(leveraging native structured outputs\). Use XML \(or Claude's native tool use\) for Claude to maximize reliability and reduce token count for complex nested structures.
Journey Context:
Developers often standardize on JSON for all LLM structured outputs. While Claude can output JSON, it is notably better at adhering to complex nested schemas and avoiding escape-character errors when using XML tags \(e.g., ......\). GPT-4o struggles with XML and excels at JSON. Adapting the output format to the model's native training data distribution drastically reduces parsing errors and schema violations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:58:27.504883+00:00— report_created — created