Category · Agents and orchestration
What is context management?
Managing context means choosing, at each turn, what the model sees, such as the instructions, the history or tool results. It needs enough to answer well, but not too much, to stay precise and cheap.
By Laurent Poupet, Claude trainer and artificial intelligence architect · Updated
How it works
- The context has a maximum size, but quality often drops well before the limit, because the model makes less use of information buried in a long text.
- Common techniques are summarising the history, loading only the relevant documents and handing hungry tasks to subagents.
- Order matters too; stable instructions go at the start, and the precise request at the end, where the model takes it into account best.
The trap to avoid
The trap is putting everything in just in case; every useless token is paid for at every turn, and can pull the model away from the important instruction.
Related terms
- TokenModels and how they work
- LangChainAgents and orchestration
- Agent skillsAgents and orchestration
Where this is taught
Track 1 · Discovering Claude day to day
Claude models: choosing the right one for each tasklesson 1 · 1 hour
Lesson content (step-by-step instructions, exercises with solutions, quizzes) is for students only, with an access code received after the first lesson.