ModelRefs / Context Management — AI Glossary
Context Management — AI Glossary
Strategies for organizing, trimming, and summarizing conversation history and retrieved context to fit within the model's context window.
Overview
Context management includes sliding window (drop oldest turns), summarization (compress old turns via the model), importance scoring (keep high-relevance turns), and RAG injection (replace retrieved chunks at the relevant turn). Critical for long-running agents and multi-session applications where history exceeds context limits.
Reference details
| Topic | prompting |
|---|---|
| Last reviewed | 2026-06-24 |
Related terms
Example: Every strategy loses something
A sliding window drops the oldest turns, so the model forgets what was agreed early. Summarisation compresses them and loses the exact wording a later turn depends on. Importance scoring keeps what it judges relevant and is wrong sometimes. There is no lossless option — the decision is which loss you can tolerate.
Commonly confused with
Context management is not memory. It decides what to re-send within the window on each call; memory implies persistent state the model can retrieve later. Systems that appear to remember across sessions are doing retrieval, not remembering.
When to use it
Reach for it when:
- Conversations or agent runs outlive the context window
- Cost scales with history and history keeps growing
- Some early context is genuinely load-bearing and must survive
Reach for something else when:
- Short interactions that comfortably fit — the machinery adds failure modes
- Summarising content you will later need verbatim
- Trimming before measuring which turns actually matter
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Context Management — AI Glossary.
Frequently asked questions
What is Context Management?
Strategies for organizing, trimming, and summarizing conversation history and retrieved context to fit within the model's context window.
What concepts are related to Context Management?
Closely related concepts include conversation history, context window, context window management.