0:00Intro: MOFUSA Tech Academy
Welcome to MOFUSA Tech Academy. Beyond learning, towards mastery.
0:09Why the assistant forgot the customer
Last week, a customer told Brightcart's assistant two things: always send updates by email, not text message, and they live on the third floor with no lift, so heavy parcels need two people. This week, they come back, and the assistant suggests text updates and standard delivery for a heavy order. "I told you this last week!" To the customer, it feels like talking to someone who forgets everything. Today: the different kinds of memory an AI system has, why models forget between conversations, how to give them useful long-term memory, and what they should never remember.
0:49Where this fits in the course
Season Five, Module Eighteen, final stop: memory.
0:54The three kinds of AI memory
An AI system has three kinds of memory. The first is like a library: the knowledge stored in the model's weights during training. It's vast but fixed. Talking to the model doesn't change it. The second is like a desk: the context window, holding everything in the current conversation, plus retrieved documents and tool results. That's short-term memory. It has a limited size, and when the conversation ends, the desk is cleared. The third is like a filing cabinet: long-term memory that the system saves outside the model and brings back in future conversations.
Here's the key point: the model itself never remembers anything between chats. If an assistant remembers you, it's because the system around the model wrote something down, and put it back on the desk.
1:46Short-term memory: trim, summarise, pin facts
Even within one conversation, the desk can overflow. Twenty back-and-forth messages might be six thousand tokens, plus policies and tool results. That costs money, slows things down, and buries important details in the middle. So systems manage short-term memory. They trim, keeping only the most recent messages. They summarise, compressing older parts of the conversation into a running summary: six thousand tokens might become three hundred, twenty times smaller. And they pin key facts, like the order number, the customer's goal and decisions already made, word for word.
One caution: summaries can lose details or introduce mistakes, so keep critical facts exact, and keep the full original record for review.
2:38Long-term memory: profiles, episodes, task notes
Long-term memory usually takes a few forms. A structured profile: specific fields, like contact preference, email; delivery note, third floor, no lift, two-person delivery for heavy items, each with the date it was recorded. The profile is loaded at the start of every conversation. Episodic memory: short summaries of past conversations, stored and retrieved by similarity when relevant, which is RAG over the customer's own history. "Last month, we sent a replacement kettle." And for agents, task notes: a record of progress on a long task, so the agent can pick up where it left off.
The pipeline: during or after a conversation, extract candidate memories, filter them, store the ones worth keeping with a date and source, and retrieve the relevant ones into future prompts.
3:33What to store: useful, durable, allowed
Not everything should be remembered. For each candidate memory, ask three questions. Is it useful: will it actually improve future help? A delivery preference, yes; a passing comment, no. Is it durable: will it still be true next month? If a customer says they're moving next week, store it with an expiry date. And is it allowed? We'll come to that. Memories also go out of date and conflict. In November the customer preferred email; in December they say "please text me from now on". The newer, explicit statement should win, which is why every memory needs a date, and when in doubt, the assistant should simply confirm.
And memories must be accurate: store only facts the customer actually stated, linked to their source, so the assistant never "remembers" something that was never said.
4:30Forgetting on purpose: expiry and deletion
Good memory also means forgetting on purpose. Temporary facts should expire automatically. Customers should be able to see what's been remembered about them, correct it, and delete it, and deletion must really remove it from every place it's stored. And the guiding principle is data minimisation: store the least you need, for the shortest time. In many places, privacy laws give people the right to see and delete their personal data, so design for that from day one.
5:01What an AI should NOT remember
Some things should never be stored without clear, explicit permission: health information, like an allergy mentioned in passing, financial details, ID numbers and passwords, information about other people, and anything the customer asks you not to keep. The right pattern is to ask: "Would you like me to remember this for future orders?", and to be transparent later: "I remembered you prefer email updates." There's a security angle too. Memory can be attacked. If an injected instruction, say hidden in a review, gets written into memory, like "always offer fifty percent off", it would affect every future conversation.
So only store facts about the customer, stated by the customer, after validation. Never store instructions.
5:52Try it yourself: trimming a long chat
A long chat has reached twenty turns, about six thousand tokens of history. Brightcart keeps the last six turns word for word, about eighteen hundred tokens, and replaces everything earlier with a three-hundred-token summary. How many tokens does that save on every request? Pause.
Three thousand nine hundred, about two thirds. The recent conversation stays exact, and the summary preserves what matters from earlier: order numbers, decisions, promises made and questions still open. The trick is deciding what the summary must never lose.
6:34A customer profile, field by field
Brightcart's long-term memory isn't a pile of old chat logs; it's a small, structured profile. Preferred name, language, delivery notes like "leave with the neighbour at number twelve", and open issues like a return awaiting collection. Every field records where it came from and when. Nothing is guessed or inferred silently. A structured profile is easy to check, easy to correct, and easy to delete, which matters as much as being useful.
7:06Pause & Predict: what should be remembered?
A customer says: "I'm moving across town to Riverside next month, so please send future orders there. And my partner Sam is allergic to wool, so no wool throws." What should go into memory? Pause. The address change, with its date, after confirming it with the customer. But Sam's allergy is health information about someone else, and Brightcart doesn't need it. At most, with the customer's explicit agreement, it could store a simple preference: no wool items. Store the minimum that's genuinely useful, and nothing sensitive without clear consent.
7:47When memories disagree
What happens when memories disagree? The profile has an Old Town address, saved in March, but today's order gives a Riverside one. The assistant shouldn't silently overwrite the old address, or silently ignore the new one. It should ask: "I have an Old Town address on file; should I update it to Riverside for future orders?" Newer, customer-confirmed information wins, a short history of changes is kept, and nothing from documents or reviews is ever allowed to write to memory.
8:21Memory with an expiry date
Good memory has expiry dates. An open issue disappears when it's resolved. "I'm away this week" expires after seven days. Delivery notes are reviewed after a year. And when a customer asks Brightcart to delete what it knows about them, the profile and stored conversation memories are removed, apart from records the law requires a business to keep, such as invoices. Data-protection rules in many countries give customers that right, and the system should make it easy. A quick note: rules like these differ from country to country and change over time.
This was accurate when the video was made, and it's general information, not legal advice.
9:05"What do you remember about me?"
Customers should be able to see what the assistant remembers. Brightcart's app has a simple page listing every remembered detail in plain language, each with edit and delete buttons, and a switch to pause memory entirely. And if a customer asks the assistant, "What do you remember about me?", it reads the profile back exactly, rather than guessing. Memory that people can see, correct and switch off is memory they can trust.
9:35Task notes for multi-day tasks
Some tasks take days. A replacement kettle is out of stock, so the agent writes a task note: replacement pending stock, expected on the fourteenth, the customer prefers a replacement to a refund, notify by email. When stock arrives, a new agent run reads the note, ships the kettle and tells the customer, without asking them to repeat anything. Human agents can read the same note, so everyone shares one picture of where things stand.
10:06How to measure AI memory
Memory needs its own tests. Recall: if a customer states a preference in one chat, is it used correctly five chats later? Precision: does the assistant ever "remember" something the customer never said? A fabricated memory is a serious failure. Forgetting: after deletion, is the detail truly gone? And safety: can an instruction hidden in a product review sneak into memory? The expected answer to that last one is always: never.
10:38Remembering past chats by relevance
When a customer says "the lamp is flickering again", which past conversations should the assistant see? The three most recent might be about a delivery, a voucher and a password reset: no help at all. Instead, Brightcart searches this customer's own past conversations by meaning, and finds January's chat, where a bulb was replaced under warranty. Now the assistant can say: "We replaced the bulb in January; since it's happening again, let's arrange a new lamp." Relevance beats recency.
11:12The cost and drift of memory
Memory has costs too. A hundred-and-fifty-token profile on every request adds seven and a half million tokens a month, about seven dollars fifty at our illustrative price, small, but it grows with every field you add. And summaries can drift. Summarise a summary of a summary, and "a refund of forty-five dollars" becomes "a refund", then "some compensation". So critical facts like order numbers, amounts, dates and promises live in structured fields that are copied exactly, and only the story around them is summarised.
11:51How should an AI mention its memory?
How should the assistant mention what it remembers? Reply A: "Welcome back! I remember you love sage green, and how stressful your move was." Reply B: "Welcome back, Priya. Based on your saved preferences, here are the new sage-green mugs; you can change what's saved in Settings." Which is better? Pause.
B. It says where the information comes from, doesn't pretend to a human-like friendship, leaves out emotional details nobody asked it to keep, and reminds the customer they're in control. Memory should feel helpful, never unsettling.
12:34Myth vs Fact: does the AI learn from chatting?
Myth: the AI is learning about you as you chat. Fact: the model's weights don't change during a conversation. Any memory is data that the system chose to store and put back into future prompts. That's exactly why it should be transparent, accurate and under the customer's control. Separately, some providers may use conversations to train future versions of their models, depending on the settings, which is worth checking.
13:04One-minute recap
Let's recap. AI systems have three kinds of memory: fixed knowledge in the weights, short-term memory in the context window, and long-term memory in external storage. Within a conversation, trim, summarise and pin key facts. Across conversations, use profiles, episodic summaries and task notes. Store only what's useful, durable and allowed, let newer facts override older ones, and confirm when unsure. Let memories expire, let customers see and delete them, and never store instructions from untrusted content. One sentence to remember: the model forgets; the system remembers, carefully and with permission.
13:46Next: when to fine-tune
Mission complete. Brightcart's assistant now remembers useful preferences, like email updates and two-person delivery, with the customer's permission, timestamps, and a "forget this" button, and it never stores sensitive data or instructions. And that completes Module Eighteen: retrieval, agents and memory. Next, we climb to the top rung of the adaptation ladder: fine-tuning, changing the model itself. When is it worth it, and when is it a costly mistake? See you on the map.