Context Engineering
Deciding what goes in the window, in what order, at all.
The broader discipline of assembling the model’s context: which documents, tool results and history are present, how they are formatted, ordered and trimmed. Prompt engineering is the narrower craft of the instruction itself.
As agents grew more capable, this became the higher-leverage activity. Most quality gains now come from giving the model the right information in the right shape, not from cleverer instructions.
The shift in emphasis is real and worth internalising: as models got better at following instructions, instruction craft stopped being the bottleneck and context assembly became it. Most quality gains now come from what the model can see and how it is arranged, not from how cleverly it is asked.
The plateau that was never about the prompt
A team rewrites instructions for the third week running with no improvement.
Print the assembled request. The problem is usually structural: eleven retrieved chunks of which two matter, three stale tool results, and the actual question at the bottom of four thousand tokens. Fixing the assembly beats rewriting the instruction.
Just in time instead of just in case
An agent needs occasional access to a large reference document.
Keep a pointer and a one-line description in context; let it fetch the section when the task needs it. Preloading everything "just in case" spends the attention budget on the ninety percent of the task that did not need it.
- blogEffective context engineering for AI agents ↗
Defines context engineering as curating everything supplied at inference, names context rot, and covers just-in-time retrieval, compaction and keeping the window high-signal.
- docsContext windows ↗
What actually consumes the window — input, tools, thinking and output — plus context rot and compaction. Authoritative for this product, not for models generally.
- paperLost in the middle: how language models use long contexts ↗
Measured U-shaped performance: relevant information in the middle of a long context is used less reliably than at the beginning or end. Order your context deliberately.
Context
Everything the model can currently see.
Prompt Engineering
The craft of writing instructions a model reliably follows.
Progressive Disclosure
Reveal detail only when it becomes relevant.
RAG · Retrieval-Augmented Generation
Look things up, then put what you found in the prompt.
Context Rot
A long session slowly getting worse.