Stop Prompt Engineering. Start Context Engineering.
Claude 5 changed the rules. How you structure context matters more than what you write. Here's the practical shift.
The blog post from Anthropic about "new rules of context engineering" for Claude 5 generation models names something most developers already feel: carefully crafted prompts matter less than how you organize the entire context window.
This isn't about writing better sentences. It's about information architecture for LLMs.
Why this matters
Prompt engineering assumed a small context window. You optimized every word. Now models handle 200K+ tokens and the bottleneck isn't the prompt — it's how you fill that space. Dump everything in one blob? The model gets confused. Structure it deliberately? Accuracy jumps.
How it works
Three principles separate context engineering from prompt engineering:
- Delimit with XML tags. Models treat content inside tags as discrete units. Wrap instructions, reference data, and examples in named tags and the model navigates your context like a structured document instead of a wall of text.
- Position strategically. Models pay more attention to the start and end of context. Put system rules at the top. Put the actual task at the bottom. Bury nothing critical in the middle.
- Separate instructions from data. Never interleave rules with the content the model should process. Instructions go in one block. Data goes in another. This alone fixes most hallucination issues.
Where this helps
Codebase Q&A: Instead of pasting files with "please review," wrap each file in tags, list review criteria at the top, and ask the specific question at the bottom.
RAG pipelines: Tag retrieved chunks by source and relevance. The model treats tagged context as citations rather than blending everything into one blob.
Multi-step agents: Cache the static parts — system rules, tool definitions — and only swap dynamic content between turns. Prompt caching makes this nearly free.
Watch out
More structure isn't always better. Over-tagging small contexts wastes tokens and confuses simpler models. Context engineering doesn't fix bad data — garbage in, well-organized garbage out. Test with your actual workload, not toy examples.
Try it yourself
Same information, completely different results:
# Before: unstructured
"Review this code for bugs and check it follows our
style guide (no var, prefer const, arrow callbacks)
and here is the file:
function calculateTotal(items) {
var sum = 0;
items.forEach(function(i) { sum += i.price });
return sum;
}"
# After: context-engineered
<instructions>
Review for bugs only. Ignore style for now.
</instructions>
<style_guide>
- Use const over var
- Arrow functions for callbacks
</style_guide>
<code>
function calculateTotal(items) {
var sum = 0;
items.forEach(function(i) { sum += i.price });
return sum;
}
</code>
Task: List bugs only. Ignore style issues.TL;DR
- What changed: Claude 5 generation models respond to context structure, not just prompt wording.
- Why it matters: Proper structuring measurably improves accuracy without changing the model or increasing token count.
- What to try today: Wrap your next LLM call's components in XML tags and move the task instruction to the very end.