Context engineering vs prompt engineering: the prompt is one part of what the model sees
Prompt engineering is the craft of wording instructions to a model, while context engineering is the wider job of deciding everything the model sees at each step, including instructions, tools, examples, history and retrieved data, so an agent stays accurate across a long task.
Checked
Prompt engineering grew up around single requests: one prompt, one answer. Agents run for many steps, and at each step the model reads a context that has grown with tool results, history and retrieved documents. The wording of the instructions is a small share of that.
Anthropic describes context engineering as the successor to prompt engineering. Google frames context as a compiled view built from a richer stored state. Both treat what the model sees as a budget to manage, not a box to fill.
Why context became the problem
Anthropic describes a finite attention budget: every token in the window spends some of it, and recall degrades as context grows, which it calls context rot. Chroma's Context Rot study tested 18 models and found that performance degrades as input length grows.
For an agent, that means more context is not automatically better. A run that keeps every tool result in the window gets slower, costlier and less accurate as it goes.
The core moves
Just-in-time retrieval
Keep lightweight references such as file paths, queries and links, and load the content only when needed (Anthropic).
Compaction and notes
Summarise older history, and have the agent write structured notes outside the window that it can re-read later (Anthropic).
Separate storage from the working view
Keep sessions, memory and large objects in storage, and build the per-call context from them with explicit, ordered steps (Google).
Scope each subagent
Give each subagent the minimum context it needs and have it return a condensed result (Anthropic, Google).
A stable prefix
Keep the start of the context stable so it can be cached (Google).
Where prompt engineering still matters
Instructions still need to be written well. Anthropic advises system prompts at the right altitude, between brittle if-else rules and vague guidance, and treating tool descriptions as prompts in their own right, tested and refined with evals. Prompt engineering became one part of context engineering rather than disappearing.
How Motiontic applies it
Motiontic's engineers treat context as part of the harness: what loads up front, what loads on demand, what is compacted and what is cached. Each change is measured against an eval set from the client's real tasks, on accuracy, tokens per task and latency, so context decisions are made on numbers.
Prompt engineering compared with context engineering
| Prompt engineering | Context engineering | |
|---|---|---|
| Scope | The instructions | Instructions, tools, examples, history and retrieved data |
| Unit of work | One prompt | Every step of a multi-step run |
| Main failure | Ambiguous or brittle instructions | Context rot, missing facts or bloated windows |
| Techniques | Wording, examples, output formats | Just-in-time retrieval, compaction, notes, scoped subagents, caching |
| Where it lives | A prompt file | The agent harness |
| How it is measured | Output quality on sample prompts | Task success, tokens per task and latency on evals |
Common questions
What is the difference between context engineering and prompt engineering?
Prompt engineering is about wording the instructions. Context engineering decides everything the model sees at each step of a task, including tools, history and retrieved data. Anthropic describes context engineering as the successor to prompt engineering.
Is prompt engineering obsolete?
No. Well-written instructions and tool descriptions still matter. They are now one part of context engineering, which also covers what data is loaded, when, and how history is compacted.
What is context rot?
Context rot is the drop in a model's recall and accuracy as its context window fills. Chroma's study of 18 models found performance degrades as input length grows, which is why agents load context selectively.
Does a larger context window remove the need for context engineering?
No. A larger window holds more, but reliability still drops as input grows, and every token adds cost and latency. Context engineering decides what belongs in the window at each step.
How is context engineering measured?
Against an eval set of real tasks, tracking task success, tokens per task and latency. A context change that saves tokens but lowers task success is a regression.
Related
Context engineering
Curating everything in the model's view, not just the wording of the prompt.
Context rot
Why agents get worse the longer they run, and what keeps context clean.
RAG vs Agentic Search
One retrieval before the answer, compared with an agent that searches as it works.
Skills vs MCP
Connectivity to systems, compared with packaged expertise the agent loads on demand.
AI agent development
Agents that do real work for users, with the evals, traces and guardrails to keep them in production.
Running agents that have to hold up?
Describe the agent, the systems it touches and what it must never get wrong. The first call is with a lab engineer, who will say plainly whether it is ready for production, and whether Motiontic is the right team.