Claude is trained to recognise XML-style tags like <context>, <instructions>, <examples>, and <input>. When a prompt mixes background context, formatting instructions, worked examples, and the actual thing to process into one wall of unlabeled text, Claude can lose track of which part is which — most commonly, it can mistake a worked example for the actual input it's supposed to act on.
This becomes more important, not less, as task-execution prompts get longer and more composite: a request that decomposes into background, rules, a couple of examples, and a live query is exactly the shape where structure earns its keep.
A Concrete Failure Mode
Imagine a prompt that has background context, formatting rules, two worked examples, and the real customer message, all as unlabeled paragraphs in sequence. Claude may respond to the second worked example as if it were the real customer's message, because nothing in the prompt marks the boundary between "here's an example of what to do" and "here's the actual task."
The fix is to wrap each distinct part in its own tag:
<context>
You're responding to messages in the #support channel.
</context>
<examples>
<example>...</example>
<example>...</example>
</examples>
<input>
Hi, my order #4432 hasn't shipped yet.
</input>Now there's no ambiguity: anything inside <input> is the live request, and anything inside <examples> is reference material, not something to respond to directly.
Tags Are Free-Form, Not a Fixed Set
There's no required list of tag names — <context>, <instructions>, <examples>, and <input> are conventions, not a strict schema. Use whatever tag names make the structure of your specific prompt obvious: <background>, <constraints>, <document>, <question> all work fine. The value comes from consistent, unambiguous separation, not from matching an exact vocabulary.
Key Concept
Tagging each distinct part of a multi-part prompt — context, instructions, examples, input — is Anthropic's recommended way to structure longer prompts. It removes ambiguity about where one section ends and the next begins.
Common Exam Distractor
A prompt that mixes context, instructions, and a variable user query as unlabeled paragraphs, where Claude sometimes treats an example as real input, points to one fix: wrap each part in its own XML tag. Don't be pulled toward answers about rewording the instructions themselves — the problem is structural, not about word choice.