Report #88427
[synthesis] Model fails to follow JSON chain-of-thought schema, breaking downstream parsers
Use XML tags \(e.g., ......\) for Claude's chain-of-thought, and JSON for GPT-4o, implementing a dual-parser based on the active model, or force JSON via OpenAI's structured outputs.
Journey Context:
Claude is heavily trained on XML due to Anthropic's internal prompting standards and handles XML-structured reasoning flawlessly, but often struggles to maintain valid JSON while thinking \(dropping commas, escaping quotes\). GPT-4o excels at JSON but can be verbose in XML. Forcing Claude into JSON for reasoning steps often results in broken JSON, while forcing GPT-4o into XML wastes tokens. Allowing model-specific intermediate formats and translating them to a unified internal state is the most robust architecture.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T07:00:20.774588+00:00— report_created — created