Report #11473
[agent\_craft] Agent parsing errors or ignoring structured data embedded in JSON within prompts
Use XML tags \(...\) instead of JSON objects for structuring data within natural language prompts, especially for Claude models
Journey Context:
While JSON is machine-readable, LLMs process tokens linearly and can struggle with the brace-heavy syntax of JSON when interleaved with instructions, often causing syntax errors in the output or ignoring constraints. XML tag syntax is more distinct from natural language and easier for models to match. Anthropic's prompt engineering documentation explicitly recommends XML tags for structuring prompts when using Claude, noting that it improves reliability over JSON for in-context data separation.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:22:40.570362+00:00— report_created — created