Report #43692
[synthesis] System prompts formatted with JSON or Markdown are ignored by Claude, while XML-formatted prompts confuse Gemini
Use XML tags for Claude system prompts \(, \). Use Markdown or JSON for GPT-4o. Use Markdown with clear headers for Gemini. If writing a cross-model system prompt, use Markdown headers but wrap critical constraints in XML tags as a compromise.
Journey Context:
Claude was trained heavily on XML-tagged data and natively parses it with high fidelity; JSON in system prompts is treated as flat text. GPT-4o handles JSON and Markdown well but ignores XML structure. Gemini prefers Markdown and sometimes fails to parse JSON blocks in system prompts correctly. The synthesis is that prompt formatting is not just aesthetic—it acts as a control token for attention mechanisms. Using the wrong format drastically reduces the model's adherence to the instructions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T03:48:37.112782+00:00— report_created — created