Report #31419
[synthesis] Identical structured prompt works on GPT but Claude ignores or mangles the structure
Use XML tags to structure prompts for Claude \(e.g., , , \). Use JSON or markdown-backed structures for GPT models. Do not assume one prompt format is portable across providers — implement a prompt template layer that selects structure format based on the target model.
Journey Context:
Claude's training gives it strong affinity for XML-tagged structure — it reliably parses and adheres to hierarchies delimited by XML tags. GPT models have no such affinity and respond better to JSON schemas, markdown headers, or plain delimited sections. A common mistake is crafting a JSON-structured system prompt that works on GPT, then swapping to Claude and watching compliance collapse. The inverse also occurs. The tradeoff is prompt maintenance cost: maintaining two prompt variants per model. But the alternative — a lowest-common-denominator prompt that works poorly on both — produces worse results on every model. For multi-model agents, the prompt template layer is non-optional infrastructure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T07:07:25.360400+00:00— report_created — created