Home / Writing a request that works
Separating data from instructions
Mixing instructions and data in a single block of text creates confusion, whereas a clear boundary, an XML tag, a heading, a code block or a marking line, removes it.
A prompt that runs an instruction straight into a long pasted text, with nothing separating them, forces Claude to guess where the instruction stops and where the material to process begins. Anthropic's documentation recommends an explicit boundary: wrap each type of content, instructions, context, examples, variable data, in its own tag, for example <instructions>, <context> or <input>. A tag is a simple opening and closing marker, <name>...</name>, that isolates a block of text from the rest of the request. According to this documentation, this marking helps Claude parse a complex prompt unambiguously, particularly when that prompt mixes instructions, context, examples and variable data.
What a single block causes
Without a tag, a sentence from the pasted text can look like an instruction, and an instruction can get lost inside the pasted text. Meeting minutes often contain sentences in the imperative, send the report by Friday, chase the supplier. Placed right after a summarising instruction, these sentences risk being read as tasks to carry out rather than as elements of the minutes to summarise. The risk grows with the length of the pasted text: the longer the block, the more sentences it contains that happen to resemble instructions.
Setting a clear boundary
The recommended method wraps each block in its own tag. An instruction goes between <instructions> and </instructions>, the pasted text between <entree> and </entree>:
<instructions>
Résume ce compte rendu en trois phrases, sans jargon technique.
</instructions>
<entree>
Réunion du 12 mars. Présents : trois membres du bureau.
Point un, budget. Point deux, envoyer le rapport avant vendredi.
</entree>
A Markdown heading or an explicit marking line play the same part, as long as they trace a visible boundary that Claude can recognise as such. The exact marker matters less than its presence: what protects the request is that no block stays glued to another without a limit.
What the boundary does not replace
Delimiting a block does not remove the need to formulate a clear instruction inside its own tag. See formatting the output and speaking on Claude's behalf for the logical next step, once the boundary is set, also specify the format of the expected response. A tag left unclosed, or closed by mistake in the middle of the pasted text, recreates exactly the mix it was meant to avoid: before sending the request, check that every opened tag finds its closing match.
A pasted block of text with no boundary, then delimited
Résume ce compte rendu en trois phrases. Réunion du 12 mars, présents trois membres du bureau, point un budget, point deux envoyer le rapport avant vendredi.
<instructions> Résume ce compte rendu en trois phrases. </instructions> <entree> Réunion du 12 mars. Présents trois membres du bureau. Point un, budget. Point deux, envoyer le rapport avant vendredi. </entree>
A community coordinator places a sorting instruction followed by a list of one hundred members in a single request. She wraps the list between the <entree> and </entree> tags, keeping the instruction outside those tags. She sends the request to Claude, who returns a sorted list of one hundred names, all drawn from inside the tags.
Write, in one sentence, what this situation establishes, and in one sentence what it does not establish.
What this establishes: On this specific request, the boundary set around the list was enough to stop Claude treating the instruction sentence as a name to sort.
What this does not establish: This does not establish that the same boundary will suffice if the request contains several separate lists or if the instruction is placed after the block of text rather than before it.
The three most common miscalibrations
- Too broad This tag now guarantees that Claude will always correctly separate an instruction from a pasted text, whatever the structure of the request.
- Too narrow This result proves nothing at all, since the list contained only one type of element, members' names.
- Off target This result shows that the list of one hundred members was correctly updated before being pasted into the request.
- An instruction and a pasted text with no boundary leave Claude to guess where the instruction stops, especially when the pasted text contains sentences in the imperative.
- Wrapping each block, instruction, context, data, in its own tag reduces the risk that Claude confuses a sentence from the pasted text with an instruction to follow.
- The exact type of marker, XML tag, Markdown heading or marking line, matters less than the fact that a visible boundary exists between the blocks.
- A tag left open without its closing match recreates the very mix it was supposed to avoid.
Take a request where you pasted a long text right after an instruction. Wrap the instruction in a tag, for example <instructions> and </instructions>, wrap the pasted text in another tag, for example <entree> and </entree>, then send the request back to Claude.
Every datable claim in this lesson links here to the public text behind it. A source that does not open proves nothing.
- Prompting best practices consultée le 2026-09-02