Use XML tags and positive wording to make Claude follow instructions
Claude can miss “do not” rules or drift away from a required output format. A more reliable setup is to wrap important parts of the prompt in XML tags and rewrite negative rules as positive instructions. Instead of mainly listing what to avoid, the prompt should clearly state the exact behavior and format wanted.
This uses the fact that LLMs can handle structured information more consistently. The goal is fewer broken formats, fewer missed , and fewer rounds of fixing the same answer.
Key points
- The targets Claude missing or ignoring required output formats.
- Important prompt sections are separated with XML tags.
- Negative rules are rewritten as positive instructions that say what the model should do.
- Better instruction-following can reduce retries, which can lower token use and cost.