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. |
15 questions · take it digitally for instant feedback at tendril.neural-forge.io/learn/quiz/end-prompting-xml-tags-creators
What is the core idea behind "Claude's XML Tag Superpower"?
Which term best describes a foundational idea in "Claude's XML Tag Superpower"?
A learner studying Claude's XML Tag Superpower would need to understand which concept?
Which of these is directly relevant to Claude's XML Tag Superpower?
Which of the following is a key point about Claude's XML Tag Superpower?
Which of these does NOT belong in a discussion of Claude's XML Tag Superpower?
What is the key insight about "Works with JSON too" in the context of Claude's XML Tag Superpower?
What is the recommended tip about "Practitioner tip" in the context of Claude's XML Tag Superpower?
Which statement accurately describes an aspect of Claude's XML Tag Superpower?
What does working with Claude's XML Tag Superpower typically involve?
Which best describes the scope of "Claude's XML Tag Superpower"?
Which section heading best belongs in a lesson about Claude's XML Tag Superpower?
Which section heading best belongs in a lesson about Claude's XML Tag Superpower?
Which section heading best belongs in a lesson about Claude's XML Tag Superpower?
Which section heading best belongs in a lesson about Claude's XML Tag Superpower?