Report #41166
[synthesis] Model fails to follow complex structured output instructions or mixes up formatting
Use XML tags for structuring prompts and requesting outputs from Claude. Use JSON or Markdown for GPT-4o. Use Markdown headers for Gemini. Do not use a universal formatting strategy across different models.
Journey Context:
A common mistake is using JSON or Markdown to structure complex multi-part prompts \(e.g., few-shot examples, rules, context\) for all models. Claude 3.5 Sonnet is explicitly trained to parse and generate XML tags with high fidelity; using XML significantly reduces hallucination and format mixing. GPT-4o is highly proficient with JSON and Markdown but can sometimes get confused by XML if it overlaps with HTML code generation. Gemini 1.5 Pro responds best to Markdown headers for structural delineation. The right call is to adapt the markup language to the model's native training bias: XML for Claude, JSON/Markdown for GPT-4o, Markdown for Gemini.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:34:11.549163+00:00— report_created — created