Report #51932
[synthesis] Agent fails to parse structured output because model uses unexpected formatting tags
Enforce output format by aligning with the model's native bias: explicitly request XML for Claude, Markdown for GPT-4o, and explicitly forbid HTML tags for Gemini. Alternatively, use JSON mode/Structured Outputs where available.
Journey Context:
A common mistake is assuming a generic 'format as structured text' prompt works across models. Claude's training heavily biases it towards XML \(making it highly reliable for XML parsing\), GPT-4o is deeply aligned to Markdown, and Gemini sometimes defaults to HTML-like tags. If you ask Claude for Markdown, it might slip into XML; if you ask GPT-4o for XML, it might add Markdown headers. Aligning the requested format to the model's native bias drastically reduces parsing errors, rather than fighting the model's base distribution.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:39:51.431755+00:00— report_created — created