Pick the right choice between rolling summary and vector-store memory for cross-session continuity
A vector-store memory keyed on user_id is the right shape for cross-session continuity because retrieval scales with relevance per turn, while a rolling summary grows monotonically across sessions and either bloats
Think about a doctor's office. Imagine a doctor who, every time you visit, reads aloud a single growing summary paragraph of every past visit. That paragraph gets longer and blurrier every visit, and most of it has nothing to do with why you came in today. Now imagine a doctor with a filing cabinet of small notes per visit. When you walk in, they pull only the notes relevant to today's complaint. The cabinet keeps growing, but the doctor only reads what matters right now. The cabinet is the vector-store memory; the growing paragraph is the rolling summary. For someone you see across many visits, the cabinet wins.
Detailed answer & concept explanation~6 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.
Frame cross-session continuity as a retrieval problem. Explain why the rolling-summary shape grows monotonically and mismatches the relevance distribution. Walk through how a vector store keyed on user_id handles fact extraction, retrieval per turn, and contradiction resolution. Cover the failed combinations. Close with the 2026 layered pattern that separates in-session and cross-session memory.
Real products, models, and research that use this idea.
- Mem0 is the canonical 2026 implementation of vector store of facts for cross-session memory.
- Zep maintains a temporal knowledge graph that combines vector retrieval with explicit contradiction handling.
- Letta (formerly MemGPT) exposes archival memory as a per-user vector store the model can read and write.
- ChatGPT memory in 2026 stores user-stated preferences as discrete items retrievable per turn.
- Claude projects expose a custom-instructions block plus a memory layer that is effectively per-project vector storage.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does the vector store handle the case where a user's preference changes (e.g., 'I am no longer vegetarian')?
QWhat happens when retrieval misses a relevant fact?
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.
Picking a rolling summary because it preserves "everything" across sessions. The summary actually loses fidelity at every session boundary and never trims, so it eventually becomes both bloated and lossy.
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.