Why RAG isn't memory
A text chunk has no subject and no validity interval, so two chunks can never disagree — and the four places a vector database's model is the wrong shape for an agent's memory.
Different units, different ceilings
RAG stores documents, split into chunks, embedded. The question it answers is "which passages resemble this query?"
A memory layer stores observations — claims about a subject, valid over an interval, traceable to where they came from. The question it answers is "what do I currently know about this subject?"
The structural claim
That last row is the whole argument, so it's worth stating precisely:
Chunk-based retrieval is structurally incapable of detecting contradiction — a text span has no subject–predicate structure to collide on.
Not "doesn't yet." Can't. The limitation is not that embeddings are imprecise — a perfect embedding model would not help, because the missing thing is a field, not accuracy. Give a vector store these two sentences:
Priya manages the billing platform team.
Priya moved to the platform team in June and no longer manages billing.Both are excellent matches for "who manages billing?" The first may well rank higher, because it's shorter, more on-topic, and contains the query terms more densely. Similarity has no opinion about which is true now. There is no embedding of recency, and no field where the second could say "I replace the first."
So the stale answer wins, and nothing in the system registers that anything went wrong.
Decompose the same sentences into (subject, predicate, object, interval) and
the collision becomes mechanical: same subject, same predicate, overlapping
intervals, different object → one supersedes the other.
What the extra fields buy, and what they cost
The typed record is not free. Against a pure-vector store it costs schema authoring and roughly 2× the metadata, and that is the honest price of entry. What it buys is four capabilities that are not "better retrieval" but different questions:
| Capability | The question it answers |
|---|---|
| Bi-temporal validity | What did I believe about Alice on 3 March? |
| Structured filters | Preferences only, confidence ≥ 0.7 |
| Entity-anchored retrieval | Tell me everything about Alice — not "about text resembling Alice" |
| Supersession vs contradiction | Did this change, or do two sources disagree? |
Every one of those is unanswerable over chunks, in the strong sense: not "answerable badly" but with no field to evaluate the predicate against. A similarity score cannot be filtered by a confidence it doesn't have, and "everything about Alice" over an embedding index means "everything that reads like Alice", which is a different set containing different people.
Four places the vector-database model is the wrong shape
The reasonable follow-up is: vector databases are evolving — why not add this on top of Qdrant, Milvus or Weaviate? They are excellent, and the answer isn't that they're deficient. It's that a memory layer built on a vector-search-first architecture is always a guest in someone else's house, in four specific ways.
The query modelsearch(vector, k, filter)That is the surface a vector database exposes. A memory layer needs
recall(cue, scope, confidence), plan(start, goal),
reason(observation) — and these don't translate into search-plus-filter
without losing structure. Confidence calibration, for instance, depends on
the salience distribution and the embedding model's own calibration:
internal facts the vector database doesn't expose because it has no reason
to.
The write modelyou bring the vectorsA vector database assumes the application already produced the embedding. Owning embedding is what makes deduplication by semantic content, automatic re-embedding on model upgrade, and text-keyed caching possible at all. Hand the vector in and all three become the application's problem — see the embedding lifecycle bill.
The consistency modelmetadata as a sidecarA memory's vector, its salience, its session and its outgoing edges have to be written and read atomically, or the agent observes incoherent intermediate states. Vector databases treat metadata as a companion to the vector rather than as co-equal state under one transaction.
The performance modelbatch vs hot pathVector databases optimise for batch ingestion and analytical queries: build a corpus, search it, refresh occasionally. Agents do single-item writes and single-cue reads on the hot path, hundreds of times a second per space. Different target, different working set, different durability needs.
None of that makes a vector database the wrong tool. It makes it the wrong top of the stack: a vector index is an excellent component underneath a memory database, which is exactly where Brain puts one.
Where the adjacent systems sit
Concretely, across the category:
Pure vector storesPinecone, Weaviate, Chroma, Qdrant, MilvusExcellent filtered ANN search with rich metadata. Their primary abstraction is the collection of vectors, so "Alice prefers dark mode" is a string with a similarity score. Memory operations, salience, decay and consolidation are out of scope by design — the cognitive layer is assembled by your application.
Text-layer memoryMem0Stores text with memory operations over it, but no typed graph — so contradiction stays structurally undetectable for the same reason it does in RAG.
Graph-backed memoryZep / GraphitiHas a graph layer, and takes an external graph database as a dependency to get it — which puts you back in the multi-store consistency problem the integration tax describes.
The distinction to hold onto isn't quality — these are good systems — it's what the primary abstraction is. When it's the vector collection, structure is something you add on top. When it's the agent's memory, the vector index is an internal detail.
The clearest test
Skip the taxonomy and ask one question about your own code:
Can you describe what you want as "top-k similar vectors with this filter"?
If yes, use a vector database — you will get a better-engineered, better-scaled version of exactly that, and a memory layer is overhead. If instead you find yourself writing scaffolding for working-memory windows, episode boundaries, salience updates, plan trees or causal traces, you have started reimplementing a memory database inside your application, and the question is only whether you finish it yourself.
Where the memory frameworks sit
The other adjacent category is agent-memory frameworks — Letta (formerly MemGPT), Mem0, LangChain, LlamaIndex. These are closest to Brain in intent and furthest in position:
- They are application frameworks, not infrastructure. They run inside the agent's process, share its resources, and lean on whatever stores you point them at. They do not own the data path.
- They target a Python-first developer experience. Brain targets a wire-protocol-first integration: a separate process, like a database, that any language can talk to.
A fair mental model: Letta and Mem0 are to Brain as SQLAlchemy is to PostgreSQL. Useful at the application layer, and what they would talk to if a substrate existed at this level.
What a chunk also can't carry
Permission. Embedding similarity is blind to authorisation. A search for "staff engineer compensation" returns the comp band document because it is a perfect semantic match, and the fact that the asker is an IC is not represented anywhere in the vector. Post-filtering doesn't save you: the data already crossed into process memory, and the retrieval budget was already spent on rows you must now discard.
Truth that varies by asker. "What's our refund policy?" has a different correct answer for a support agent and an enterprise customer. One document; several truths; no place to put the distinction.
That second one has a structural answer in a memory layer and no answer at all
in a chunk index. Identity resolution is scoped per tenant: the resolver's
name, alias and fuzzy indexes are keyed under the owning (namespace, space),
so "Priya Patel" in one tenant and "Priya Patel" in another are two
entities with two ids that can never resolve into each other. The isolation is
a property of how rows are keyed, not a filter applied after retrieval — which
is the difference between "we don't return other tenants' data" and "other
tenants' data was never a candidate.
The write side is where memory systems actually fail
A finding worth internalising before you build one of these: in a published 32-day production audit of a Mem0 deployment, 97.8% of stored memories were junk — hash duplicates, hallucinated profiles, and feedback-loop contamination where the system's own output was read back in as fact. Harvard's D3 research points the same way: aggressive pre-store filtering is essential to memory-system quality.
The lesson is not "that system is bad". It is that a memory layer's hardest problem is the write gate, not the ranker. Retrieval quality has a ceiling set by what you admitted, and no amount of fusion or reranking recovers from a store full of duplicates and self-generated claims. It is why what to write is the page in this section most likely to decide whether your deployment works.
It is also why "pass every turn through an LLM and let it decide what to save"
is a pattern Brain refuses outright rather than ships as a default. It puts a
model call on the write path — blowing the latency budget encode is held to —
and the junk rate is the problem that approach has, not the solution to it.
A tiered extractor that runs after the ack addresses the same need without
either cost.
Choosing between them
The question is rarely "which is better" and almost always "which does this corpus want":
If the right-hand column describes none of your content, you do not need a memory layer, and adding one is overhead with a maintenance cost.
Where RAG is still right
This isn't an argument against RAG. If your corpus is documentation, contracts or a knowledge base — authored content that doesn't contradict itself and isn't about a person — chunk retrieval is the correct tool and a memory layer would be overhead.
Authored content has a property observed content doesn't: somebody is responsible for keeping it consistent. When the refund policy changes, an author edits the document, and the old version stops existing. There is no contradiction to detect because the corpus never holds both. That is exactly the condition under which chunk retrieval's missing fields cost you nothing — and it is exactly the condition a conversation with a user never satisfies.
The two are complementary: RAG for what your organisation wrote, memory for what your agent learned. Most real systems want both, and Alongside your RAG is the recipe for routing between them.
In practice that means a single turn consults two sources and the prompt gets context from each: RAG over the company's documentation, which is static and bounded; memory for this agent's own accumulated state, which is dynamic and specific to one subject. They are not competing for the same slot. The routing question — is this a question about our docs, or about this user? — is usually answerable from the question alone, and where it isn't, asking both and merging costs one extra retrieval against a budget that has room for it.
What chunking itself destroys
One more thing worth separating out, because it is a property of the chunking step rather than of embeddings.
A chunk boundary is chosen by length, not by meaning. Split a transcript into 512-token windows and the sentence establishing who "she" refers to lands in chunk 4 while the claim about her lands in chunk 5. Both chunks embed fine. Neither carries the resolution, and retrieving chunk 5 alone gives you a claim with no subject.
The usual mitigations — overlapping windows, sentence-aware splitting, parent-document retrieval — all reduce the frequency and none remove the class. They are compensations for having thrown away structure that the source text had and the index does not keep.
Extraction inverts that order: resolve the referent first, attach the claim to a stable entity id, and the chunk boundary stops mattering because the subject no longer lives in a neighbouring span of text. The two sentences can be stored a year apart and still answer as one fact.
How the two are even measured
A last practical difference, and the one that catches teams migrating from a RAG mindset: the evaluation looks nothing alike.
RAG quality is an information-retrieval question — precision and recall at k
over a labelled corpus. Memory quality is a temporal-reasoning question,
and the benchmarks that exist for it reflect that: LongMemEval, LoCoMo and DMR
test whether a system answers correctly after the facts have changed, across
sessions, over time.
That matters because a system can score well on the first and badly on the second. Returning the passage most similar to the question is not the same skill as knowing that the passage stopped being true in June — and a retrieval metric computed over a static corpus cannot see the difference, because a static corpus has no June.
Try it
In the playground, run Relocation — a location fact, then a later one that replaces it. Open the Graph tab.
You'll see one subject with two claims and an explicit supersession edge between them. That edge is the thing a vector index has nowhere to put.
Then run Relocation a third time with a paraphrase of the second sentence. The memory count goes up and the claim count doesn't — which is the whole difference between an index of text and a record of what is true.
Was this page helpful?
Why a bigger window doesn't fix it
Four limits that don't go away with capacity — cost, quadratic prefill, measured attention degradation, and a flat token sequence having no structure — plus the arithmetic of the alternative.
What a memory is
Four record types — memory, entity, statement, relation — the fields each carries, the eight edges that join memories to each other, and the one modelling decision users get wrong most often.