The context budget and context rot
A million-token window sounds like room for everything. Fill it, though, and answers get worse, not better. Models read long inputs less carefully, and facts in the middle get missed. Treat the window as a budget you spend on purpose, not a bin you fill.
In this lesson you'll learn to
- Explain context rot and the "lost in the middle" effect, and why a bigger window doesn't mean better use of it.
- Plan a context budget for one agent step, reserving room for output and naming what each slice is for.
- Place critical instructions and facts where models use them best, and restate goals in long contexts.
- Test your own application at realistic context lengths instead of trusting the advertised window size.
Create a free account to open this lesson
It's free. You'll get every free lesson, quizzes that save your progress, daily flashcards and streaks.