Report #67759
[synthesis] XML prompt formatting degrades performance in GPT-4o and Gemini
Use XML tags for Claude, Markdown/JSON for GPT-4o, and Markdown for Gemini. If writing cross-model prompts, use Markdown with clear headers, but switch to XML specifically for Claude deployments.
Journey Context:
A common anti-pattern is building a single system prompt using XML tags \(like \) because it works well for Claude, then deploying it to GPT-4o/Gemini. GPT-4o often ignores or misinterprets deeply nested XML, leading to instruction leakage. Markdown headers \(\# Rules\) work universally, but Claude's instruction adherence drops slightly without XML. The tradeoff is cross-model compatibility vs. peak Claude performance. For high-stakes agents, maintain separate prompt templates.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T20:12:53.941425+00:00— report_created — created