Context engineering
Deciding what a model sees on each call, and what it must not see, so the right answer is reachable at all.
Category
How an agentic system works
Related terms
Context engineering is the discipline of deciding what a model sees on each call. Not the instruction — the material. Which records, which results from earlier steps, which policy text, in what order, and, just as importantly, what is left out.
Why it decides outcomes
A model cannot use what it was not given, and it degrades on what it was given too much of. Long contexts are not neutral: relevant material placed in the middle of a large window is used less reliably than the same material placed at either end. A system that retrieves forty documents and passes all forty often performs worse than one that passes the right four.
What the work involves
Deciding the context budget per step and staying inside it. Choosing what earlier state is worth carrying forward and what should be summarized or dropped. Ordering material so the load-bearing evidence is not buried. Separating instruction from data so that content inside a retrieved document cannot be read as a command. Deciding what a step is not allowed to see, which is a security control as much as a quality one.
Where it goes wrong
The common failures are recognizable: everything gets passed forward until the window fills and quality quietly falls; context accumulates across a long run until early errors are indistinguishable from established fact; and untrusted document content sits in the same channel as system instructions.
How it is verified
Per-step evaluation, with the context budget as an explicit variable. A step whose accuracy does not fall when material is removed was carrying material it did not need — and paying for it on every call.
Often confused with
How it differs from similar terms.
| context engineering | Compared with | What's different |
|---|---|---|
| Context engineering | Prompt engineering | Prompt engineering writes the instruction. Context engineering decides what surrounds it — which records, which prior steps, which tool results, in what order, and what is deliberately withheld. |
| Context engineering | Retrieval | Retrieval fetches candidates. Context engineering decides how many survive into the call, how they are ordered, and what gets dropped when the budget runs out. |
Want these terms worked through on one of your own decisions? Start with a Decision Blueprint