In a multi-turn conversation, when should you reset history, carry full state, or summarize?
Reset on topic shift, carry full when turns depend on each other, summarize when history is long but the gist matters; pick by coupling and budget, not turn count.
Imagine taking notes during a long meeting. Sometimes the topic changes completely and your old notes are just clutter, so you flip to a fresh page. Sometimes every sentence builds on the last and you keep the full transcript in front of you. Sometimes the meeting has been going for hours and you cannot read it all, so you write a one-paragraph summary and use that instead. Multi-turn LLM chats work the same way. The right choice depends on whether the new turn really needs everything that came before, only the gist, or none of it.
Detailed answer & concept explanation~4 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: three strategies + topic-shift vs coupling triggers + summarization template + hybrid production pattern + cache interaction.
Real products, models, and research that use this idea.
- OpenAI Assistants exposes a thread abstraction with automatic truncation and summarization helpers, so teams pick a strategy without hand-rolling the loop.
- Anthropic Claude Projects keeps a verbatim recent window plus a project-level summary that survives across sessions, mirroring the hybrid pattern.
- Cursor and GitHub Copilot Chat default to a verbatim recent-turn window for code edits because coupling is high; longer threads get summarized into a compact preface.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you detect a topic shift reliably?
QHow does prompt caching interact with history strategy?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Carrying full history every turn because losing context feels dangerous, while ignoring the token cost, the position-bias dilution, and the noise that irrelevant turns add when the topic has shifted.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.