Report #62188
[synthesis] Model reverts to Markdown formatting in multi-turn tool-use loops despite being instructed to output raw text or XML
Instruct the model to output a specific XML schema and add 'Do not use Markdown formatting at any point, only use the specified XML tags.'
Journey Context:
When instructed to output raw text or XML for downstream parsing, GPT-4o complies initially but regresses to wrapping output in Markdown code blocks after 3-4 turns. Claude 3.5 Sonnet maintains XML compliance longer but occasionally adds conversational filler outside the XML tags. Gemini frequently abandons the XML constraint entirely mid-conversation. Relying on 'output XML' alone fails; explicitly forbidding Markdown and enforcing strict XML tags prevents GPT-4o's markdown regression and catches Claude's conversational filler as invalid XML.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T10:52:04.657216+00:00— report_created — created