The short version
When a prompt combines instructions, background, examples, and source material, label those parts with consistent XML tags. The tags give each block one job and reduce the chance that Claude mistakes source text for an instruction.
Why structure changes the result
A simple prompt often needs no special syntax. Complexity appears when several kinds of information share the same message. A model must then infer where the task ends, where supporting context begins, and which text should be analyzed rather than followed.
Descriptive tags make those boundaries explicit. They are especially useful for reusable prompts where the input changes from run to run.
A minimal pattern
```xml
<context>
The reader is preparing for a weekly delivery meeting.
</context>
<instructions>
Identify material risks, decisions needed, and actions with an owner.
</instructions>
<input>
The current project updates go here.
</input>
`
The names are intentionally ordinary. Good tag names explain the role of their contents without requiring a separate legend.
When to add examples
If format or judgment boundaries matter, place representative demonstrations inside an examples container. Keep them separate from the new input. This lets Claude learn the pattern without confusing a demonstration with the material it must process now.
Nested structure
Use nesting only when the information has a real hierarchy. A documents container may hold several document blocks, and each document may contain a source label and its text. Avoid adding layers merely to make a prompt appear technical.
Weak and improved designs
The weak design mixes the meeting purpose, review rules, length preference, and raw update in one paragraph. It may still work, but Claude must reconstruct the boundaries.
The improved design separates the reason for the work, the required operation, and the changing input. This makes the prompt easier to inspect, reuse, and test.
Practical checklist
- Use tags when multiple content types are present.
- Choose descriptive names and use them consistently.
- Put variable material in a dedicated input container.
- Keep demonstrations separate from current input.
- Nest only when the source naturally has levels.
- Test the structure with several different inputs.
Try it
Take a prompt that mixes audience, instructions, and raw material. Rewrite it with only three containers: context, instructions, and input. Then remove any tag that does not make a boundary clearer.