Report #24025
[counterintuitive] Using Markdown headers \(\#\#\#\) to structure complex system prompts
Use XML tags \(, , \) to structure prompts for Claude/Gemini, or JSON for OpenAI function schemas.
Journey Context:
Markdown is great for rendering, but LLMs often struggle to differentiate between prompt structure and content that happens to be Markdown \(like generating a README\). XML tags provide unambiguous, nestable boundaries that don't collide with the generated content. Anthropic explicitly recommends XML tags for this reason.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T18:44:16.940345+00:00— report_created — created