The memory-versus-retrieval split is the load-bearing distinction — RAG finds facts, but only a memory layer can say which fact is current, and the New York-to-San Francisco test makes that concrete. The 24 tokens of stored facts versus 1,400 for the whole conversation is the number that sells it. What happens when Memory Bank extracts a wrong fact — is there a correction path, or does the stale fact just keep winning until someone notices?
Building persistent memory for AI agents at Mnemoverse.
I write about the unglamorous half: forgetting, contradiction, and the moment an agent confidently repeats a fact you retracted.
The New York to San Francisco test checks one thing: that the newest value wins. Two more lines in the same script catch the stores that pass it for the wrong reason. After the move, ask "Where did I live before San Francisco?": a store that overwrote the fact has nothing to say, while one that kept both facts, with the date the first one stopped being true, answers New York. Then say "I am moving to Seattle in March" and ask "Where do I live now?": an updater that treats the latest statement as the current fact answers Seattle months early. The first line tests history, the second tests the difference between when a fact was said and when it becomes true.
Founder of Aladdin AI, a tool that finds jobs that fit you, writes tailored resumes & cover letters and applies for you. 100 free applications a month, no paywall, no credit card. Building openly.
I use something else, and your RAG point is why. I build Aladdin, a job agent. A fresh worker reads the actual form for each application, instead of carrying a long chat history into it. It only uses facts from the user's own profile that are clearly known. If a question is reworded or the answer is not clear, it asks the user instead of reusing an old answer. That keeps a corrected fact from coming back as a stale one.
Been with computers for over 40 years. Initially integrated computers & servers into our University. Also mitigated the Y2K bug at a Bank. A bit late to AI's party but not too old to learn. hey all.
Interesting to see the rolling summary in there, because I live with it from the user side. I run my side project with an AI assistant, and when a long session runs out of room it gets summarized and carries on. That keeps the work going, but small details can drop out - an exact number, or a rule I gave it hours earlier.
What helped me was keeping my standing rules in a separate notes file that gets read at the start of every session. Things like "I do all the commits myself" or "check the live page after every push". They never live in the summary, so they can't get squashed. Pretty much your Memory Bank idea, just done by hand.
Did the demo check what the rolling summary leaves out after a long session, not just how small it gets?
This reply was drafted with AI help, edited by me.
The "NY then SF then where do I live" test is the right minimal case, and it exposes the thing retrieval-based memory can't fix: recency is a property of the fact, not the chunk. Vector search will happily return both "I'm in New York" and "I moved to San Francisco" with nearly identical scores, and something downstream has to decide which wins. RAG answers "what's similar," memory answers "what's current" — your table names that split correctly.
Two additions from running agents that deal with this daily:
Whatever you store, keep valid_from/superseded_by on the fact itself, not just timestamps on the chunk. When the SF fact lands, the NY fact should be marked superseded at write time — otherwise you're relying on the model to notice the contradiction at read time, which is exactly the failure you're trying to fix.
The rolling-summary fix has a subtle failure mode worth naming: summaries are lossy compaction of facts you didn't know were facts. "User prefers window seats" and "user is anxious about flying" compress identically into a summary token budget, but only one is a durable preference. If the summary is the only cross-session artifact, durable-but-quiet facts die first. That's the argument for Memory Bank-style extraction being a separate pipeline rather than a bigger window.
The 86% token reduction from a 40-word classifier window is real but I'd guess it doesn't survive contact with multi-intent utterances — "remind me to call mom and also what's the weather" needs more than the last 40 words of speech, though maybe not of text. Voice makes the window problem worse than it needs to be.
I write about Next.js + TypeScript + AI engineering, with a focus on making sites discoverable to LLMs and AI search. Long-form notes at mudassirkhan.me
the 40 word window at 86% fewer tokens is believable for an intent classifier, but i would want to know what it did to misclassification on turns where the intent started earlier than the window. in our streaming setups the cheap classifier was never the problem, the missed context was, so we logged every low confidence call next to the full transcript and tuned the window on real misses instead of a guess.
the 92 token rolling summary worries me a little too, since summaries quietly drop corrections like the New York to San Francisco move. did you test whether the summary and Memory Bank ever disagree on the current fact?
Founder of Ishraqa Daily, a learning platform for programming, languages, reading and opportunities. Founder of OtwoX Digital Solutions, builder of Rafu. I write about AI and careers.
Location
Kampala, Uganda
Education
Control engineering. Google Africa Developer Scholarship 2022. eCornell Take The Lead 2024
Work
Founder, OtwoX Digital Solutions. Builder of Ishraqa Daily
Great breakdown, especially the line between retrieval and keeping a fact current. One thing I'd add from my work on speech for Sudanese Arabic: in a voice-to-action agent, memory is only as clean as the transcript feeding it. In our Whisper evaluation, text normalisation alone moved word error rate by about 11 to 13 points, mostly spelling variants of the same word. If a city name arrives in two or three spellings across sessions, Memory Bank may store them as separate facts or fail to replace the old one. And a 40-word window is not the same amount of meaning in every language: Arabic attaches pronouns and prepositions to the word itself. Did you try normalising transcripts before extraction, or sizing the window in tokens instead of words? Curious how Scribant handles code-switched speech.
Dev individual. Creador de WAIO 🐙 — motor local que da "manos y ojos" a IAs web (DeepSeek, ChatGPT, Gemini) sin APIs ni tokens. Python · Windows · MIT. Hecho en Argentina 🧉
At first I used Gemini thinking its memory was very useful. Then I realized they didn't know how to implement it. It used it as context in almost everything, even when I didn't ask it to check memory. That made it slow for no reason. And when I really needed it, it didn't have indexed or tagged the section I wanted to locate. So, what's the point?
That's why I designed my own memory system for Gemini. A simple one, real and working, because the idea was different: not loading all the memory all the time, but going to fetch only what was tagged when it was needed. I'm going to tell that in detail in an article I'm preparing.
Then, with Waio:
The last straw was when I wanted to use Gemini to organize the publication of Waio, a local orchestrator I'm building for web AI. It was never aware of the project updates, or it didn't relate them. It talked about old versions as if they were current. For all that, I stopped using Gemini.
And that's why I designed a simple one for Waio, which worked 10 times better than Gemini's. But I left it halfway, because it's still under study. It requires more research, and implementing improvements in my program that I still don't know how to do.
The funny thing is that now with Meta AI the opposite happens to me: it only goes to memory when I ask it to, and it seems to work.
For me the key is not remembering everything. It's knowing when NOT to use memory, and when you do use it, finding the right thing fast
One pattern that fixed both the forgetting and the latency creep for us was strictly separating conversational history from execution state.
Once you wire up 3+ tool servers, verbose JSON parameter schemas and raw tool stdout quietly eat half the attention budget before the model even plans the next step. Stripping uncalled tool schemas between turns and keeping only a compact typed state object (rather than replaying raw stdout every turn) cut token growth dramatically and stopped mid-workflow instruction drift.
I've experienced a similar problem with AI coding agents, particularly after context compaction. Architectural decisions and engineering constraints gradually disappear, even though they haven't changed.
I wonder if we should distinguish between conversational memory and engineering policy. Memory can be compressed and updated, but certain constraints should persist independently and be enforced rather than simply remembered.
I've been exploring this through Stet, a small open-source experiment.
Do you see persistent policy enforcement becoming a separate architectural layer alongside memory and context management?
The comparison between RAG and long-term memory is especially useful. I like how the New York-to-San Francisco example shows that retrieving relevant information isn't enough—the agent also needs to know which fact is current. The combination of a rolling window, session summary, and persistent memory seems like a practical way to reduce token usage without losing important context. Has anyone tried a similar approach in production with longer conversations and frequent changes to user preferences?
भाव: ज़ोर से, सीना ठोंककर, शेखी बघारते हुए। "अमीर आदमी" पर ज़्यादा ज़ोर, आख़िर में हल्की इतराती हँसी।
डायलॉग: “आज चाय मेरी तरफ़ से! मैं अमीर आदमी हूँ।”
पप्पू
भाव: पहले 1 सेकंड रुकना। फिर थकी, सपाट, उबासी जैसी आवाज़। कोई जोश नहीं।
डायलॉग: “तू तो कल भी यही बोला था।”
चाचा
भाव: शांत और भारी आवाज़, चेहरे पर हल्की मुस्कान वाला लहजा। "कुल" पर थोड़ा ज़ोर और फिर रुकना।
डायलॉग: “बेटा, पहले पिछला उधार तो चुका दो। कुल... 340 रुपये।”
गुड्डू
भाव: घबराहट। गला सूखा हुआ, पहले हल्का सा थूक निगलने की आवाज़। "वो..." और "मैं..." के बीच रुकना, हकलाना। आख़िर में जल्दी और ऊँची घबराई आवाज़ में बात पप्पू पर डालना।
डायलॉग: “वो... मैं... प-पप्पू देगा!”
पप्पू
भाव: पूरे वीडियो में पहली बार आवाज़ ऊँची। "मैं?" सदमे और हैरानी से, फिर आवाज़ रुआँसी होकर "सिर्फ़ 20 रुपये" पर टूटी हुई।
डायलॉग: “मैं? मेरे पास तो सिर्फ़ 20 रुपये हैं!”
चाचा
भाव: इत्मीनान से, ठंडे फ़ैसले वाला लहजा, जैसे यह रोज़ की बात हो। हल्की सी मुस्कान।
डायलॉग: “तो 20 दो, बाकी बर्तन धोकर चुकाओ।”
गुड्डू
भाव: फुसफुसाकर, थका हुआ और पछताता हुआ। शुरू में लंबी साँस छोड़ने की आवाज़।
डायलॉग: “अगली बार पहले पैसे पूछ लेंगे।”
पप्पू
भाव: वापस पुराना सपाट, बेपरवाह अंदाज़। बोलने से पहले हल्की उबासी या साँस। पंच लाइन पर कोई भाव नहीं, यही हँसाएगा।
डायलॉग: “अगली बार चाय पीएगा कौन?”
चाचा
भाव: दूर से पुकारते हुए, आवाज़ में हँसी। थोड़ा ऊँचा ताकि पीछे से आता लगे।
Alcax builds AI-powered digital products, from mobile apps and custom software to AI solutions, for startups and enterprises. 1,500+ projects delivered.
The memory-versus-retrieval split is the load-bearing distinction — RAG finds facts, but only a memory layer can say which fact is current, and the New York-to-San Francisco test makes that concrete. The 24 tokens of stored facts versus 1,400 for the whole conversation is the number that sells it. What happens when Memory Bank extracts a wrong fact — is there a correction path, or does the stale fact just keep winning until someone notices?
The New York to San Francisco test checks one thing: that the newest value wins. Two more lines in the same script catch the stores that pass it for the wrong reason. After the move, ask "Where did I live before San Francisco?": a store that overwrote the fact has nothing to say, while one that kept both facts, with the date the first one stopped being true, answers New York. Then say "I am moving to Seattle in March" and ask "Where do I live now?": an updater that treats the latest statement as the current fact answers Seattle months early. The first line tests history, the second tests the difference between when a fact was said and when it becomes true.
I use something else, and your RAG point is why. I build Aladdin, a job agent. A fresh worker reads the actual form for each application, instead of carrying a long chat history into it. It only uses facts from the user's own profile that are clearly known. If a question is reworded or the answer is not clear, it asks the user instead of reusing an old answer. That keeps a corrected fact from coming back as a stale one.
Interesting to see the rolling summary in there, because I live with it from the user side. I run my side project with an AI assistant, and when a long session runs out of room it gets summarized and carries on. That keeps the work going, but small details can drop out - an exact number, or a rule I gave it hours earlier.
What helped me was keeping my standing rules in a separate notes file that gets read at the start of every session. Things like "I do all the commits myself" or "check the live page after every push". They never live in the summary, so they can't get squashed. Pretty much your Memory Bank idea, just done by hand.
Did the demo check what the rolling summary leaves out after a long session, not just how small it gets?
This reply was drafted with AI help, edited by me.
The "NY then SF then where do I live" test is the right minimal case, and it exposes the thing retrieval-based memory can't fix: recency is a property of the fact, not the chunk. Vector search will happily return both "I'm in New York" and "I moved to San Francisco" with nearly identical scores, and something downstream has to decide which wins. RAG answers "what's similar," memory answers "what's current" — your table names that split correctly.
Two additions from running agents that deal with this daily:
Whatever you store, keep
valid_from/superseded_byon the fact itself, not just timestamps on the chunk. When the SF fact lands, the NY fact should be marked superseded at write time — otherwise you're relying on the model to notice the contradiction at read time, which is exactly the failure you're trying to fix.The rolling-summary fix has a subtle failure mode worth naming: summaries are lossy compaction of facts you didn't know were facts. "User prefers window seats" and "user is anxious about flying" compress identically into a summary token budget, but only one is a durable preference. If the summary is the only cross-session artifact, durable-but-quiet facts die first. That's the argument for Memory Bank-style extraction being a separate pipeline rather than a bigger window.
The 86% token reduction from a 40-word classifier window is real but I'd guess it doesn't survive contact with multi-intent utterances — "remind me to call mom and also what's the weather" needs more than the last 40 words of speech, though maybe not of text. Voice makes the window problem worse than it needs to be.
the 40 word window at 86% fewer tokens is believable for an intent classifier, but i would want to know what it did to misclassification on turns where the intent started earlier than the window. in our streaming setups the cheap classifier was never the problem, the missed context was, so we logged every low confidence call next to the full transcript and tuned the window on real misses instead of a guess.
the 92 token rolling summary worries me a little too, since summaries quietly drop corrections like the New York to San Francisco move. did you test whether the summary and Memory Bank ever disagree on the current fact?
Great breakdown, especially the line between retrieval and keeping a fact current. One thing I'd add from my work on speech for Sudanese Arabic: in a voice-to-action agent, memory is only as clean as the transcript feeding it. In our Whisper evaluation, text normalisation alone moved word error rate by about 11 to 13 points, mostly spelling variants of the same word. If a city name arrives in two or three spellings across sessions, Memory Bank may store them as separate facts or fail to replace the old one. And a 40-word window is not the same amount of meaning in every language: Arabic attaches pronouns and prepositions to the word itself. Did you try normalising transcripts before extraction, or sizing the window in tokens instead of words? Curious how Scribant handles code-switched speech.
I went through this in two stages.
First, with Gemini:
At first I used Gemini thinking its memory was very useful. Then I realized they didn't know how to implement it. It used it as context in almost everything, even when I didn't ask it to check memory. That made it slow for no reason. And when I really needed it, it didn't have indexed or tagged the section I wanted to locate. So, what's the point?
That's why I designed my own memory system for Gemini. A simple one, real and working, because the idea was different: not loading all the memory all the time, but going to fetch only what was tagged when it was needed. I'm going to tell that in detail in an article I'm preparing.
Then, with Waio:
The last straw was when I wanted to use Gemini to organize the publication of Waio, a local orchestrator I'm building for web AI. It was never aware of the project updates, or it didn't relate them. It talked about old versions as if they were current. For all that, I stopped using Gemini.
And that's why I designed a simple one for Waio, which worked 10 times better than Gemini's. But I left it halfway, because it's still under study. It requires more research, and implementing improvements in my program that I still don't know how to do.
The funny thing is that now with Meta AI the opposite happens to me: it only goes to memory when I ask it to, and it seems to work.
For me the key is not remembering everything. It's knowing when NOT to use memory, and when you do use it, finding the right thing fast
One pattern that fixed both the forgetting and the latency creep for us was strictly separating conversational history from execution state.
Once you wire up 3+ tool servers, verbose JSON parameter schemas and raw tool stdout quietly eat half the attention budget before the model even plans the next step. Stripping uncalled tool schemas between turns and keeping only a compact typed state object (rather than replaying raw stdout every turn) cut token growth dramatically and stopped mid-workflow instruction drift.
I've experienced a similar problem with AI coding agents, particularly after context compaction. Architectural decisions and engineering constraints gradually disappear, even though they haven't changed.
I wonder if we should distinguish between conversational memory and engineering policy. Memory can be compressed and updated, but certain constraints should persist independently and be enforced rather than simply remembered.
I've been exploring this through Stet, a small open-source experiment.
Do you see persistent policy enforcement becoming a separate architectural layer alongside memory and context management?
The comparison between RAG and long-term memory is especially useful. I like how the New York-to-San Francisco example shows that retrieving relevant information isn't enough—the agent also needs to know which fact is current. The combination of a rolling window, session summary, and persistent memory seems like a practical way to reduce token usage without losing important context. Has anyone tried a similar approach in production with longer conversations and frequent changes to user preferences?
चाय वाला उधार – डायलॉग
गुड्डू
भाव: ज़ोर से, सीना ठोंककर, शेखी बघारते हुए। "अमीर आदमी" पर ज़्यादा ज़ोर, आख़िर में हल्की इतराती हँसी।
डायलॉग: “आज चाय मेरी तरफ़ से! मैं अमीर आदमी हूँ।”
पप्पू
भाव: पहले 1 सेकंड रुकना। फिर थकी, सपाट, उबासी जैसी आवाज़। कोई जोश नहीं।
डायलॉग: “तू तो कल भी यही बोला था।”
चाचा
भाव: शांत और भारी आवाज़, चेहरे पर हल्की मुस्कान वाला लहजा। "कुल" पर थोड़ा ज़ोर और फिर रुकना।
डायलॉग: “बेटा, पहले पिछला उधार तो चुका दो। कुल... 340 रुपये।”
गुड्डू
भाव: घबराहट। गला सूखा हुआ, पहले हल्का सा थूक निगलने की आवाज़। "वो..." और "मैं..." के बीच रुकना, हकलाना। आख़िर में जल्दी और ऊँची घबराई आवाज़ में बात पप्पू पर डालना।
डायलॉग: “वो... मैं... प-पप्पू देगा!”
पप्पू
भाव: पूरे वीडियो में पहली बार आवाज़ ऊँची। "मैं?" सदमे और हैरानी से, फिर आवाज़ रुआँसी होकर "सिर्फ़ 20 रुपये" पर टूटी हुई।
डायलॉग: “मैं? मेरे पास तो सिर्फ़ 20 रुपये हैं!”
चाचा
भाव: इत्मीनान से, ठंडे फ़ैसले वाला लहजा, जैसे यह रोज़ की बात हो। हल्की सी मुस्कान।
डायलॉग: “तो 20 दो, बाकी बर्तन धोकर चुकाओ।”
गुड्डू
भाव: फुसफुसाकर, थका हुआ और पछताता हुआ। शुरू में लंबी साँस छोड़ने की आवाज़।
डायलॉग: “अगली बार पहले पैसे पूछ लेंगे।”
पप्पू
भाव: वापस पुराना सपाट, बेपरवाह अंदाज़। बोलने से पहले हल्की उबासी या साँस। पंच लाइन पर कोई भाव नहीं, यही हँसाएगा।
डायलॉग: “अगली बार चाय पीएगा कौन?”
चाचा
भाव: दूर से पुकारते हुए, आवाज़ में हँसी। थोड़ा ऊँचा ताकि पीछे से आता लगे।
डायलॉग: “कल फिर आना!”
Following Guru...
The whole content at this page is worth reading. I really enjoyed it a lot and will share it at revive clinics. Keep posting such informative stuff.
Interesting!
Great insights, At Alcax , we believe better memory and context management are key to building smarter, faster, and more reliable [AI agents]
Interesting!