Memory & context
What is Context Engineering?
Context engineering is choosing what information enters each model call.
Memory, retrieved docs, and tool results compete for limited context.
Why it matters
Context engineering is the discipline of choosing what information enters each model call. Memory, retrieved docs, tool results, and instructions all compete for limited context space.
Good context engineering means the model always has the right information to make the right decision. Bad context engineering means the model is drowning in irrelevant data or starving for critical details.
Techniques
Common techniques include: summarizing long conversations, selecting only the most relevant retrieved passages (re-ranking), dropping old tool results that are no longer relevant, and using structured prompts that separate instructions from data.
The goal is not to fit everything — it is to fit the right things.
Key takeaways
- 1Context engineering is about relevance, not volume.
- 2Summarize, select, and structure — don't dump everything in.
- 3The right context produces better results than a bigger context window.
Common mistakes
- ✕Treating the context window as a bucket to fill rather than a lens to focus.
- ✕Not re-evaluating context contents as the conversation evolves.
Related terms
Concept neighborhood
Terms linked from Context Engineering in the glossary graph.