A prompt holds instructions, a policy document and a customer email. How should you structure it?
Why C is the answer
Wrap each part in its own XML tags
XML tags help Claude parse complex prompts unambiguously, and they keep the email from being read as instructions.
In detail
- XML tags mark clearly where each part starts and ends.
- They help Claude parse a complex prompt without confusing the parts.
- They also keep the customer's email from being read as instructions.
- Refer to the tags in your instructions, such as "using the policy in the policy tags".
Use case
An illustrative scenario, not a real incident.
A support tool sends instructions, a policy and a customer email together. The email says "ignore the policy", and a blurred prompt can treat it as an instruction. In its own tags, it is clearly content.
See it in different ways
flowchart LR
A["Model output"] --> B{"Matches schema?"}
B -->|Yes| C{"Do the values make sense?"}
C -->|Yes| D["Accept"]
C -->|No| E["Review or retry"]mindmap
root(("Prompt"))
n1["instructions tag"]
n2["What to do"]
n3["policy tag"]
n4["Reference"]
n5["email tag"]
n6["Untrusted content"]Key point: XML tags keep data apart from instructions.
Why the other options are wrong
- A. Put the email first, because the most recent content gets the most attention
- Reordering alone does not separate instructions from content.
- B. Write the instructions in capitals so that they stand out from the documents
- Capitals add emphasis, but they do not mark what is data.
- D. Put all of it in one paragraph, so that the model reads everything in order
- One paragraph blurs the boundaries between instructions and data.

