Do you remember 50 First Dates? Adam Sandler falls in love with Drew Barrymore, who, because of an accident, loses her memory of everything that happened the day before every night. Every morning he has to win her over all over again. Until he has an idea: he records a videotape that she watches as soon as she wakes up, with everything she needs to know. The accident, their story, who that guy smiling at her from across the table is.
Well, you've just figured out how an AI's memory works better than half the people who sell it.
No, seriously: every time you write to an AI, the model doesn't remember you. It doesn't remember the message from before, yesterday's conversation, or the fact that you've already explained to it three times what your most important client's name is. If it seems to remember, it's because someone is making it watch the videotape.
The videotape you don't see
When you chat with an AI and it responds coherently to your fifth message, it seems obvious that it remembers the first four. The trick is that with each of your messages, the program sends the entire conversation back to the model, from the beginning. All of it. Every time.
The model reads it all over again, like Drew Barrymore watching the videotape, responds, and then forgets again. With the next message, it starts over: videotape, response, oblivion.
This feature has an unsentimental name: language models are stateless, without state. They don't retain anything between one request and the next. Everything they "know" about you at that moment is what is written in the text they receive (plus what they learned during training, which, however, concerns the world in general, not you).
Henry Molaison, one of the most famous patients in the history of neuroscience, lost the ability to form new long-term memories after brain surgery in 1953. He remembered his childhood, could speak and reason, but every new person remained a stranger forever. Neuroscientist Suzanne Corkin studied him for over forty years: he never really knew who he was, he recognized at most a familiar face, and at one point he became convinced that she was an old high school classmate. A language model is a bit like that: it knows a lot about the world, learned beforehand, and nothing of what happened to it afterwards.
In short: an artificial intelligence model does not remember conversations: with each message, the program sends it the entire previous exchange, which the model reads over again. The space it can read at once is called the context window. When an AI "remembers" you between one session and the next, it's because the system has saved some notes and makes it read them: the memory is outside the model.
What is the context window?
The context window is the maximum amount of text a model can read at one time: instructions, conversation, attached documents, all together.
It is measured in tokens, little pieces of words (we talk about them in a separate article, the one about strawberries). A few years ago, windows were small, a few pages of text; today, larger models read the equivalent of entire books at once. Sounds like a solved problem, right?
Not really. First of all, the videotape has a duration: when the conversation exceeds the window, something has to be cut, and usually it's the oldest messages. That's why in a very long chat, at some point the AI "forgets" what you told it at the beginning: it didn't forget it, it simply isn't shown to it anymore.
Second, reading doesn't mean paying attention. A group of researchers at Stanford in 2023 showed a curious phenomenon: models use information at the beginning and end of a long text very well, and much worse the information in the middle (Lost in the Middle, Liu et al.). Exactly like us with a three-hour meeting (and if you think you're the exception, try to remember what was said at the second hour of the last meeting).
Third, the videotape costs money. The more text you send to the model with each message, the more expensive and slower it gets. An endless conversation in which everything is sent back every time is the most expensive possible way to "remember".
So how does ChatGPT remember me?
With the same trick as Adam Sandler: it takes notes.
When an assistant "remembers" that you prefer short answers or that you work in the watch industry, it's because the system around the model has saved that information somewhere and, at the beginning of the next conversation, it stuffs it into the text the model reads. ChatGPT introduced a memory feature like this in 2024: the model is always the same forgetful one, but now there's someone preparing the videotape for it.
An AI's memory is not in the model, it's in the system you build around it. And like every videotape, someone decides what ends up inside, what gets cut, and who can watch it.
How do you give memory to an AI agent?
For an agent working in a company, memory is not an optional: a collaborator who every morning doesn't know who the clients are, what was decided yesterday, and which cases are open is not a collaborator, it's a perpetual intern.
There are three main ways, and they are usually combined:
- The conversation context. The basic videotape: the ongoing exchange. It works for the short term, but it doesn't survive the end of the session.
- Saved notes. Stable facts written in an archive: preferences, decisions, client rules. They are reread at the beginning of every task, just like the movie box.
- Archive search. For everything else (emails, documents, client history), the agent doesn't read everything: it searches for what is needed at that moment and reads only that. In jargon, it's called RAG, retrieval-augmented generation: first it retrieves, then it responds.
The hard part is not saving: it's deciding what to save. A memory that keeps everything becomes a ten-hour box that no one watches until the end (see above: "lost in the middle"). A memory that keeps things poorly is worse than no memory: an agent that confidently remembers an old price does more damage than one that admits it doesn't know.
Where is the videotape, and who else can watch it? If the agent remembers your clients, that information is saved somewhere. That's why at SalesForB the agents' memory lives in the company's systems, with clear rules on what is kept and who can access it: a memory you don't control is not yours.
A practical example is the management of support requests: the team can pick up a case with the information already collected. Find out how this flow applies to an AI agent for HVAC companies.
In summary
From the movie with Adam Sandler to the H.M. patient, up to the context window: the AI remembers nothing, it rereads. Every "memory" is a text that someone decided to put in front of it again. When you understand this, you stop asking yourself if an AI "has memory" and start asking yourself the right thing: who prepares the videotape, what do they put inside, and where do they keep it.
The next time an AI answers you as if you had never met, don't take it personally: it's not rudeness, it's architecture. And if you explain it like this at the next aperitif, you can go ahead and play the one who understood everything.
Frequently asked questions
Does the AI learn from my conversations? The model itself does not: it doesn't change during use. However, some providers may use conversations to train future versions, depending on the service and settings. It's a matter of terms of use, not memory.
Why in a long chat does the AI forget what I told it at the beginning? Because the conversation has exceeded the context window and the older messages are no longer shown to it, or because the information in the middle of a very long text is used worse than the information at the beginning and end.
Does a larger context window solve the memory problem? Only partially. More context means more cost, more slowness, and information that risks getting lost in the middle. For a company agent, it counts more to choose well what to make it read.
Where is an AI agent's memory saved? It depends on how it's built: in the provider's servers, in a cloud service, or in the company's systems. It's one of the first questions to ask before adopting one.
Sources
- Liu et al., Lost in the Middle: How Language Models Use Long Contexts, 2023
- OpenAI, Memory and new controls for ChatGPT, 2024
- Wikipedia, H.M.
- MIT News, Suzanne Corkin, Permanent Present Tense, 2013