A memory can survive and still be useless
By Andrew GarcellMemory5 min read
Contents
Somewhere in your old messages is the exact reason a project went the way it did. You remember the conversation. You can probably dig up ten messages with the right words in them. The one you need is the message where somebody changed their mind. An agent with a perfect archive can have exactly the same problem.
Most talk about memory in AI systems is about retention: how much an agent can keep, for how long, and how fast it can search it. Those things matter, but they aren't the hard part. In this essay I want to argue that the hard part is selection. I'll describe an approach I think is worth trying, and propose a test that measures what we actually care about.
Retention isn't the problem
Storage is cheap and keeps getting cheaper. An agent can keep every message, document and tool result it has ever seen. What it can't do is put all of that in front of the model at once. Context windows are finite, and even inside one, more text isn't free. It costs money, slows things down and spreads the model's attention over stuff that doesn't matter.
So any agent that runs long enough ends up with the problem you have when you go looking for an old conversation. The right message is in there somewhere. The question is whether the agent can find it, recognize it as the right one, and pick it over all the messages that just sound relevant.
Retrieval by similarity is good at finding messages that share words with the current request, and often that's enough. But the message you need usually isn't the one with the most overlapping words. It's the one where somebody changed their mind, and changes of mind tend to be short. "Let's not do that" shares almost no vocabulary with the long, detailed discussion it cancels.
Specialized memory networks
That's what pulled me toward the idea of specialized memory networks. Instead of asking one network to learn every kind of memory operation, a router could pick smaller networks suited to particular memories or tasks. Their outputs would help build the context the language model actually sees.
The reasoning is that "remembering" covers several quite different jobs, and it seems unlikely one mechanism is best at all of them. There's recall, which means finding a fact that was mentioned once, like a name, a date or a preference. There's state tracking, which means knowing where something stands after it's changed a few times, like a task that was started, paused and picked back up. There's supersession: noticing that a later decision replaced an earlier one, so the earlier one is history and not an instruction. And there's keeping track of what the agent promised, to whom, and by when.
Each of these has a different shape. Recall is close to search. State tracking is closer to keeping a record. Supersession means understanding how two messages relate, not just what each one says. A router that can tell which job a request needs, and send it to a component built for that job, might beat one system that treats all memory as similarity search. I want to stress might. Whether this beats a single, better-trained model is an empirical question, and routing brings errors of its own.1
The plausible retrieval
The interesting failure is a plausible retrieval. Say the system pulls up three enthusiastic discussions of a design, all written before the decision to drop it. The answer will sound unusually well informed. More retrieved text could make it worse. A useful router has to care about which decision is still in force.
This one's worth sitting with because it flips the usual intuition. We tend to assume that pulling in more relevant material makes an answer better. Here the material is relevant, detailed and accurate as a record of what people said. It's just out of date, and the more of it the model sees, the more confident and specific its wrong answer gets.
It's also hard to spot. An agent that forgets something usually gives a vague or obviously clueless answer, and someone corrects it. An agent that remembers the wrong thing gives a fluent, well-supported answer that happens to contradict a decision nobody thought to bring up again. The person relying on it has every reason to trust it.2
A test worth running
This is a research proposal. The test I'd want is simple to describe. Give two agents the same history, reversals included, then ask each to pick the work back up after a gap. Which one acts on the latest decision, and can it show why? That tells me more than how many memories either one managed to store.
A bit more detail on how I'd build it:
- Several kinds of reversal: outright cancellations, quiet swaps where a new plan just replaces the old one, and partial reversals where only one piece of a decision changes.
- Gaps of different lengths. Some resumptions come right after the last message, others after enough unrelated activity that the reversal is buried.
- Evidence as well as behavior. The agent should point to the message that justifies what it's doing. An agent that gets it right for the wrong reason will fail on the next history.
- Distractors that sound right. Detailed, enthusiastic discussion of the abandoned option, put there on purpose, because that's what real histories look like.
What matters is whether the agent picks the work up in the state it's actually in. Storage capacity, retrieval speed and archive size all feed into that. None of them is the outcome.
What I don't know yet
A few things could make this approach less useful than I'm hoping. Routing errors stack up: if the router sends a supersession question to a recall network, the result might be worse than what a general system would have done. Specialized networks need training data for each job, and reversals in particular are rarer in most data than the discussions they reverse. And good enough general models might simply learn to handle supersession on their own, which would make specialization pointless.
Those are reasons to run the test, not to skip it. What an agent needs is a memory that survives and gets used correctly. A memory that survives and gets used wrongly might be worse than no memory at all.
Notes
- 1
This fits a broader view of memory as its own architectural layer, with typed representations, salience, contextual retrieval and compaction each designed and tested separately. The research page goes into that in more detail. Back to the text
- 2
People do this too. Most of us have confidently brought up a plan in a meeting, only to be reminded it was dropped weeks ago. The difference is that a colleague usually catches it. An agent working alone might not have one. Back to the text