Report #97835
[agent\_craft] Complex prompts with mixed context get misinterpreted
Wrap each semantic component in explicit XML tags \(, , , \) with consistent names, and nest hierarchical content. Request tagged output when you need to parse sections separately.
Journey Context:
Plain text or markdown separators blur the boundary between instructions and data, causing the model to follow an example as if it were a command or to ignore a constraint buried in context. Anthropic's prompt library explicitly recommends XML tags as the default structure for complex prompts because they reduce ambiguity and make the prompt easier to maintain. The cost is slightly more token overhead and the need to escape literal XML in user content. For agents that parse model output, asking for tagged output like ...... is often more robust than regex.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-26T04:47:05.486148+00:00— report_created — created