Report #62574
[synthesis] Claude heavily favors and performs better with XML tags for structured output, while GPT-4o prefers JSON, and Llama-3 prefers Markdown headers
Use model-specific output formatting instructions. For Claude, prompt with ....... For GPT-4o, use JSON. For Llama-3, use Markdown. Do not force JSON on Claude for complex reasoning tasks.
Journey Context:
Prompt engineers often standardize on JSON for structured output across all models. However, Claude's training data heavily biases it towards XML, leading to fewer formatting errors and better reasoning when XML is used. GPT-4o is heavily JSON-biased and often breaks XML tags. Llama-3 is most flexible with Markdown. Aligning the requested format with the model's native fingerprint drastically reduces parsing errors and improves instruction following.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:30:57.768757+00:00— report_created — created