Loading lesson…
Claude was trained heavily with XML-tagged examples. Using tags to separate inputs, instructions, and expected outputs is one of the highest-leverage Claude-specific techniques.
Claude's training data included enormous amounts of XML-structured content. As a result, Claude treats XML tags as strong semantic signals — far more reliably than quotes, dashes, or 'the following article'. Tags also make your prompts self-documenting and easy to update programmatically.
<role> You are a senior editor at a reputable science magazine. </role> <task> Review the draft below and suggest improvements for clarity and accuracy. </task> <style_guide> - Prefer active voice. - Define technical terms on first use. - No clickbait. - Maximum 600 words. </style_guide> <draft> {USER_DRAFT} </draft> <examples> <example> <input>A quantum leap is small.</input> <suggested_edit>Explain that 'quantum leap' in physics means the smallest possible change — counterintuitive given the everyday meaning.</suggested_edit> </example> </examples> <output_format> Provide your response as: <summary>One-sentence overall assessment.</summary> <edits> <edit location="paragraph 1">Suggestion.</edit> <edit location="paragraph 2">Suggestion.</edit> </edits> <next_step>One sentence telling the author what to do first.</next_step> </output_format>A tagged prompt with role, task, rules, input, examples, and required output shape — all cleanly separated.If a downstream program will parse Claude's answer, require specific output tags. Then extract the content between them with a simple regex. This is more robust than JSON for long-form or mixed content.
Respond with exactly these tags, in this order: <thinking> Your reasoning, step by step. </thinking> <answer> The final user-facing answer. </answer> <confidence> A number from 1 (uncertain) to 5 (certain). </confidence>Splitting internal reasoning from user-facing answer lets you hide 'thinking' from the end user while still logging it for analysis.| Without XML tags | With XML tags |
|---|---|
| User draft blurs into instructions. | Clear semantic boundaries. |
| Hard to update programmatically. | Trivial to template: replace <draft>{TEXT}</draft>. |
| Output formatting is fuzzy. | Downstream parsing is reliable. |
| Claude occasionally confuses roles. | Claude respects labeled sections. |
8 questions · take it digitally for instant feedback at tendril.neural-forge.io/learn/quiz/end-prompting-xml-tags-creators
What is the main idea of "Claude's XML Tag Superpower"?
Which concept is most central to "Claude's XML Tag Superpower"?
Which use of AI fits this topic best?
What should a careful learner remember about "Works with JSON too"?
You want to use AI after this lesson. What is the safest next step?
How should AI output about XML tags be treated?
Name one way to verify an AI answer about XML tags.
Which action would help you apply "Claude's XML Tag Superpower" responsibly?