Rimsha Bhardwaj Profile picture
Helping you master AI daily with step by step AI guides, & practical tools • AI Educator & Writer • DM for Collab

Mar 21, 16 tweets

Prompt engineering is dead.

Anthropic just published their internal playbook on what actually matters: XML-structured prompting.

Only 2% of users know this exists.

Here's what changed:

Anthropic's engineers built Claude to understand XML tags.

Not as code.

As cognitive containers.

Each tag tells Claude: "This is a separate thinking space."

It's like giving the model a filing system.

The difference is brutal.

Standard prompt: "Write a product description for running shoes considering comfort, durability, and style."

Claude gives you generic output.

Tagged prompt:

Write a product description
running shoes

- comfort
- durability
- style


Output quality jumps 40%.

Why tags work: Claude's context window processes nested information hierarchically.

When you use <role>, <task>, <constraints>, the model knows exactly what each section does.

It's like the difference between telling someone "make dinner" versus handing them a recipe card.

Multi-step reasoning gets insane.

Calculate ROI for cloud migration

Gather current infrastructure costs
Estimate cloud costs with 3 providers
Calculate 3-year TCO comparison

Executive summary + detailed breakdown

Claude follows this like a senior analyst.

The real power: chain-of-thought inside tags.


Think through this step-by-step:
1. First, consider X
2. Then evaluate Y
3. Finally, conclude Z


Anthropic's models were trained to use internal reasoning chains. Tags make them explicit.

You're essentially exposing Claude's thought process.

Content isolation works differently.

This is how to do it well
Avoid this approach
Now apply the good example

Claude treats each tag as a separate context space.

Prevents contamination between examples and actual output. Works better than "Do this, not that" prompts.

Error handling becomes trivial.


- Output must be under 200 words
- Include exactly 3 bullet points
- Cite 2 sources


Claude checks against these before generating.

Standard prompts? It ignores half your constraints. Tags make them enforceable.

The tag hierarchy matters.

Outer tags = high priority.
Nested tags = contextual details.


Write a technical blog post
Senior engineers
Authoritative but accessible


Claude weighs outer tags heavier in generation.

Most users don't know this. They flatten everything.

Complex documents become manageable.

[10,000 word research paper]

- Key findings
- Methodology critique
- Practical applications

Executive summary

Claude processes long context better with clear structural boundaries.

Reduces hallucination by 60% compared to "Summarize this paper."

Why Anthropic doesn't promote this:

1. It's technical. Scares casual users.
2. They want Claude to "feel natural" like conversation.
3. Most people won't read API docs anyway.

But power users? We're getting 3x better outputs using the same model everyone else has access to.

The gap is widening.

People who discover structured prompting get superhuman results.

Everyone else thinks "Claude is just another chatbot."

Same model. Completely different performance.

It's like having a Formula 1 car but only knowing how to drive in first gear.

Start simple:

Replace your next prompt with:

[What you want]
[Background info]
[Limitations]
[How to structure response]

Watch the quality jump.

Then experiment with nesting, priorities, and multi-step chains.

This works across all Claude models.

Haiku, Sonnet, Opus.

The bigger models handle more complex tag hierarchies, but even Haiku responds better to structure than conversational prompts.

You're speaking Claude's native language.

AI prompting isn't about being clever with words.

It's about understanding how the model was trained and structuring inputs to match that architecture.

Claude was built for structured reasoning.

Most users are still having unstructured conversations.

I hope you've found this thread helpful.

Don't forget to bookmark for later.

Follow me @heyrimsha for more.

If you enjoyed reading this post, please support it with like/repost of the post below 👇

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling