Knowledge Base · Learning paths
Why Long-Term Memory Remains an Unsolved Problem for LLMs
Long-term memory in conversational LLMs is still an open challenge. Raw storage preserves information perfectly but lacks understanding, while derived summaries are compact yet suffer from progressive distortion through repeated summarization. Infinite context windows are impractical due to cost and attention degradation, and evaluating true long-term memory faces the annotation paradox. Every existing approach is ultimately a trade-off that cannot simultaneously achieve perfect retention and perfect comprehension.
Translated from Chinese by AI. Spotted an issue? Use the feedback button.
Original post: https://x.com/chrysb/status/2043020014035570784
No matter how convincing it may look on the surface, the problem of long-term memory in conversational large language models remains fundamentally unsolved.
The ideal is this: the model remembers what you’ve said, gradually distills meaning from it over time. Not just recall — but understanding, narrative, a sense of continuity that makes a conversation feel coherent and cumulative across months or even years.
Today, you can create a convincing illusion of that ideal. With luck, the illusion can last for days or even weeks — until the LLM starts to forget, and the illusion inevitably breaks.
Why does this happen?
As conversation history grows, the memory system must constantly decide what to capture, how to represent it, and what to surface in any given turn. Each of these decisions is lossy, subjective, and non-deterministic.
Over time, either the corpus becomes too large to reliably retrieve from, or the system’s summarized memories drift further and further from what was actually said. The model forgets because the system either cannot hold the full picture, or the picture it holds has become distorted.
In an ideal world, the LLM would have perfect context over the truly important historical turns. It would maintain infinite attention over every word you’ve ever exchanged, without any of the real-world costs or latency that inevitably come with it.
But that’s impossible. Therefore, every memory system is fundamentally an approximation of this ideal — and every approximation has its own flaws.
At the end of the day, there are only two ways to preserve conversational information:
- Raw: the original messages, stored verbatim.
- Derived: synthesized content such as summaries, narratives, or structured extractions.
Every memory system picks a point on this spectrum. And both extremes fail.
Raw is lossless but inert. A pile of transcripts is not the same as understanding. All the information is there, but nothing is connected, ordered, or interpreted. It remains buried in the raw material.
Derived is compact and usable, but repeated derivation causes gradual drift from the source — like making photocopies of photocopies. You don’t lose everything at once; you lose it gradually, and you can’t pinpoint exactly when the distortion began.
Would infinite context solve this?
This is the most natural objection. Context windows keep getting larger. Won’t they eventually become so large that we can skip memory systems entirely and just stuff the entire history into the prompt?
Not anytime soon, for two reasons:
-
Cost. Even if you could fit two years of conversation into a context window, you would have to pay to process that entire history on every single turn. The economics are brutal and scale linearly with history length. No consumer product can sustain that cost structure.
-
Degradation. As the context window fills up, model performance deteriorates. Attention to middle-context information drops, overall reasoning quality declines, and instruction-following becomes looser. You pay more and get worse results.
Infinite context is simply the extreme version of the Raw path. And as we’ve already established, Raw alone doesn’t work.
The Evaluation Paradox
If you want to know whether a memory system actually works, you need ground truth. But for real conversations spanning months or years, the only true ground truth is the complete history itself — which exceeds the capacity of any context window and is far beyond any human’s reasonable ability to annotate.
Benchmarks like LongMemEval can test “needle-in-a-haystack” retrieval, but retrieval is not the same as memory. Real memory must handle cases where facts change, old context is overwritten by new context, or the meaning of a conversation only becomes clear weeks later. The correct answer depends on the complete evolving arc of the relationship — an arc that is constantly shifting. No benchmark can capture that “arc.”
Synthetic datasets also fail to reproduce these real-world scenarios at scale. Coherence collapses long before conversations reach lengths that feel truly realistic. And even if it didn’t, no one could provide reliable ground truth for a synthetic relationship that evolved over a million tokens.
This is why every new memory scheme you see is essentially a particular set of trade-offs packaged as a “solution.” No one can truly prove their system works, because any “judge” you use to evaluate the full history faces the exact same context limitations as the system being evaluated.
This is the dilemma we face today
The ideal described at the beginning — a model that remembers what you said and continuously distills meaning from it over time — requires simultaneously solving both ends of the Raw/Derived trade-off: perfect preservation and perfect interpretation. Every existing approach sacrifices one or the other.
This is not a criticism of the people building these systems. It is an honest description of the constraints they are operating under. Compression is lossy. Retrieval is imperfect. And the thing we actually want — meaning that accumulates and evolves — may be one of the hardest things to formalize, because these systems are ultimately just doing pattern matching over tokens.
LLM memory remains unsolved not because people haven’t tried hard enough, but because the problem is genuinely, genuinely very hard.
We are getting closer.
But we are not there yet.
Deep Dive: How Memory Systems Are Built
“There are no solutions. There are only trade-offs.” — Thomas Sowell
Every memory system is a series of choices made across a set of core dimensions. Different products take different paths, but the dimensions themselves remain stable:
- What to store
- When derivation happens
- What triggers a write
- Where it is stored
- How it is retrieved
- Post-retrieval processing
- When retrieval occurs
- Who performs curation and filtering
- Forgetting strategy
When a new memory solution appears, you can place it on this map to clearly see what choices it made — and which problems it left unaddressed.
What Is Stored
A memory system stores either raw material, derived material, or a mixture of both.
Raw:
Derived:
This is not an exhaustive list. There can be an infinite variety of derived types; the above only shows some of the most common ones.
When Derivation Happens
Derived artifacts must be generated at a specific point in the pipeline. The timing of that generation is itself a key design decision.
What Triggers a Write
Every memory system must decide exactly when to capture something.
The write trigger sits at the very upstream. If you write the wrong thing, no matter how clever your retrieval is, it cannot be salvaged.
Where It Is Stored
The underlying storage backend constrains everything that follows.
Most real-world systems use more than one backend. A common pattern is: filesystem or document database as the source of truth, vector database for retrieval, and sometimes a graph database layered on top for relationship traversal.
How It Is Retrieved
The storage backend also constrains the retrieval strategies available.
Each strategy has its typical strengths. Semantic search excels at “find things conceptually similar to this.” Full-text search is strong at exact phrases and proper nouns. Graph traversal is ideal for “what does the system know about this entity and everything connected to it.” Filesystem navigation works well when the model is expected to actively explore.
Post-Retrieval Processing
Once you have a set of candidates, you usually need to narrow them down further.
Post-processing is often where a memory system’s perceived quality truly comes from. Cheap retrieval plus smart reranking frequently beats expensive retrieval alone.
When Retrieval Happens
There are three main patterns.
Each pattern fails in very different ways. Always-inject pollutes the context with irrelevant history. Hook-driven approaches can cover passive awareness but are expensive and may cause the model to “perform having memory” rather than truly possessing it. Tool-driven respects the model’s own judgment, but since models don’t know what they don’t know, they often fail to retrieve when they should.
Who Is Responsible for Curation and Filtering
At every decision point in a memory system, something is making choices. The question is: who (or what) is doing the choosing?
This dimension deserves to be tracked separately because each type of “curator” has a very different profile in terms of cost, quality, and accountability. Systems that let the main model handle curation pay for quality on every single turn. Systems that use cheaper models are more economical but make coarser decisions. Systems that rely on user participation tend to be more accurate, but they introduce extra friction.
Forgetting Strategies
Every memory system has a forgetting strategy, whether the designer explicitly chose one or not. The question is never “whether to forget,” but “how to forget.”
What to forget:
How forgetting propagates:
In a memory system, forgetting is rarely a simple delete operation. If you have preserved the original conversation turns and derived summaries from them, deleting the original turns will not remove those summaries. If you have extracted facts into a graph, deleting the source dialogue will simply turn those facts into “orphans.” True forgetting either requires you to track provenance relationships so you can perform cascading deletes, or demands that you periodically re-derive everything from a smaller set of raw source material—an extremely expensive process.
When forgetting occurs:
Forgetting is structurally difficult for the same reason as every other part of a memory system: when you write, you don’t know what will matter in the future; when you delete, you still don’t know what will matter in the future. Forgetting too aggressively causes the loss of context the user actually wanted to keep. Forgetting too conservatively leads to an ever-growing, increasingly hard-to-correct, and increasingly inaccurate user model. There is no universally correct setting—only trade-offs.
Common Failure Modes
Every memory system will fail. The real question is how it fails and whether that failure is recoverable. Below are the most common patterns observed in practice.
-
Session Amnesia: A new session starts with no awareness of previous sessions. The user must begin from scratch every time.
-
Entity Confusion: The model incorrectly identifies or merges different entities during derivation. Two people with the same name are treated as one, or entities from different categories bleed into each other.
-
Over-Inference: The model jumps too far, encoding exaggerated or incorrect interpretations as facts. When prompts are not careful, it fills gaps with plausible-sounding fabrications.
-
Derivation Drift: Chain-of-summary pipelines gradually amplify tiny errors. Each derivation step introduces slight loss, and these losses compound. After enough rounds, the derived memory diverges significantly from what was actually said.
-
Retrieval Misses: The system retrieves semantically similar but contextually wrong memories. The vectors are close, but the meaning is not.
-
Stale Context Dominance: Old, frequently referenced memories crowd out newer ones. The system keeps surfacing outdated context simply because it was discussed more often.
-
Selective Retrieval Bias: Retrieval only finds memories that match the current phrasing of the query. Relevant memories stored under different topics or emotional tones become invisible.
-
Information Loss from Compression: When summaries replace original conversation turns, concrete details disappear. This lossy form of compression destroys some of the most valuable information.
-
Untraceable Confidence: The system states a “memory” with complete certainty, yet there is no way to trace whether it came from an actual statement, an inference, or a hallucination. Users cannot tell if something was explicitly said, inferred, or invented.
-
Memory-Induced Bias: The system’s responses are always colored by what it already knows about you. Sometimes this is helpful, but other times you simply want an answer free from existing preconceptions.
As you can see, building a truly usable memory system is extremely complex, and almost every dimension becomes harder as the volume of information grows. I hope this map helps you clearly see the full design space, choose the right trade-offs for your product, and be explicit about which failure modes you are willing to accept.