Straight answer · AI
AIReviewed Nov 2026

What is context engineering?

Short answer

Context engineering is the discipline of deciding what information goes into a model's context window for a given task — what to retrieve, include, compress, or leave out — so the model has exactly what it needs and nothing that distracts it. It's the successor to prompt engineering: the leverage moved from wording the instruction to assembling the right context around it.

Why the lever moved

Early on, getting good output was largely about wording — prompt engineering, finding the phrasing that coaxed the model into the right behavior. As models got dramatically better at following plain instructions, that cleverness stopped being the bottleneck. What determines quality now is whether the model has the right information in front of it for the task.

That's context engineering: the deliberate assembly of what goes into the context window — which documents to retrieve, which examples to include, how much conversation history to keep, what tool results to feed back, and crucially, what to leave out. The question shifted from "how do I phrase this?" to "what does the model need to see to get this right?" It's the practical reason the prompt-engineering-as-a-job narrative faded and why building on a foundation model is increasingly about the context you can supply, not the prompt you can craft.

More context is not better context

The naïve move is to cram everything into a large window and let the model sort it out. It doesn't work well:

  • Dilution — irrelevant material drowns the signal the model actually needs.
  • Lost-in-the-middle — models reliably attend to the start and end of a long context and can miss what's buried in the center.
  • Cost and latency — every token you include is paid for on every call.

So the craft is curation: retrieve precisely, compress aggressively, order deliberately, and exclude ruthlessly. The uncheatable edge is often proprietary context — an employer's actual codebase, a company's own documents — which is exactly why the foundation-model era rewards whoever controls the context, not whoever has the cleverest prompt.

Where it shows up in product

The best AI products are quietly great at this. Cursor's advantage is less about which model it calls and more about feeding that model the right slice of your codebase at the right moment — the relevant files, the symbols in scope, the recent edits. The model is a commodity; the context pipeline is the product. Related reading: what is RAG and what is a context window.

The product takeaway

Stop optimizing the sentence and start engineering the window. The teams winning with AI treat context as a system to design — retrieval, compression, ordering, exclusion — because in 2026 the model is rarely the differentiator, and the information you put in front of it almost always is.

Seen in practice

(2)

Case studies where this shows up as a real decision, not a definition.

Related questions

(3)
How is context engineering different from prompt engineering?
Prompt engineering is about how you word the instruction; context engineering is about what information you put around it. As models got better at following instructions, clever wording mattered less and the quality of the supplied context — the right documents, examples, and state — mattered more. Context engineering is the broader discipline that prompt wording now sits inside.
Why not just put everything in the context window?
Because more context isn't better context. Irrelevant material dilutes the signal, models can lose information buried in the middle of a long window, and every extra token adds cost and latency. The skill is curation — including what's needed and deliberately excluding what isn't — not maximizing how much you stuff in.
Is RAG the same as context engineering?
RAG is one technique within it. Retrieval-augmented generation fetches relevant documents to put in context, which is a core context-engineering move, but the discipline also covers compression, summarization of prior turns, ordering, tool-result handling, and what state to carry across steps. RAG answers 'what to retrieve'; context engineering answers the whole question of what the window should contain.