Zum Inhalt springen
Implementa.
← Full glossary

Context engineering

Practice

context management

The practice of deciding what information lands in a model's context window at every step: system instructions, retrieved data, tool definitions, conversation history and memory. If prompt engineering works on the sentence, context engineering works on everything surrounding that sentence.

In agents that run for many turns, context is a scarce and expensive resource: every token competes with another. Context engineering is the work of curating and maintaining that set of tokens during inference — what gets injected, what gets summarised, what gets pruned, what persists in memory across sessions and what stays out. Anthropic describes it as the set of strategies for maintaining the optimal set of information during model inference, beyond the prompts themselves. The term gained traction in 2025 alongside long-running agents. It matters in AI Operations because most agent failures in production are not model failures: they are context failures. The agent didn't know something the company knew, or it knew it and the fact had fallen out of the window.

How it differs from

Prompt engineering
Prompt engineering tunes the specific instruction. Context engineering designs the whole pipeline that decides which information travels with that instruction at each step.
RAG
RAG is one retrieval technique. Context engineering is the discipline that decides whether to use RAG at all, how much to retrieve, when to summarise it and when to drop it.

Examples

  • Pruning a support agent's history and replacing it with a structured case summary before each turn
  • Loading the tool catalogue in stages instead of injecting all 60 definitions on every call
  • Persisting customer decisions in memory so the agent stops asking the same question twice

FAQ

Why isn't a long-context model enough?
Because a big window is not the same as a well-used window. Filling it with noise degrades answer quality and inflates cost per task. The practical limit is rarely how many tokens fit — it's how many of them actually help.
Who owns this in an AI Operations team?
Usually whoever builds the agent, working with whoever owns the business process. It's a hybrid job: you need agent architecture knowledge and you need to know which pieces of process information actually drive the decision.

Related terms

Sources & further reading