All terms
Patterns
Context Engineering
Curating exactly what goes into a model's context and how to compact it.
Definition
Context engineering is the practice of deciding exactly what goes into a model's context — instructions, retrieved documents, tool results, and conversation history — and how to compact it as a task grows. It treats the context window as a budget to be managed rather than filled. For longer-running agents, handling context well becomes as important as the wording of the prompt itself.