Context engineering concept
What is context engineering?
ReferenceWhat is context engineering? It is the practice of choosing and maintaining the information an AI model receives for a task, so the information supports the response you want. That context can include instructions, documents, examples, tool descriptions, and conversation history. For multi-step work, it also means deciding what to retrieve, keep, summarize, or leave out as the task develops.
Reviewed 2026-10-09
What it means
Context engineering is the work of shaping the information available to a model when it produces a response. A context window is the model’s limited working space for that information. The context is broader than a user’s prompt: it can include instructions, examples, documents, tool information, and conversation history.
The goal is to include information that helps with the current task and leave out what does not. Context engineering therefore covers both what goes in and how it is organized. It is a practical design activity in an AI application, rather than a special kind of model or a single technique.
How it works
An application first assembles information for the model. Some information may be supplied up front, such as instructions or a reference document. Other information can be selected as needed, for example by looking up a relevant document or using a tool. In a multi-step task, the application may add tool results and new messages as the work proceeds.
The application then manages this growing context: it can select relevant information, remove material that is no longer useful, or summarize earlier conversation to carry forward the key points. These choices happen each time information is passed to the model. The aim is not to pack in everything available, but to keep the information useful for the next step.
How it relates to prompt engineering
Prompt engineering focuses on writing and organizing instructions for a model. Context engineering includes that work, but considers the wider set of information available for the task, including material that is not part of the prompt itself. This makes prompt writing one part of context engineering, rather than a synonym for the whole practice.
The distinction is especially useful in applications that handle several steps. A prompt may set the task and desired behavior, while the application also selects documents, exposes tools, and carries forward relevant history. Those choices shape what the model can use at each step. For an introduction to writing prompts, see How to write an AI prompt.
Common misunderstandings
Context engineering does not mean making a prompt as long as possible. More material can include irrelevant or distracting details; the useful question is whether each piece helps the current task. The available context also changes during multi-step work as tool results and conversation history accumulate.
It is also not just document search. Selecting information is one part of the work, alongside writing instructions, organizing examples and tool descriptions, and managing earlier messages. When a task continues for a long time, summarizing or saving notes can help carry useful state forward without keeping every earlier detail in the active context.
Questions people ask
What is context engineering, simply?
It is choosing and managing the information an AI model receives for a task, including instructions and relevant material beyond the prompt.
Context engineering vs prompt engineering: what is the difference?
Prompt engineering is about writing and organizing instructions. Context engineering includes that, plus the broader task of selecting and maintaining all the information available to the model.
Does context engineering mean giving a model more information?
Not necessarily. It means choosing information that is useful for the task and managing it as the work changes; adding material that does not help can make the context less focused.
What can count as context besides a prompt?
Examples include reference documents, examples, tool descriptions, tool results, and conversation history.
Learn more
- Effective context engineering for AI agents
A detailed explanation of how instructions, tools, retrieval, and ongoing task state fit into context management.
- Context Engineering 14 min
An overview of strategies for writing, selecting, compressing, and isolating context in agent workflows.
- Prompt engineering
Official documentation on writing instructions, useful for understanding the prompt-engineering part of context engineering.
What changed
Sources
Part of Context engineering: What belongs in contextChoose instructions, documents, and toolsManage state and context budgets