Lesson 3 · 12 min
Conversation history management
Three strategies for keeping conversation history within budget: sliding window, progressive summarization, and entity extraction.
The unbounded history problem
Every conversational AI has the same problem: conversation history grows without bound. Turn 1 is small. Turn 20 is large. Turn 100 exceeds the context window.
Naive solutions fail:
- Keep everything → you hit the context limit and the oldest turns get truncated arbitrarily
- Drop everything past N turns → you lose important earlier context abruptly, confusing the model
The right approach depends on what the conversation contains.