Skip to main content

Insight · July 3, 2026

What is
context engineering.

Prompt engineering was about the words. Context engineering is about everything the model can see when it answers.

01 · The name

The discipline was renamed in a single week.

In June 2025 two posts changed the vocabulary. On June 19, Tobi Lütke, the CEO of Shopify, wrote that he preferred context engineering over prompt engineering, calling it the art of providing all the context for the task to be plausibly solvable by the model. Six days later Andrej Karpathy amplified it, describing context engineering as the delicate art and science of filling the context window with just the right information for the next step.

The label stuck for a reason. Prompt engineering made people picture a clever sentence. Context engineering names the actual job, which is deciding what the model gets to work with. Within months it moved from a phrase on X to the way serious teams describe their work.

02 · What it is

The design of everything the model sees.

Start with the object. In September 2025 Anthropic's engineering team put it plainly: context is the set of tokens included when sampling from a model. Everything the model reads before it responds lives in one window. Context engineering is the work of deciding what fills that window.

That is more than an instruction. It is the whole environment. The system prompt that sets the rules. The tools the model can call. The documents you retrieve. The messages that came before. The running state of the task and the outputs of earlier steps. Context engineering is the practice of assembling those pieces so the model has exactly what it needs to take the next correct action, and nothing that gets in the way.

The question moves with it. Prompt engineering asked what should I say. Context engineering asks what configuration of context is most likely to produce the behavior I want. Same model, a wider lens.

The one line to keep

“Prompt engineering asks a better question. Context engineering builds the room the question is asked in.”

03 · Against prompt engineering

Prompt engineering did not die. It got demoted.

Context engineering is not a rival to prompt engineering. It is the larger thing that prompt engineering sits inside. The prompt occurs within the context window. Context engineering decides what else fills that window. One is a layer, the other is the system.

Karpathy made the same point about scale. A prompt is the short task description you give a model in daily use. Any serious application runs on the full context around it. The prompt still matters. It is now one component among many, and rarely the one that decides whether the whole thing works.

Teams feel this in production. In a Glean survey of IT and data leaders, 82 percent said prompt engineering alone was no longer sufficient and 95 percent called context engineering important for running agents at scale. The center of gravity moved.

04 · Why agents forced it

A full context window is not a free win.

For one question you could paste everything and hope. Agents broke that habit. They run for many steps, and every step adds tokens: tool results, files read, prior reasoning. The window fills on its own, and what fills it is not always what helps.

In July 2025 the team at Chroma published research they called context rot. They tested 18 frontier models and found every one degraded as the input grew, even on tasks the models handled easily with less. Models attend well to the start and end of a long input and poorly to the middle. Content that looks relevant but is not actively pulls the answer off course.

Anthropic frames the same limit as an attention budget. Context is a finite resource with diminishing returns, and the model spends attention on every token whether it earns its place or not. More context is not better context. The right context is.

05 · The four moves

Every technique is one of four operations.

The team at LangChain gave the practice a working vocabulary. Whatever the tool, context engineering reduces to four things you can do to the window.

01

Write

Put context somewhere outside the window so the agent can reach it later. Notes, scratchpads, memory files. The window stays clear and the knowledge does not vanish.

02

Select

Pull in only what the next step needs. Retrieval instead of paste everything. The one relevant document, the single tool, the specific example.

03

Compress

Keep the tokens that carry signal and drop the rest. Turn a long history into its result. Trade a thousand tokens of transcript for the two sentences that matter.

04

Isolate

Split unrelated work into separate contexts. A sub agent gets its own clean window for its own job and returns only the answer, not the mess it made getting there.

Every memory system, every retrieval pipeline, every sub agent architecture is some arrangement of these four. Learn to see them and the field stops looking like a pile of tools and starts looking like four decisions repeated well.

06 · What good looks like

The smallest context that still works.

Anthropic's guidance is close to one line: find the smallest set of high signal tokens that maximize the likelihood of the outcome you want. Keep the context informative, yet tight. Simple to say, hard to do, because the instinct always runs the other way.

The instinct is to add. One more example. One more instruction. The whole document, just in case. Each addition feels safe and each one costs something real: latency, money, and a share of the model's attention that now goes to noise instead of the task. Good context engineering is mostly subtraction. You earn reliability by removing, not by piling on.

It also means pulling context in at the moment it is needed rather than loading everything up front. Give the model a way to fetch the file, call the tool, or read the record when the step calls for it. The window stays lean, and the knowledge is still one action away.

07 · What it is not

Not a trick, and not a fix for a weak model.

Context engineering will not rescue a task the model cannot do. Give it perfect context and a job beyond its reach and it still fails, just with better inputs. It is not a substitute for checking whether the output is actually correct either. It shapes the odds. It does not verify the result.

It is also not a one time setup. As an agent runs, its context has to be managed the whole way through, written and selected and compressed at every step, or it rots. The discipline is ongoing because the constraint is ongoing.

And it is not going away as windows grow. Context windows keep getting larger, and models still do not use a full one well. A bigger window is more room to get this wrong, not permission to stop deciding what belongs in it. The constraint is permanent, so the discipline is too.

Closing

The prompt was never the hard part. The context was.

Pick one place where you hand a model a wall of text and hope. Decide what it actually needs to see, and cut the rest. That single edit, what goes in the window and what stays out, is the whole discipline. Everything else is a name for doing it well.

Term origins · Tobi Lütke and Andrej Karpathy, X, June 2025 · definition and attention budget framing · Anthropic Engineering, Effective context engineering for AI agents, September 2025 · context rot findings · Chroma Research, July 2025 · four operations · LangChain · adoption figures · Glean

Share this perspective

Industries We Serve

Aerospace & DefenseBiotechnologyMedical & HealthcareManufacturingFinancial ServicesConsumer ProductsEnterprise Software

New Business

Start a project

Headquarters

North America

© 2026 Bttr. All rights reserved.