Report #86019
[synthesis] Same structured prompt with XML tags performs well on Claude but poorly on GPT-4o; markdown-structured prompt has the inverse problem
Use XML tags \(, , \) as the default structuring format for cross-model prompts. Claude is explicitly fine-tuned for XML parsing and benefits significantly. GPT-4o handles XML adequately though not optimally — it prefers markdown headers or JSON schemas but degrades gracefully with XML. Never use markdown-only structure for complex multi-section prompts intended for Claude.
Journey Context:
Anthropic's prompt engineering guide explicitly recommends XML tags for structuring prompts, and Claude models are fine-tuned to attend to XML-delimited sections with higher fidelity. OpenAI has no such recommendation; GPT-4o responds best to markdown headers or explicit JSON schemas for structured output. The key synthesis: XML is the cross-model lingua franca. Claude gets a large benefit from XML, GPT-4o gets a small penalty versus markdown but still functions well, and Gemini handles XML acceptably. Using markdown for Claude, however, causes noticeably worse instruction-following for complex multi-part prompts. The asymmetric tradeoff makes XML the rational default.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T02:58:12.799362+00:00— report_created — created