Context engineering
Also called context design, context management
Deciding everything an AI model sees for a task: instructions, examples, documents, memory and tool results, not just the prompt wording.
Context engineering is the practice of designing and managing the full set of information a model has when it works on a task. The term gained popularity in 2025 as AI applications, especially agents, moved beyond single prompts. A model's context includes the system prompt, the user's request, conversation history, retrieved documents, tool definitions, tool results, and any memory the application adds.
The core idea is that the right information, in the right amount and order, matters more than clever wording. Too little context and the model guesses. Too much and important details get diluted, costs rise, and the model may get distracted by irrelevant material. For long-running agents, context also fills up over time, so systems need ways to summarise, prune or store information outside the context window and bring it back when needed.
In practice, context engineering includes choosing what to retrieve, writing concise tool descriptions, summarising long histories, keeping project notes or memory files, and structuring all of it so the model can find what it needs. Prompt engineering is still part of it, as the most visible piece.
Example
A coding agent working on a large repository gets a short project guide file, the relevant source files found by search, the failing test output, and a summary of decisions from earlier in the session, rather than the entire codebase or the full chat history.
Common mistake
Assuming more context is always better. Dumping every document, every past message and dozens of tools into the context can make results worse and slower. Include what the task actually needs, and remove what it does not.