Page languageFrançaisEnglish
Teacher area
Laurent PoupetClaude trainer and artificial intelligence architectStudent area

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 , 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

Where this is taught

Lesson content (step-by-step instructions, exercises with solutions, quizzes) is for students only, with an access code received after the first lesson.

See the full program

All glossary terms

Trial lesson · 30 min · $20

Book (new tab)