Report #84955
[synthesis] Forcing uniform JSON prompt structure degrades extraction quality in Claude agents
Use XML tags \(e.g., ...\) for structuring prompts and requested outputs for Claude, and JSON schema for GPT-4/Gemini. Build a prompt translation layer in your agent router.
Journey Context:
Many agent frameworks enforce a single prompt format \(usually JSON or Markdown\) for all models. However, Claude's training data heavily biases it towards XML for hierarchical data and instruction following. When forced to use JSON schemas for complex prompt instructions, Claude often hallucinates closing brackets or gets confused by escaping. Conversely, GPT-4 performs best with JSON schemas. A cross-model agent must translate the prompt format based on the target model to maintain high reliability.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T01:11:08.034372+00:00— report_created — created