A language model does not receive a question in isolation. It receives the question alongside a system prompt, any retrieved documents, prior conversation turns, and tool descriptions, all packed into the context window together. Prompt engineering is the craft of writing the question well. Context engineering is the discipline of designing what goes alongside it.
Prompt engineering: the instruction itself
Prompt engineering is the practice of crafting the instruction a model receives. The work happens at the level of the message: how to phrase a request, whether to include worked examples, how to structure a multi-part question, and what constraints or format guidance to attach.
Early language model research made clear how much wording matters. Brown et al. showed in 2020 that LLMs could learn tasks from a handful of demonstrations placed directly in the prompt, without any change to the model’s weights (arXiv:2005.14165). Two years later, Wei et al. demonstrated that adding worked examples of step-by-step reasoning to a prompt moved state-of-the-art accuracy on arithmetic benchmarks significantly, again without modifying the model (arXiv:2201.11903). Both results showed the same thing: the instruction a model sees is not a passive channel. How it is written shapes what comes back.
Context engineering: the full information environment
Context engineering shifts attention from the instruction to the entire sequence of content loaded into the context window before the model generates a response. That sequence typically includes:
- System prompts: standing instructions, persona, and output format requirements
- Retrieved documents: knowledge-base chunks or search results surfaced by a retrieval layer
- Tool and function schemas: descriptions of external tools the model can call, and their parameters
- Conversation history: prior turns in an ongoing exchange
- Memory: facts or summaries injected from earlier tasks or sessions
An LLM sees all of this as one undifferentiated sequence of tokens. None of it arrives automatically. Each element represents a decision about what belongs in the window and in what form.
A 2026 observational study of 200 interactions across four AI tools found that incomplete context correlated with 72 percent of iteration cycles. Introducing structured context assembly reduced average iterations from 3.8 to 2.0 per task (arXiv:2604.04258).
How they relate: one contains the other
The prompt is one item in the context window. Context engineering determines what else goes in there and how it is organised. Prompt engineering determines how that one item is written.
This makes them nested concerns, not competing schools. A well-designed context that holds a poorly worded instruction still produces poor output. A precise instruction surrounded by irrelevant retrieved documents, stale conversation history, underspecified tool schemas, or missing memory context will also fail, in ways that better phrasing cannot fix.
How they compare
| Axis | Prompt engineering | Context engineering |
|---|---|---|
| Scope | The wording of the instruction | Everything in the context window |
| What it optimises | The phrasing and specificity of the request | Relevance and completeness of the surrounding information |
| Who shapes it | Anyone composing a request | Builders of the surrounding system |
| Typical failure | Ambiguous or underspecified instruction | Missing retrieved content or stale conversation history |
| Critical in | Every interaction | Scales with context complexity; most critical in agentic systems |
Where the distinction sharpens
For single-turn queries, the two concerns largely overlap. A user writing the whole prompt is doing both at once: deciding what to ask and deciding what supporting information to include.
The distinction becomes load-bearing in agentic systems: pipelines where a model runs multiple steps and calls external tools over automatically retrieved information. At that scale, the instruction is a small fraction of the total context window. What fills the rest, and whether it is the right information in the right order, accounts for more of the output quality than any rephrasing of the question.
This is why context engineering emerged as a named discipline alongside the rise of production agentic workflows. Prompt engineering did not become less relevant; the scope of what needed to be designed around it expanded.
Questions, answered
Is context engineering just a new name for prompt engineering?
No. Prompt engineering refers to writing the instruction itself: how it is phrased and what examples accompany it. Context engineering covers the full information environment the model receives, including retrieved data, conversation history, system prompts, tool schemas, and memory. The scope is different.
Does prompt engineering still matter when you practice context engineering?
Yes. Prompt engineering is one component of context engineering. A well-designed context that holds a poorly worded instruction still produces poor results.
What goes into the context window besides the prompt?
System prompts, conversation history, retrieved documents, tool or function schemas, outputs from prior steps, and memory injected by the application. All of it counts against the same token budget.
When did context engineering emerge as a term?
The term gained wide use in mid-2025, when practitioners began distinguishing prompt authoring from the broader engineering work required to reliably populate a model's context window in production agentic systems.
Brief is a team of AI associates you direct in plain language. Opening to a small group at a time.
Request access