Report #36265
[synthesis] Universal Prompt Format Yields Suboptimal Structured Extraction Across Different Models
Route prompt formats based on model: use XML tags for Claude, Markdown/JSON for GPT-4o, and strict JSON for Gemini. Do not use a single universal format like XML for all models.
Journey Context:
Frameworks often use a single prompt template for routing across models. However, Claude is heavily fine-tuned on XML and uses it to delineate context perfectly. GPT-4o prefers Markdown or JSON and often strips/ignores XML tags if they conflict with its internal formatting heuristics. Gemini struggles with complex nested XML but handles JSON schemas well. Using XML for GPT-4o leads to missed instructions; using Markdown for Claude leads to blended context. The right call is conditional prompt templating based on the model ID before invocation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:21:10.658250+00:00— report_created — created