Papers / Memory evolution / Techniques
← Memory evolution
2026-08
Drill-down companion · every technique, animated

Retrieval and memory techniques: one hundred and four mechanisms, one page.

The companion article tells the history — twelve stages, each one solving the documented failure of the stage before it. This page opens the machinery. Every technique that article cites gets the same three things here: the failure it exists to fix, an animation of how it actually works, and the cost it charges for the fix.

What this page is. An explainer for the algorithms, in the order the parent article introduces them. Every mechanism is described as the technique works in general — these are published methods with papers, not features of this project. Six of them also exist in TerranSoul’s codebase, and those carry a status chip recording what an audit of the source actually found, including three marked code only · no callers. No benchmark numbers appear anywhere on this page. Published figures are bound to their source artifacts in docs/published-numbers.json and verified by npm run docs:check-numbers; an explainer is not the place to introduce unbound ones. Parent article: The Evolution of Memory for AI Systems.
Contents · 115 sections

How to readEvery technique is a trade, and the trade is the point

A list of index and retrieval names reads like a feature set, which is the wrong mental model. Each of these exists because something before it failed in a specific way, and each buys its fix with a resource: memory, latency, training data, a second model, or accuracy itself. The what it costs paragraph under each animation is therefore the load-bearing one — it is what tells you when not to reach for the technique.

Where a technique is present in this project, a chip says so honestly. That matters because the parent article was audited in July 2026 and found to carry four overstated claims, including a module described as shipped that had zero callers, and a graph result measured against an empty edge table. The project’s rule since then — rules/no-unexercised-features.md — is that a retrieval capability no default path exercises does not ship and is not published. Three chips on this page say code only for exactly that reason.

on by default a default chat / think / research / max query reaches it · wired · default off implemented and reachable, behind a config row that ships off · code only · no callers the algorithm works and is tested; nothing in production calls it

Figures animate on a loop and are inline SVG driven only by CSS keyframes — no scripts, no SMIL, nothing fetched, so every one renders identically from a file:// URL. Each is authored so that its unanimated state is the finished mechanism rather than a blank first frame, which is what a reader with prefers-reduced-motion set, or a printed copy, will see.

Stage 1 · Lexical retrieval — 1970s–2000s

BM25BM25

Score by matched terms, but make extra repeats stop counting and make long documents count for less.

The problem

Earlier count-based ranking treated term frequency linearly, so a page repeating a word fifty times scored roughly fifty times higher than a page mentioning it once, and padding or boilerplate outranked genuine matches. Document length was unhandled as well: a long document accumulated matches simply by being long. Ranking needed a scoring function in which additional repetitions and additional length both stop paying off.

POSTINGS · ONE ROW PER TERM mars rover the IN EVERY DOC → WEIGHT ≈ 0 rare terms weigh most; a term in every document weighs nothing SATURATION score occurrences the 10th mention barely moves it and a long document is scaled down for its length RESULT short doc, rare terms long doc, repeated common terms
Only the postings rows for the query’s own terms are opened; a document appearing on none of them is never scored. Each matched term is weighted by how few documents contain it, so a term present in every document contributes essentially nothing. Additional occurrences of the same term climb steeply and then bend flat — the tenth mention barely improves on the second — and the whole contribution is scaled down in proportion to how much longer the document is than the collection average. The short document carrying rare terms finishes above the long, repetitive one.
What it costs

It can only reward words the query and the document literally share, so a passage that answers the question in different words scores zero and word order and meaning are ignored entirely. Its saturation and length knobs are corpus-dependent, and the scores they produce are comparable only inside one collection, never across two.

Stage 2 · Semantic retrieval — 2013–2021

Dense passage retrievalDense passage retrieval

Two trained encoders turn question and passage into points, so retrieval becomes nearest-point search.

The problem

Lexical scoring can only count terms the two texts happen to share, so a passage that answers the question in different words scores zero — no tuning of the saturation or length parameters closes a vocabulary gap. Earlier attempts to replace term matching with dense vectors generally lost to strong lexical baselines, leaving open whether a learned dense representation could beat term matching on retrieval accuracy at all.

TWO TOWERS · SEPARATE WEIGHTS QUESTION PASSAGE NO CROSS-ATTENTION ONE SHARED SPACE QUERY CORRECT PASSAGE nearest by inner product — the winner may share no words with the query
Question and passage are encoded by two separate towers that never see each other’s text, so every passage collapses into a single pooled point that can be computed once, offline, and frozen into an index. Training pulls the correct passage’s point toward its question and pushes the other passages in the batch away, including hard negatives mined from a lexical retriever. At query time only the question is encoded, and the nearest points by inner product are returned — which is how a passage sharing no words with the query can still be retrieved.
What it costs

Everything a passage says must survive compression into one fixed-width vector with no token-level comparison against the query, so exact names, version strings, part numbers and rare identifiers blur together. It also needs supervised question-passage training pairs, transfers poorly to domains unlike the ones it was trained on — where lexical matching often wins back — and any change to the encoder means re-embedding the entire corpus.

Matryoshka representation learningMatryoshka representation learning

Train one embedding so its first 64 numbers already work on their own, and cut the rest when you need to.

The problem

A dual encoder emits one vector at one fixed width, chosen once at training time for the hardest case, and that width is then paid on every stored vector, every distance computation and every byte of index memory — including for queries a much coarser vector would have answered. Getting a cheaper index meant training a second, smaller model or applying post-hoc dimensionality reduction that degrades accuracy. One representation could not serve both a cheap first pass and an accurate final one.

ONE EMBEDDING · NESTED PREFIXES 64 128 256 full EVERY PREFIX IS TRAINED AS ITS OWN EMBEDDING SWEEP SHORT whole index, 64 dims RERANK FULL shortlist only, all dims
A dual encoder normally emits one vector at one width, chosen for the hardest case and then paid on every stored vector and every distance computation. Matryoshka training attaches a loss to each nested prefix — 64, 128, 256 and full — so the leading coordinates are obliged to carry the general signal on their own and the trailing ones only refine it. A prefix can then be cut off and used directly, with no second model and no post-hoc reduction: sweep the entire index at 64 dimensions, then rerank the shortlist at full width.
What it costs

The nesting has to be trained in — truncating an ordinary embedding is a different operation and degrades it sharply — so this is a property of the model you picked, not a switch you can flip on the one you already have. And a short prefix genuinely is weaker than the full vector, so the cheap sweep only holds up when full-width vectors are still kept somewhere for the rerank pass, which brings back much of the storage the truncation was meant to save.

Asymmetric query/document prefixesAsymmetric query/document prefixes

Tell the encoder which role a text is playing, because a question and its answer are different kinds of text.

The problem

A dual encoder embeds the question and the passage with the same weights, though one asks and one tells. Models trained with role markers learn to place the two appropriately; without the marker at inference they are handed an input distribution they were not trained on.

SAME ENCODER, TWO ROLES query: … what did she say about document: … she mentioned that the ONE ENCODER DISTINCT ROLES a question and its answer are not the same KIND of text, and the prefix says so MEASURED, AND IT DOES NOT GENERALISE prefixes HELP the prefix-trained embedder and HURT models never trained with them
A dual encoder embeds a question and the passage answering it with the same weights, even though they are different kinds of text — one asks, one tells. Prefixing each input with its role lets a model trained that way place them appropriately in the space. It is not a free improvement: measured here, prefixes help the embedder that was trained with them and actively hurt models that never saw them, so it is a property of the specific embedder, not a general trick.
What it costs

It is a property of the specific embedder, not a general improvement. Measured here: prefixes help the model trained with them and actively hurt models that never saw them, particularly on short text — so this is a per-model calibration, and applying it blind is as likely to cost as to gain.

Hybrid searchHybrid search — sparse + dense fusionon by default

Run the lexical and the dense channel, and fuse their rankings instead of choosing between them.

The problem

Lexical retrieval cannot match a paraphrase; a pooled embedding cannot preserve an exact identifier. Each is a hard failure on the other’s home ground, and neither degrades gracefully into the other. Replacing one with the other therefore trades one blind spot for another rather than removing either.

SPARSE CHANNEL · FTS5 / BM25 exact terms, rare identifiers, version strings, error codes FAILS ON PARAPHRASE DENSE CHANNEL · EMBEDDINGS meaning, paraphrase, cross-lingual matches FAILS ON EXACT IDENTIFIERS RRF FUSION BY RANK ONE RANKING neither channel is a fallback for the other — each covers the other’s blind spot
The two retrieval channels fail in opposite directions: lexical matching cannot find a paraphrase, and a pooled embedding blurs the exact identifier that made a passage the right answer. Running both and fusing by rank keeps each one’s strength where the other is blind, which is why 2026 practice is fusion rather than replacement. This is the configuration that, on this system’s only fully-measured benchmark, produced the best rank-sensitive result — plain hybrid with RRF, beating every rung layered on top of it.
What it costs

Two indexes to build, two to keep current, and a fusion step whose behaviour depends on both. It also cannot fix a query that neither channel can serve. On this system it is nonetheless the configuration that measured best on rank-sensitive retrieval at full scale — every additional rung layered above it either tied it or cost accuracy.

Stage 3 · Approximate nearest neighbour at scale — 2016–2023

HNSWHNSW — hierarchical navigable small worldon by default

Multi-layer proximity graph: greedy hops across sparse shortcut layers, then a widened beam search at the base.

The problem

Finding the nearest embeddings to a query by brute force costs one distance computation per stored vector — O(n) per query, which at 10k+ vectors dominates retrieval latency and at millions is hopeless. HNSW replaces that full scan with a navigable graph walk that touches only a few hundred nodes, giving roughly O(log n) hops at the cost of being approximate rather than exact. The naive alternative in this repo is still present as the fallback: `MemoryStore::vector_search` degrades to loading every embedded row and cosine-scoring all of them.

LAYER 2 · SPARSE, LONG EDGES ENTRY LAYER 1 · MEDIUM LAYER 0 · EVERY VECTOR ef BEAM
Each vector draws a level from an exponentially decaying distribution, so a thin few percent are promoted into sparse upper layers that act as long-range shortcuts over the same point set. A query enters at the single top node and hops greedily to whichever neighbour is closer, dropping a layer whenever no neighbour improves — long edges first, short edges last. At layer 0 the single pointer widens into a best-first beam of width ef, stopping once the frontier’s best candidate is worse than the worst of the current top-k.
What it costs

Approximate by construction: recall is a tunable, not a guarantee, and the greedy walk can miss a true neighbour that sits behind a graph bottleneck — recall degrades as the corpus grows unless ef_search is raised, which trades latency back. The graph must be resident (RAM or mmap) and carries a per-vector edge overhead of roughly M*2 links on top of the vectors themselves, so memory grows linearly with n and there is no cheap on-disk-only mode. Deletion is a tombstone, not a repair: removed nodes leave dangling structure that fragments traversal until a compaction/rebuild (tracked here as `fragmentation_ratio`, ann_index.rs:773). Inserts are relatively expensive (each one runs its own ef_construction-wide search), and the index cannot apply attribute filters during traversal — any predicate must be applied after the k results come back, so a highly selective filter can return almost nothing.

In TerranSoul

On the default path for every mode — the shipped desktop build compiles the native ANN feature and candidate generation for chat, think, research and max all reach the same per-shard index. One honest caveat from the audit: the seeded ann.hnsw.expansion_* config rows are inert, because every production call site passes the hard-coded defaults instead. Behaviour is unchanged — the seeded values equal those defaults — but the rows do nothing.

Why HNSW and not IVF-PQ — and why not both. Per shard it is strictly either/or: the code takes the IVF-PQ branch when that shard’s on-disk index exists and HNSW otherwise, never both. Running both would not help, and the reason is the sharpest distinction on this page. Sparse and dense retrieval fuse well because they fail in opposite directions — lexical cannot match a paraphrase, a pooled vector blurs an exact identifier — so each covers the other’s blind spot. HNSW and IVF-PQ have no such complementarity: they answer the same question over the same vectors, nearest neighbours in one embedding space. They mostly agree, and where they disagree IVF-PQ is usually the wrong one, because it is strictly lossier — it discarded the float vectors for byte codes and never opened some cells. Enabling both would mean building and maintaining a second index and doubling query work, to receive candidates that are a lossy subset of what HNSW already returned.

HNSW dominates at this corpus size because it keeps full f32 vectors, and its one real cost — memory growing linearly with the corpus — is affordable at roughly a thousand memories per shard. Bounding that cost is IVF-PQ’s entire value proposition, so the crossover arrives when a shard outgrows RAM; only then do its two approximations start earning their keep.

Shard routerShard routeron by default

Searches a tiny index of sampled embeddings to decide which few of 15 shards deserve a full ANN probe.

The problem

The corpus is partitioned into 15 shards (3 memory tiers x 5 cognitive kinds), each with its own ANN index. Without a router, every query must open and search all 15 indexes and merge 15 ranked lists, so cost scales with shard count rather than with relevance — even though for a typical query almost all shards contain nothing near the query vector. The router replaces that fan-out with one search over a ~175-vector index that predicts the 2-3 shards worth probing.

QUERY CENTROID INDEX · ~1% SAMPLE top-5 centroids → read tags → dedupe SHARDS · ONE ANN INDEX EACH 2–3 shards probed; the rest never opened FALLBACK · ROUTER EMPTY OR STALE → PROBE ALL
Sharding only pays off if a query can skip most shards. Walking each shard’s embeddings with a stride keeps roughly one vector in a hundred as a centroid tagged with the shard it came from, and all the tags go into a single small index — a few hundred vectors rather than the whole corpus. A query searches only that index, takes its nearest centroids, reads their shard tags and dedupes them to a handful of distinct shards, which are the only ones a real ANN search opens. If the router is missing or stale, the system falls back to probing everything.
What it costs

It is lossy pruning with no downstream recovery: any shard not selected contributes zero candidates, so a true nearest neighbour living in an unselected shard is silently lost — no error, just missing recall. The "centroids" are not k-means centroids either; they are a deterministic every-100th-vector sample tagged by source shard, so a small or oddly-distributed shard can be under-sampled and never win a vote (the repo's own live router has just 2 centroids for long__judgment vs 109 for long__semantic). Because top-p is over centroids, not shards, dedup can return fewer shards than intended. And the pruning assumes each selected shard actually has a searchable index: the disk IVF-PQ path had to abandon routing entirely and probe all 15 shards (store.rs:8695-8703) after the router picked [procedural, episodic] while the only IVF-PQ index lived in semantic, producing R@10 = 0.

In TerranSoul

On the default path, with no feature flag on the chain, and with the staleness fallback as its safety net. Worth stating alongside: a Terminal-Bench audit found the isolated bench store had an empty router and no ANN indexes at all, so at that corpus size the exact-scan fallback was doing the work. The loss there was the scale claim, not recall.

The scaling factor — why the index that wins at a million loses at a billion

The choice between flat, HNSW and IVF-PQ is not a matter of taste; each one has a different exponent, and the exponents cross. Naming the winner without naming the scale is the most common way this decision is got wrong.

0 ms 10⁴ 10⁵ 10⁶ 10⁷ 10⁸ corpus size (vectors, log scale) HNSW overtakes flat IVF-PQ wins on MEMORY, not latency flat / brute force HNSW IVF-PQ
Query latency is the axis everyone plots, and it is the wrong one for choosing between HNSW and IVF-PQ. The decisive axis is memory.

Query cost. Flat search is O(N·d) — every vector, every dimension, every query. HNSW is O(M·d·log N): the greedy descent takes a number of hops that grows with the logarithm of the corpus, and each hop scores about M neighbours. IVF-PQ is O((N/nlist)·nprobe·m): you scan nprobe of nlist cells, and inside a cell each comparison is a table lookup over m sub-quantisers rather than a d-dimensional dot product.

Memory cost, which is the one that actually decides. At 768 dimensions in float32:

IndexBytes per vectorAt 1M vectorsAt 100M vectors
Flatd × 4 = 3,0723.1 GB307 GB
HNSWd × 4 + M × 4 × 1.5 ≈ 3,168 (M=16)3.2 GB317 GB
IVF-PQm = 96 (m=96, 8 bits each)0.1 GB9.6 GB

That is the scaling factor in one number: HNSW costs about 32× the memory of IVF-PQ per vector, and it stores the full-precision vector, so its footprint tracks flat search almost exactly. The graph links are cheap — roughly 3 % overhead at M=16. The vectors are not. HNSW does not compress anything; it only changes which vectors you visit.

So the crossover is not about speed. Both indexes answer in single-digit milliseconds across the whole range plotted above. The question is whether the full-precision corpus fits in RAM:

Build cost is the asymmetry that decides it for a memory system. HNSW builds incrementally: inserting one vector is O(M·d·log N) and needs no global knowledge. IVF-PQ must first train — k-means over a sample to fix the coarse centroids, then a product-quantisation codebook per sub-space — and that training encodes the data distribution at training time. A memory system whose corpus grows continuously and shifts in topic therefore pays IVF-PQ a recurring retraining cost that HNSW simply does not have. For a corpus of this system's size the compression buys nothing it needs, and the retraining costs something it cannot easily pay, which is why the code has an IVF-PQ implementation and no on-disk IVF-PQ index.

IVF-PQIVF-PQ — inverted file with product quantizationcode only · no callers

Partitions vectors into k-means cells and compresses each to a few bytes, so a query scans only a few cells.

The problem

Exact nearest-neighbour search compares the query against every stored vector at full precision: at 1M docs x 768 float32 dims that is ~3 GB resident and ~768M multiply-adds per query. IVF-PQ attacks both costs at once — an inverted file skips most of the corpus (only nprobe of nlist cells are visited), and product quantization replaces each float vector with a handful of centroid IDs (768 floats = 3072 B becomes ~96 B), so the surviving candidates are scored by table lookup instead of arithmetic. The price is that both the skipping and the compression are lossy, so results are approximate.

COARSE CELLS · K-MEANS QUERY nprobe cells opened; the rest never touched RESIDUAL → SUBSPACES → BYTES v − centroid 0x2E0xA1 0x070xC4 one byte per subspace · the float vector is discarded distance = sum of table lookups, no float maths
K-means produces coarse centroids and every vector is filed into the inverted list of its nearest one. Each vector is then replaced by its residual — itself minus its own cell’s centroid — which collapses all cells onto a common origin so one shared codebook describes them all. The residual is cut into contiguous chunks, each snapped to the nearest of 256 centroids in that subspace’s codebook, and the float vector is discarded in favour of one byte per subspace. At query time only the nearest nprobe cells are opened, and each candidate’s distance is a sum of precomputed table lookups.
What it costs

Doubly lossy, and the two losses compound. A true neighbour sitting in a cell that nprobe did not open is unrecoverable at any later stage — the recall ceiling is fixed by nprobe/nlist, not by re-ranking — and PQ codes discard the residual detail, so distances within an opened cell are only approximate and near-ties get mis-ordered. It also needs an offline training pass over a sample (this implementation caps at 100k vectors, 20 Lloyd iterations) and has no cheap incremental insert: as the corpus drifts away from the trained centroids, cells go lopsided and recall decays until the whole index is retrained and re-encoded. Finally the embedding dim must be divisible by pq_m, which constrains parameter choice (build errors out otherwise).

In TerranSoul

Wired, and never reached — but not for the reason a config flag would suggest. vector_search prefers a shard’s IVF-PQ index over HNSW when the on-disk index file exists, and nothing in normal operation ever builds one: the builder is reachable only through an explicit desktop command, and no index file exists in either store. So every query falls through to the HNSW branch. That is a scale decision rather than an oversight — the code calls IVF-PQ “the billion-scale path”, because HNSW’s cost grows with shard size while IVF-PQ’s stays bounded by nprobe. At roughly a thousand memories per shard that trade is backwards: IVF-PQ would add two independent approximations (cells never opened, plus lossy codes) and a k-means training step, to save memory this corpus does not need. It is dormant infrastructure for a corpus size this deployment does not have. Separately, the hybrid path used by chat and the thinking modes has no IVF-PQ branch at all.

DiskANNDiskANN — keeping the graph on SSD

The graph and full vectors live on SSD; RAM keeps compressed copies to steer the walk and disk reranks.

The problem

In-memory graph indexes like HNSW and NSG reach a good neighbourhood in a handful of hops, but the entire graph plus every full-precision vector has to be resident in DRAM — at billion scale that is hundreds of gigabytes, so one machine holds only a slice of the corpus and the index must be sharded across a cluster. The alternative that did fit in RAM was to quantize every vector hard enough to shrink the index, which discards exactly the precision needed to separate a true nearest neighbour from a near-miss, capping recall. Neither option delivered high recall at billion scale on a single node.

RAM · COMPRESSED VECTORS PQ CODES · CHEAP, APPROXIMATE SSD · VAMANA GRAPH + FULL VECTORS LONG EDGES KEEP THE DIAMETER SMALL EACH HOP RANK BY PQ IN MEMORY ONE SSD READ FOR THE NEIGHBOURS RERANK SURVIVORS WITH FULL VECTORS
A graph index that must be resident caps the corpus at what fits in RAM. DiskANN splits the structure: a Vamana graph built with deliberately long edges — which keeps the graph’s diameter small and therefore the number of hops low — lives on SSD alongside the full-precision vectors, while only compressed codes stay in memory. Each hop ranks candidates using the cheap in-memory codes and spends a single SSD read fetching that node’s neighbours, so the number of random reads tracks hops rather than corpus size, and the surviving shortlist is rescored against the full vectors at the end.
What it costs

Every expansion round is an SSD round trip and each hop depends on the previous one, so latency is set by disk seeks rather than compute and the drive idles between rounds — widening the beam buys recall by spending more I/O per query. Navigation still runs on lossy codes, so reranking can only reorder what the walk actually visited, and the on-disk layout is a static build: inserts and deletes need a rebuild or a separate merge process.

RaBitQRaBitQ — quantization with an error barcode only · no callers

Compresses each vector to B bits per dimension, then unbiases the similarity estimate with a stored per-vector correction factor.

The problem

A million 768-dim float32 embeddings are ~3 GB, so an exact scan is memory-bandwidth-bound and cannot stay resident. Classic binary/product quantization shrinks that 32x but gives a biased, unbounded distance estimate — you only find out it mis-ranked by re-reading the full vectors, so systems over-fetch a large candidate pool "just in case". RaBitQ makes the estimate provably unbiased with a concentration bound per vector, so the search can prune on a real interval instead of a heuristic pool multiplier.

CENTER · NORMALIZE · RANDOM ROTATION CODEWORD ON THE B-BIT GRID ESTIMATE · BOUND · PRUNE worsebetter k-TH BEST whole interval below → pruned untouched survives → exact rerank error concentrates as O(1/√D): tight at 768 dims, loose at 32
Each vector is centred on its cluster centroid and rescaled onto the unit sphere, then one shared random orthogonal transform spins every vector so no coordinate is privileged. Each rotated coordinate drops its float for a B-bit integer and the vector jumps to the grid codeword with the largest inner product. One float per vector is kept — the cosine between the true vector and its codeword — and dividing the cheap codeword-query product by it turns a biased estimate into an unbiased one. An error bar of order 1/√D is drawn around each estimate, and any candidate whose entire interval falls below the current k-th best is discarded without ever being reconstructed.
What it costs

The guarantee is probabilistic and dimension-dependent: the estimator is unbiased with error concentrating as O(1/sqrt(D)), so it is excellent at 768+ dims and weak in low dimension, and it bounds the estimate rather than eliminating error. Getting exact top-k still requires reranking survivors against full-precision vectors, so the original floats must remain on disk — the saving is on the hot in-memory index, not on total storage. The random rotation costs O(D log D) per query and destroys coordinate sparsity and interpretability, and the per-vector factors add roughly one to two floats of overhead per vector, which is material at B=1 where the code itself is only D bits. Finally it compresses each vector but does not reduce how many vectors are scanned, so it must be layered on IVF or HNSW to avoid a full scan.

In TerranSoul

No production caller exists anywhere in the repo. The implementation is real and tested; nothing invokes it. Under rules/no-unexercised-features.md that leaves three lawful futures — wire it and bench it, delete it, or bench it first — and until one happens it is not a capability of this system.

TurboVecTurboVec — sub-byte codes, full-precision querycode only · no callers

Rotates each embedding, packs it to 2- or 4-bit codes, and scores those codes against a full-precision query.

The problem

A 768-dim float32 embedding costs 3 KB, so a million-memory corpus needs ~3 GB of RAM just to hold vectors the brute-force scorer must touch on every query. Keeping them as f32 makes the index bigger than the machine's cache and often bigger than its memory budget. TurboQuant shrinks each vector 16x (4-bit) or 32x (2-bit) so the whole index stays resident and each comparison reads bytes instead of floats — trading a few points of recall for the memory footprint.

1 · WHITEN lopsided → unit variance 2 · HADAMARD ROTATE energy spread evenly 3 · ±3σ WINDOW Welford, online 4 · PACK 2-bit 4 dims per byte ASYMMETRIC SCORING query: FULL f32 × stored code → expanded to bin centre on the fly every live entry still scanned — a footprint win, not an ANN speedup
Each coordinate is optionally whitened to unit variance, then multiplied by a fixed seeded sign pattern and passed through an in-place Walsh–Hadamard transform, which spreads the vector’s energy evenly so no single dimension dominates the rounding. A running Welford update tracks per-dimension mean and variance and snaps a ±3σ window around them; each coordinate’s position in that window is rounded to one of four or sixteen levels and bit-packed several dimensions to a byte. The query stays full-precision through the same path and each stored code is expanded back to its bin centre as it is scored — the asymmetry that keeps the ranking usable at two bits.
What it costs

It compresses the comparison, not the candidate set: search still dequantizes and dots every live entry, so query cost stays O(N x dims) — this is a memory-footprint win, not an ANN speedup, and it has no graph or inverted-list pruning. Quantization is lossy (documented as roughly 97% recall@10 at 4-bit and 93% at 2-bit, and those figures are inherited from upstream, not measured here). Because the codebook is learned online, the +/-3-sigma bounds shift with every insert while already-packed codes are never re-encoded, so old entries are decoded against newer bounds and accuracy silently drifts until the index is rebuilt. The FWHT also pads to the next power of two and then truncates back to `dims` (1024 -> 768 for a typical embedding), which discards part of the transform and makes the rotation non-orthogonal at non-power-of-two dimensionality.

In TerranSoul

No callers. A repo-wide search finds the type in exactly two places: its own module definition and its own tests. It appears in the parent article’s Stage 12 coverage row, which is where that row and this chip need reconciling.

Stage 4 · Knowledge graphs — 2001–2010s

Typed-edge traversalTyped-edge traversal

Facts stored as typed, directed edges between entities, so a multi-hop answer is a walked path.

The problem

Vector search scores a passage by how similar it is to the query, which breaks on questions whose answer spans two facts. The bridging fact — that the company she works for was acquired by someone else — is not topically similar to the question that needs it, so it never enters the top-k. And a similarity index returns text, not composable relations: nothing it stores says how two retrieved passages connect, so there is nothing to chain.

FLAT SIMILARITY QUERY returns things that RESEMBLE the query TYPED EDGES SHE EMPLOYER ACQUIRER WORKS AT ACQUIRED BY two typed hops — and the walk IS the derivation
Nearest-by-similarity returns things that resemble the query, which cannot answer a question whose answer is two relations away. Typed edges let the same question be walked one relation at a time: the entity is located, an outgoing edge of the right type is followed, then another. The path that reaches the answer is also its explanation, which a similarity score never is.
What it costs

The graph has to be built and kept true, and traversal amplifies errors rather than tolerating them: one hallucinated edge or one unresolved duplicate entity yields a wrong answer that arrives with a convincing derivation attached. The relation vocabulary is also fixed before the questions are asked, so a fact the schema has no type for is invisible to the walk no matter how plainly the source text stated it — and because branching grows with each hop, real systems cap depth and prune, silently discarding the longest derivations.

GraphRAGGraphRAG — hierarchical communities

Cluster the entity graph into nested communities, summarize each, and route whole-corpus questions there.

The problem

Typed-edge traversal only works when the question hands you somewhere to start. Ask something about the corpus as a whole — what themes run through it, how two bodies of work relate — and there is no entity to anchor to and no single path that constitutes the answer, because the answer is a property of the collection rather than of any node in it. Plain top-k retrieval fails the same question for the same reason: no chunk contains the answer, so retrieving the best chunks retrieves nothing useful.

ENTITY GRAPH LEIDEN → NESTED COMMUNITIES SUMMARY PER COMMUNITY ROLL-UP OF BOTH WRITTEN ONCE, AT INDEX TIME QUERY ROUTING LOCAL · NARROW Q → ENTITY NEIGHBOURHOOD GLOBAL · “WHAT ARE THE THEMES?” → SUMMARIES a corpus-wide question is answered from summaries, never by reading every chunk
Retrieval over chunks can answer “what does this document say about X” but not “what are the themes across the whole corpus”, because no chunk contains the answer. GraphRAG extracts an entity graph, partitions it into nested communities with a clustering algorithm, and has the model write a summary of each community — and of each community of communities — once, at index time. A narrow question routes to a local entity neighbourhood; a corpus-wide question is answered by reading the summaries instead of the corpus.
What it costs

The hierarchy is a precomputation, not a lookup: an LLM call per chunk to extract entities and relations, plus a generated summary for every community at every level, all of which must be rebuilt or incrementally patched whenever the corpus changes. And a global query is not one retrieval but one LLM call per community summary in the map stage, so answer cost scales with the size of the partition rather than with the question — while the partition itself was computed without knowing the question, so a query that cuts across communities is answered from summaries written for another purpose, and detail already compressed out of a summary cannot be recovered at query time.

Stage 5 · Retrieval-augmented generation — 2020–2024

RAGRAG

A small evaluator grades the retrieved documents and routes them to refinement, to web search, or to both.

The problem

Self-critique tells the system its evidence is bad but leaves it nowhere better to go: the corpus is static, so once every retrieved document is marked irrelevant the only moves left are answering from parametric memory or abstaining. It also grades at whole-document granularity, so a document judged relevant enters the prompt with all its surrounding irrelevant text attached, diluting the signal it was retrieved for. And it needs the generator itself instruction-tuned to produce the critique, which is not available for an off-the-shelf model.

QUESTION FROZEN MODEL RETRIEVE k FROM THE CORPUS PREPEND AS CONTEXT ANSWER WEIGHTS NEVER CHANGE new knowledge arrives by editing the corpus, not by retraining the model is conditioned, not taught — which is the whole point, and the whole limit
A frozen model knows only what its weights encode, and updating that means retraining. RAG changes the question from “what does the model know” to “what can it be shown”: the question retrieves a handful of passages, those passages are prepended as context, and the model answers conditioned on them. Knowledge is then updated by editing the corpus. The model is conditioned rather than taught — which is the mechanism’s advantage and its ceiling.
What it costs

Everything hinges on a small external evaluator that must be fine-tuned, plus two thresholds set empirically and re-tuned per dataset — and a misgrade propagates silently in both directions: a bad set labelled Correct gets refined and handed over as if trustworthy, while a good set labelled Incorrect triggers a needless web round trip. The corrective fallback also trades a curated corpus for the open web, adding latency, per-query cost, an external dependency and unvetted content, and nothing in the loop checks the finished answer against the evidence that produced it.

HyDEHyDE — hypothetical document embeddings

Ask the model to write the answer it expects, then search with that text's vector instead of the query's.

The problem

RAG's retrieval step compares the query's vector directly against document vectors, but a short question and the long passage that answers it share almost no surface form, so their embeddings are not naturally close. The usual fix is supervised relevance labels that teach an encoder the query-to-document mapping — labels a fresh corpus, a niche domain, or a new language does not have. Without them, zero-shot dense retrieval lands in the wrong neighbourhood.

THE GAP q: “why did it stall?” doc: “throughput collapsed because…” A QUESTION AND ITS ANSWER LOOK DIFFERENT HyDE MODEL WRITES A FAKE ANSWER EMBED IT SEARCH WITH THE ANSWER'S VECTOR, NOT THE QUESTION'S the hypothetical document is never shown to the user and need not be factually true — it only has to land in the right neighbourhood of the embedding space.
A question and the passage that answers it are written differently, so embedding the question searches from the wrong place in the space. HyDE has the model draft a hypothetical answer first, embeds that, and searches with it. The draft is never shown to anyone and does not need to be factually correct — it only needs to land in the right neighbourhood, because a wrong answer about the right subject still has the vocabulary and shape of the documents worth finding.
What it costs

It spends a full language-model generation before retrieval even begins, so every query pays that latency and cost. It also assumes the model can plausibly imagine the shape of the answer: for a private corpus, an unfamiliar entity, or in-house jargon it has never seen, the invented passage drags the search vector into the wrong region and retrieval gets worse than simply searching with the plain query. The false details are filtered only by the embedding bottleneck, which is a soft filter, not a guarantee.

Reciprocal rank fusionReciprocal rank fusion

Merge ranked lists using rank position alone, so retrievers with incompatible scores can be combined.

The problem

Neither retrieval channel is sufficient alone — lexical search misses paraphrase, dense search misses exact identifiers, version strings and part numbers — so you want both lists. But their scores are not comparable: BM25 is unbounded and corpus-dependent while cosine similarity sits in its own range with its own distribution, so score-based fusion needs a normalisation that must be re-tuned per corpus and that one blown-up score can dominate. Learning fusion weights instead requires training labels.

CHANNEL A · LEXICAL 1. doc-7 2. doc-3 3. doc-9 SCORES: 14.2, 9.8, 8.1 CHANNEL B · DENSE 1. doc-3 2. doc-4 3. doc-7 SCORES: 0.83, 0.81, 0.78 FUSE BY RANK, NOT SCORE 1 / (k + rank) doc-3 · ranked 2 and 1 doc-7 · ranked 1 and 3 doc-4 14.2 and 0.83 are not comparable quantities — their RANKS are
Two retrieval channels return scores on incompatible scales: a lexical score of 14.2 and a cosine of 0.83 cannot be added, and normalising them requires assumptions about distributions that shift per query. Reciprocal rank fusion discards the scores entirely and uses only position, summing 1/(k+rank) across channels. A document ranked respectably by both channels beats one ranked first by a single channel, and the constant k damps the influence of the very top positions so one confident channel cannot dominate.
What it costs

Throwing away the scores throws away confidence: a retriever that is emphatically certain counts for exactly as much as one that is nearly indifferent, and every list carries equal weight unless you re-introduce weights by hand. The k = 60 constant is the value used in the original experiments rather than something derived from your data, and it flattens the top of each list, so one system that is uniquely right about a hard query can be outvoted by two that agree and are wrong. Documents that fell past a list's cutoff contribute nothing, which quietly makes the result depend on how deep each list was taken.

Maximal marginal relevanceMaximal marginal relevance

Pick results one at a time, subtracting how similar each candidate is to what you already picked.

The problem

Every step up to here scores each document independently against the query, so nothing stops the top of the list filling with passages that say the same thing. When only a handful of slots reach the context window, near-duplicates spend them: the second, third and fourth results add almost no new information, and the other facets of the question never appear at all.

RANKED BY RELEVANCE ALONE QUERY FOUR NEAR-DUPLICATES MMR · GREEDY, WITH A PENALTY each pick is penalised by its similarity to what is ALREADY chosen same relevance, more of the answer — at the cost of a knob nobody can set from first principles
Ranking by relevance alone fills the whole result set with the same fact restated, because near-duplicates all score well against the query. MMR selects greedily: at each step it picks the candidate maximising relevance to the query minus a weighted similarity to everything already selected, so the second copy of an idea is penalised precisely for resembling the first. The set covers more of the answer at the same relevance — at the cost of a λ that trades the two and cannot be derived from first principles.
What it costs

It is greedy and myopic: each slot is filled locally and never revisited, so the chosen set is not the best set. The penalty is blind to why two passages resemble each other, so when the correct evidence genuinely is repeated — corroborating sources, or several golds restating one fact — MMR evicts exactly the passages the answer needed and diversity actively costs accuracy. Lambda is a hand-set constant with no principled per-query value, and the pairwise comparisons add work on top of plain ranking.

RerankingReranking — the rung that was rolled backwired · default off

A model rescores the retrieved candidates before the answer is written. Measured here: it lost.

The problem

Similarity ranks by resemblance, and resemblance is not answer-bearingness. The obvious fix is to have a model read each candidate against the query and reorder them, which is what every managed retrieval product added between 2024 and 2026. It is also the technique this system put on its <code>think</code> mode and then removed.

RETRIEVE → RERANK → ANSWER HYBRIDTOP-20 LLM JUDGE SCORES EACH CANDIDATE REORDERED ANSWER WHY IT LOST ON MULTI-GOLD QUESTIONS BEFORE g1 g2 g3 three golds, already ranked AFTER g1 judge scored TOPICAL relatedness → secondary golds demoted
A judge model rescores the retrieved candidates before the answer is written, on the assumption that a model reading each candidate against the query ranks better than a similarity score. Measured on this system it did not: the judge scores topical relatedness rather than answer-bearingness, so on a question with several gold passages it demotes the secondary golds that plain hybrid retrieval had already placed correctly. Since 324 of LongMemEval-S’s 500 questions are multi-gold, that mechanism dominates — and the rerank was removed from think’s retrieval path on 2026-08-02.
What it costs

Measured negative on this system, twice, and the mechanism is understood rather than mysterious: the judge scores <em>topical relatedness</em>, so on a question with several gold passages it demotes the secondary golds that plain hybrid retrieval had already ranked correctly. 324 of LongMemEval-S’s 500 questions are multi-gold, so that failure dominates the average. It also costs a model call per candidate. Removed from <code>think</code>’s retrieval path on 2026-08-02; <code>think</code> and <code>chat</code> now call the same function and cannot produce different orderings.

Contextual retrieval, late chunking, parent-childContextual retrieval, late chunking, parent-child

Three ways to stop a fixed-size split from severing text from the context that gives it meaning.

The problem

Chunking at a fixed size cuts sentences away from their subject, so the chunk both retrieves badly and reads as a fragment when it does. Every downstream stage inherits the loss, and no reranker can restore context that was discarded at ingest.

NAIVE FIXED-SIZE CHUNKS A SENTENCE’S SUBJECT ENDS UP IN THE PREVIOUS CHUNK CONTEXTUAL · LATE · PARENT-CHILD 1 · CONTEXT PREPENDED AT INGEST 2 · EMBED THE WHOLE DOC, SPLIT AFTER 3 · MATCH SMALL, RETURN THE PARENT CHILD PARENT RETURNED TO THE GENERATOR the precise unit does the MATCHING; the larger unit does the ANSWERING.
Splitting a document at a fixed size cuts sentences away from the context that makes them meaningful, and the resulting chunk retrieves badly or reads as a fragment. Three techniques attack it from different sides: contextual retrieval prepends a generated description of where the chunk sits before embedding it; late chunking embeds the whole document first and splits the token embeddings afterwards, so every chunk’s vector was computed with the full document in view; and parent-child resolution matches on the small precise unit but returns its larger parent to the generator — the split that matches best is rarely the span that answers best.
What it costs

All three cost at ingest. Contextual retrieval needs a model call per chunk; late chunking needs the whole document to fit the encoder’s window, which caps document size; parent-child resolution returns more tokens than it matched, spending context budget to buy coherence. On this system they are built but not benchmarked — recorded as such rather than claimed.

Stage 6 · Agentic and corrective RAG — 2023–2026

Self-RAGSelf-RAG

The model emits control tokens that decide when to retrieve, then grades the passages and its own sentences.

The problem

Plain RAG retrieves a fixed number of passages for every input, whether or not the question needs outside evidence, and pastes them into the prompt unconditionally. Nothing between the retriever and the reader asks whether a passage is relevant, and nothing afterwards asks whether the sentence just written is actually carried by that passage — so irrelevant context degrades the answer and a citation can be attached to a claim the cited text never made. The pipeline is equally fluent in both cases and emits no signal about which happened.

GENERATION, INTERRUPTED BY ITS OWN TOKENS PROMPT [RETRIEVE?] PASSAGE [RELEVANT?] DRAFT [SUPPORTED?] NO RETRIEVAL NEEDED a question the weights already answer skips retrieval entirely UNSUPPORTED DRAFT critique fails → regenerate or retrieve again the critic is the same model, emitting reflection tokens inline
Always retrieving is wasteful for questions the weights already answer, and always trusting what comes back is worse. Self-RAG trains the model to emit reflection tokens inline: one deciding whether retrieval is needed at all, then, per passage, whether it is relevant, and finally whether the draft it produced is actually supported by it. Failing the critique sends the generation back for another attempt. The critic is the same model, so there is no second system to host — and no independent check either.
What it costs

The reflection tokens have to be trained in — the generator is fine-tuned on a corpus that a separate critic model annotated offline — so this is not something you bolt onto a frozen or API-only model, and each segment now costs K parallel continuations plus a scoring pass instead of one forward pass. And the grader is the model grading itself at segment level: a "fully supported" tag is a prediction about the passage, not a check against it, so a segment carrying one fabrication among several correct statements can still clear the gate.

CRAGCRAG — corrective RAG

A small evaluator grades the retrieved documents and routes them to refinement, to web search, or to both.

The problem

Self-critique tells the system its evidence is bad but leaves it nowhere better to go: the corpus is static, so once every retrieved document is marked irrelevant the only moves left are answering from parametric memory or abstaining. It also grades at whole-document granularity, so a document judged relevant enters the prompt with all its surrounding irrelevant text attached, diluting the signal it was retrieved for. And it needs the generator itself instruction-tuned to produce the critique, which is not available for an off-the-shelf model.

RETRIEVE TOP-k PASSAGES LIGHTWEIGHT EVALUATOR SCORES THE RETRIEVAL CORRECT → REFINE, USE AMBIGUOUS → BOTH WRONG → WEB SEARCH DECOMPOSE – FILTER – RECOMPOSE a passage is cut into strips; only the relevant strips survive
A retriever that returns the wrong passages hands the generator confident, irrelevant context. CRAG puts a lightweight evaluator in front of generation that grades the retrieval as correct, ambiguous or incorrect, and branches: correct passages are refined by cutting them into strips and keeping only the relevant ones; incorrect retrieval falls back to web search rather than proceeding; ambiguous takes both paths. The evaluator is small and separate from the generator, so the failure it catches is retrieval failure specifically.
What it costs

Everything hinges on a small external evaluator that must be fine-tuned, plus two thresholds set empirically and re-tuned per dataset — and a misgrade propagates silently in both directions: a bad set labelled Correct gets refined and handed over as if trustworthy, while a good set labelled Incorrect triggers a needless web round trip. The corrective fallback also trades a curated corpus for the open web, adding latency, per-query cost, an external dependency and unvetted content, and nothing in the loop checks the finished answer against the evidence that produced it.

AbstentionAbstention

Make “I don’t know” a valid output, so weak evidence stops producing confident sentences.

The problem

A generator handed poor context still writes fluently. That is what turns a retrieval miss into a wrong answer delivered with the same confidence as a right one — the failure that makes RAG systems untrustworthy rather than merely imperfect.

ALWAYS ANSWER CONFIDENT SENTENCE, NO SUPPORT WEAK EVIDENCE STILL PRODUCES A FLUENT ANSWER ABSTAIN ON A THRESHOLD τ SAY SO ANSWER, WITH CITATIONS “I DON’T KNOW” IS A CORRECT OUTPUT the threshold is the whole design: too high and the system refuses work it could do, too low and abstention stops meaning anything. It cannot be derived, only tuned.
A generator handed weak evidence still produces a fluent, confident sentence — the failure that makes retrieval errors dangerous rather than merely unhelpful. Abstention makes "I don’t know" a valid output: below a support threshold the system declines instead of answering. The mechanism is simple and the threshold is the entire design, because it cannot be derived from first principles — set too high the system refuses work it could have done, too low and abstaining stops carrying information.
What it costs

The threshold is the whole design and cannot be derived. Too high and the system declines work it could have done; too low and abstaining stops carrying information. It also needs a support signal to threshold <em>on</em>, which is usually a judge — inheriting that judge’s failure modes.

Stage 7 · Observability and evaluation — 2023–2025

LLM-as-a-judgeLLM-as-a-judge

Have a model grade outputs, because string-overlap metrics score the wrong thing.

The problem

Exact match, BLEU and ROUGE score surface overlap, so a correct answer in different words fails and a fluent wrong one passes. Once systems generate free text, the metric stops measuring the quality anyone cares about, and human grading does not scale to every run.

WHAT IT REPLACES exact match / BLEU / ROUGE SCORES STRING OVERLAP, NOT CORRECTNESS THE JUDGE QUESTION ANSWER EVIDENCE MODEL EMITS A GRADE THE FAILURE MODES, MEASURED SCORES CORRECT RECALL AS HALLUCINATION WITHOUT THE CONTEXT RELIABLE (AGREES WITH ITSELF) YET NOT VALID PARTIAL COVERAGE IS A BIASED SAMPLE, NOT A WEAK SIGNAL SO: FAIL OPEN. A JUDGE MAY PROMOTE, NEVER VETO — AND GATE ON COVERAGE
Automatic metrics score string overlap, so a correct answer phrased differently fails and a fluent wrong one passes. An LLM judge reads question, answer and evidence and grades — which works, and brings its own failures: it marks correct recall as hallucination when the memory context is withheld, it can be highly self-consistent while still not measuring the thing you wanted, and scoring only part of a set is a biased sample rather than a weak signal. The discipline that follows is to let a judge promote but never veto, and to gate on coverage rather than on all-or-nothing agreement.
What it costs

The judge is a model, so it inherits model failure modes and adds its own. Measured here: it scores correct recall as hallucination when the memory context is withheld from it, and reliability is not validity — a judge can agree with itself across runs while still not measuring what was intended. Partial coverage is the subtle one: scoring only some of a set is a <em>biased</em> sample, not a weak signal, and promoting those few over the rest measurably damaged results. The discipline that follows is fail-open — a judge may promote, never veto — plus a coverage floor.

Stage 8 · Two-way agent memory — 2023–2026

MemGPTMemGPT — OS-style memory paging

The model calls functions to move its own memory between a fixed window and outside storage.

The problem

A fixed context window with a rolling summary silently discards whatever falls off the end, and the eviction policy lives outside the model — it cannot say "keep this" or ask for a dropped turn back. Retrieval-augmented alternatives fetch once, before generation, on a query the pipeline chose; if that single fetch misses, the model has no second attempt and answers from what it happens to be holding. MemGPT's premise is that the model itself is the only component that knows what it is missing.

MAIN CONTEXT · FIXED, SMALL SYSTEM WORKING SET PAGED IN ON DEMAND EVICTED HARD TOKEN LIMIT page out page in EXTERNAL CONTEXT · UNBOUNDED the model issues its own paging calls — memory management as a tool, not a framework concern
A context window is a hard wall, and a conversation that outgrows it loses its beginning. MemGPT borrows virtual memory: a small fixed main context holds the system prompt and working set, an unbounded external store holds everything else, and the model itself issues function calls to page information in and out. Memory management becomes something the agent does rather than something the framework does to it — which also means a paging mistake is now the model’s mistake.
What it costs

Every page-in and page-out is an LLM decision, so recall quality is capped by the model's function-calling reliability — the authors report sharply degraded behaviour on weaker models and note the agent often stops paging through retriever results before exhausting them. The bookkeeping also spends the user's own latency and token budget, since the agent pauses mid-conversation to edit memory, and an overwrite of an in-context block has no undo.

Bi-temporal knowledge graphBi-temporal knowledge graph

Each fact carries a valid-from and valid-to, so an update expires the old edge instead of deleting it.

The problem

Archival memory from the previous stage stores each statement as an independent chunk, so when a fact changes — a user leaves one employer for another — the old and new statements sit side by side as equally retrievable neighbours, and the retriever ranks by similarity rather than by which one is still true. The usual fix, overwriting the record, destroys the ability to answer "what was true in March" and flattens a genuine change in the world into an error correction. Neither behaviour distinguishes when a fact was true from when the system happened to learn it.

OVERWRITE · HISTORY DESTROYED works_at: Acme works_at: Globex “WHERE DID SHE WORK LAST YEAR?” → UNANSWERABLE BI-TEMPORAL · EDGES EXPIRE Acme Globex valid_from → valid_to still open TWO CLOCKS when the fact was TRUE in the world · when the system LEARNED it a late-arriving correction can close an edge in the past without erasing what was believed then
Overwriting a fact destroys the ability to answer questions about the past, and agent memory accumulates exactly the kind of fact that changes. A bi-temporal graph closes an edge instead of deleting it, stamping when the fact was true in the world and, separately, when the system learned it. Two clocks are needed because they diverge: a correction that arrives today may apply to last year, and only the second clock explains why the system answered as it did at the time.
What it costs

Every write now costs LLM passes — entity extraction plus contradiction adjudication — so ingestion is far slower and more expensive than appending a chunk to a vector store, and any extraction slip becomes a first-class fact wearing an authoritative timestamp. Valid-from frequently has to be inferred when the source never states it, and because nothing is deleted the graph grows monotonically and every query must carry a time filter to stay correct.

Stage 9 · Governed, self-consolidating memory — 2025–2026

Sleep-time computeSleep-time compute

A second agent rewrites the shared memory between turns, so consolidation stops costing reply latency.

The problem

In the single-agent paging design, one agent does both the conversation and the bookkeeping, so every memory edit is paid out of the user's reply time — which pushes edits toward the cheapest possible form: one line appended at the moment of overflow, never reorganized, until the block degrades into an append log. It also means any reasoning over the accumulated context is re-derived from scratch on every query, at exactly the moment the user is waiting.

WHILE ANSWERING Q RETRIEVE A LATENCY BUDGET: EVERY MILLISECOND IS THE USER'S WHILE IDLE SUMMARISE · MERGE DUPLICATES · RESOLVE CONFLICTS · RE-EMBED NO USER IS WAITING work whose value is not time-critical is moved off the request path entirely — the cost is that the store a query reads may be mid-reorganisation.
Consolidating memory — summarising, merging duplicates, resolving contradictions, re-embedding — is expensive and its value is not time-critical, yet doing it during a request spends the user’s latency budget. Sleep-time compute moves it to idle periods, so the agent reorganises what it knows while nobody is waiting. The cost is that a query can arrive mid-reorganisation, and the store it reads is then in a state neither the old nor the new one.
What it costs

The offline work only pays off when the questions that actually arrive are ones the pre-computation anticipated; the sleep-time compute paper ties the benefit directly to how predictable the query is from the context, and when it is not, those tokens buy nothing. It is also strictly more total compute, not less — you fund a second agent's inference on every batch of turns — and a wrong consolidation is now baked into a shared block the primary agent trusts and, in this architecture, cannot correct.

Write-time contradiction resolutionWrite-time contradiction resolution

Treats a contradicting write as concurrency control: a declared isolation level and an audit row.

The problem

Stage 6 gave facts a validity interval, but it left open who decides which of two conflicting claims wins. Production systems already resolve this four ways — last-writer-wins, evidence-weighted merge, await-confirmation, per-rule policy — yet per TOKI none of them declares the isolation level it assumes or the write-time anomalies it admits, and the adjudicator is a language model sitting on the write path whose verdict is never logged under a key. The result is three concrete failures: you cannot replay how a belief was reached, the stored state drifts from what the audit trail implies, and the losing claim is destroyed outright.

READ-TIME RESOLUTION fact A not-A DECIDE AT READ PAID ON EVERY QUERY, FOREVER WRITE-TIME RESOLUTION incoming GATE STORE CONFLICTING WRITES SERIALISED LIKE TRANSACTIONS the store never holds a contradiction, so no reader has to arbitrate one
If contradictions are allowed into the store, every future read has to arbitrate them — a cost paid forever, by every query, usually by the most expensive component in the system. Treating a conflicting write as a concurrency problem instead moves the decision to write time: incoming facts pass through a gate that serialises them against what is already stored, so the store never holds a contradiction. The trade is that writes become ordered and more expensive, and the arbitration happens with less context than a reader would have had.
What it costs

This buys a correctness contract, not speed or accuracy: you pay an extra row per contradiction and a keyed log entry per adjudication, and the language-model judge stays on the write path, so writes get heavier exactly where volume is highest. The paper is explicit that its cross-system comparison is underpowered and claims no superiority, and the soundness results hold within a relational schedule model — what you get is a stated guarantee, not evidence that recall improves.

Stage 11 · The learned and robust frontier — 2025–2026

ColBERTColBERT — late interaction

Keeps one vector per token instead of one per passage, then scores each query token against its best match.

The problem

A dense bi-encoder pools an entire passage into a single fixed-length vector, so a rare identifier, a version string or the one term that actually mattered for this query is averaged away with everything else. The obvious fix — a cross-encoder that attends jointly over query and document — restores the fine-grained matching but has to run a full transformer pass for every query-document pair at search time, so it can only re-rank a shortlist somebody else produced. Neither option can search a corpus with token-level precision.

SINGLE VECTOR MEAN POOL EVERYTHING AVERAGED INTO ONE POINT LATE INTERACTION · MaxSim QUERY TOKENS DOC TOKENS ONE ARROW PER QUERY TOKEN, TO ITS BEST MATCH a rare identifier survives because it keeps its own vector instead of being averaged away the price: storage and compute grow with TOKENS, not documents
Pooling a passage into one vector averages a rare identifier together with everything around it, and the detail that made the passage the right answer disappears. Late interaction keeps one vector per token and scores with MaxSim — each query token contributes its single best match against any document token — so a term that matters exactly once still contributes fully. The price is that storage and computation now scale with tokens rather than documents, which is why the rest of this family exists.
What it costs

The index now holds a vector per token rather than per passage — roughly an order of magnitude more space, which ColBERTv2's centroid-plus-residual compression shrinks but does not remove — and retrieval needs a purpose-built engine that gathers candidates across token vectors before scoring, not one lookup in an ordinary vector database. It also requires an encoder that exposes per-token output, which most hosted and local embedding endpoints do not: they return one pooled vector per text.

ColPaliColPali — late interaction over page images

Indexes the picture of a page: a vision model embeds image patches and query words match patches directly.

The problem

The standard document-retrieval pipeline is a chain of lossy parsers — PDF extraction, OCR, layout detection, chunking, sometimes captioning — and the errors compound: tables lose their row and column structure, charts and diagrams become nothing or a bad caption, multi-column pages get interleaved into nonsense, and typography, position and every other visual cue carries no signal at all. The obvious alternative, one CLIP-style vector per page image, reintroduces exactly the single-vector bottleneck that late interaction was built to escape, on pages that are far denser than a passage.

OCR PIPELINE PAGE OCR LAYOUT +CHUNKING TABLES, FIGURES AND COLUMNS LOST AT EVERY STEP COLPALI PAGE VISION LM PATCH VECTORS THE PAGE IMAGE IS THE DOCUMENT late interaction over image patches — a chart is retrievable without ever becoming text
A document pipeline that begins with OCR loses layout, tables and figures before retrieval starts, and every downstream stage inherits those losses. ColPali skips the text stage: a vision language model embeds the page image directly into patch vectors, and the same late-interaction scoring runs over patches instead of tokens. A chart or a table becomes retrievable as itself, without a text representation ever existing — at the cost of storing many vectors per page and needing a vision model at query time.
What it costs

Indexing is expensive at both ends: every page needs a full vision-language-model forward pass rather than a cheap text embedding, and it stores on the order of a thousand patch vectors per page, so the index is heavier than a text-token late-interaction index and most vector databases still have no native multi-vector support. Retrieval also returns a whole page, which means the downstream generator has to be able to read the page image, and anything too fine to survive the model's fixed input resolution is effectively invisible.

Reducing multi-vector to single-vector ANNReducing multi-vector to single-vector ANN

Learns one vector per document whose inner product with a pooled query vector estimates the MaxSim score.

The problem

Late interaction buys its quality by searching over per-token vectors: every query token launches its own nearest-neighbour search, the hits have to be gathered per document and rescored, and the whole thing needs a specialised engine rather than a stock ANN library — so latency and index complexity scale with token count. The earlier reduction to single-vector search, MUVERA's fixed dimensional encodings, sidesteps the engine problem with a data-independent randomized space partition, but that encoding has to be very high-dimensional to preserve recall.

THE OBSTACLE MaxSim IS NOT AN INNER PRODUCT — NO ANN INDEX ACCEPTS IT REDUCTION ONE VECTOR ANN ORDINARY SINGLE-VECTOR SEARCH, THEN EXACT RERANK the family’s recurring move: make the expensive score approximable by a cheap one
MaxSim is not an inner product, so no ordinary nearest-neighbour index can serve it and multi-vector retrieval loses the entire ANN ecosystem. The reduction approach maps a token bag to a single vector chosen so that plain inner-product search over those vectors approximates the multi-vector score, recovering standard indexing for a first pass and leaving exact late interaction to rerank the shortlist. It is the family’s recurring move: make an expensive score approximable by a cheap one, then pay the expensive one only on survivors.
What it costs

The document vectors are not something the encoder produces — each is fitted against a network trained over that specific corpus, so the index is corpus-bound: building it is a multi-stage offline job and adding documents later is awkward rather than a plain insert. And it is an estimate, so exact MaxSim reranking of the candidate list is still mandatory; wherever that rerank dominates the cost — image-patch documents with far more vectors each, for instance — the speedup narrows.

MUVERAMUVERA — fixed dimensional encodingscode only · no callers

Sketches a ColBERT token bag into one fixed-length vector whose dot product approximates MaxSim.

The problem

ColBERT-style late interaction scores a query against a document with Chamfer/MaxSim — every query token takes the max inner product over every document token, then those maxima are summed. That is not a single inner product, so it cannot ride a normal MIPS/ANN index: you either brute-force the full token matrix of every candidate (quadratic in tokens, linear in corpus) or run one ANN query per query token and stitch the results back together with a multi-stage gather-and-rescore engine like PLAID. MUVERA replaces both with a data-oblivious sketch: encode each token bag as ONE fixed-dimensional vector such that a plain dot product provably approximates Chamfer, so multi-vector retrieval becomes a single-vector ANN lookup plus an optional exact rerank.

TOKEN CLOUDS · MaxSim QUERY DOC one arrow per query token SIMHASH BUCKETS SUM qAVG d the asymmetry is the trick FIXED-DIM ENCODING ONE VECTOR project, concatenate, repeat indexed in an ordinary HNSW; one inner-product search, then exact MaxSim reranks
Random hyperplanes slice the space and stamp each token with a sign code that drops it into a bucket. Inside each bucket the query tokens collapse into a sum while the document tokens collapse into an average — that asymmetry is what makes a plain dot product approximate MaxSim. Empty document buckets borrow the nearest occupied bucket’s centroid so a query token never lands on nothing, each block is randomly projected, and the blocks are concatenated into one fixed-length vector an ordinary index can hold.
What it costs

The sketch buys single-vector indexing with dimensionality: the FDE is 2^k_sim x d_proj x r_reps floats (the paper operates around ~10k dims and then needs product quantization to be storable), so a document's single MUVERA vector can be an order of magnitude larger than its ordinary dense embedding. It is an approximation with real variance — accuracy is bought by raising r_reps and d_proj, and quality leans on re-ranking the ANN shortlist with exact MaxSim, so it reduces rather than eliminates the multi-vector scoring cost. The SimHash partition also degrades when a token bag is large and diverse relative to B buckets, and the empty-bucket fill is a heuristic that can attribute a document region a query token never truly matched. Most importantly, MUVERA only makes existing late interaction cheap — it creates no retrieval quality on its own and is worthless without an upstream per-token (ColBERT-style) encoder, which is exactly the dependency blocking it in this repo.

In TerranSoul

No callers — and worth being blunt about why it could not simply be switched on: late interaction needs a per-token embedder, and the local Ollama-style server returns one mean-pooled vector per text. That is the boundary Stage 11 of the parent article describes: the frontier is not wrong, it is priced in a currency a local deployment cannot spend.

Memory-R1Memory-R1 — a learned write policy

A policy learns when to add, update, delete or do nothing, trained only on whether the answer came out right.

The problem

Prior memory stores decided their own write operations with hand-written prompts and heuristics. When a new turn contradicted a stored fact, a prompted manager typically appended a second entry instead of revising the first, because nothing told it which choice was correct. The contradictions then compounded: every later retrieval surfaced both versions, and the error rate grew with the length of the conversation.

HAND-WRITTEN RULES if similarity > 0.85: merge if age > 30d and unused: drop else: append THRESHOLDS NOBODY CAN DERIVE LEARNED POLICY CANDIDATE WRITE ADD UPDATE DELETE / NOOP TASK REWARD FROM DOWNSTREAM TASK SUCCESS the write policy is trained, not tuned — and it needs an offline training loop a frozen deployment does not have
Whether to add, update, delete or ignore an incoming fact is normally decided by hand-written thresholds that nobody can derive from first principles and that quietly rot as the corpus changes. Memory-R1 makes the write decision a learned policy, trained by reinforcement from whether downstream task performance improved. The signal is honest — memory is judged by whether it helped — but it requires an offline training loop, which a frozen, local deployment by definition does not have.
What it costs

The only training signal is downstream answer correctness, so a single scalar has to explain one edit among many and credit assignment is noisy; it also needs an offline RL loop and labelled QA pairs from the same question distribution, which a frozen local model cannot have. And the manager can only revise entries the similarity search surfaced — if the contradicting entry is not retrieved, the sole reachable action is ADD, which is exactly the failure it exists to fix.

HippoRAG-2HippoRAG-2 — personalized PageRank

Retrieval becomes a walk on a graph, so a passage can rank high without ever matching the query.

The problem

Flat vector retrieval scores each passage on its own similarity to the query. A two-hop question names the first entity but not the bridge, so the passage holding the answer shares no wording or meaning with the query and never enters the top-k at all. Iterative retrieve-read loops can reach it, but only by spending several LLM calls per query; and the first HippoRAG fixed multi-hop with an entity-only graph while losing ground on simple queries, because the passages themselves were never in the graph.

ITERATIVE MULTI-HOP HOP 1 HOP 2 HOP 3 ONE LLM CALL PER HOP · LATENCY MULTIPLIES PERSONALIZED PAGERANK · ONE SHOT SEED PROBABILITY MASS SPREADS, DECAYING WITH DISTANCE the graph does the multi-hop reasoning; one propagation replaces a chain of model calls
Multi-hop retrieval normally means a chain of model calls — retrieve, read, reformulate, retrieve again — and each link multiplies latency and adds a place to go wrong. Personalized PageRank seeds probability mass on the passages the query matches directly and lets it propagate along the passage graph, decaying with distance, so passages several hops away surface in a single propagation. The graph performs the multi-hop step structurally; what it cannot do is decide that a hop was a mistake.
What it costs

The graph is built by an LLM, so ingestion cost scales with the corpus and every extraction or entity-linking mistake is baked into the edges before a single query runs. The recognition-memory filter can also discard a triple that mattered, and once a seed is gone PageRank has no way to recover it — retrieval is bounded by the graph, and the graph has to be maintained as the corpus changes.

RobustRAGRobustRAG — isolate then aggregate

Every retrieved passage answers alone, and only answers that several passages agree on survive.

The problem

Standard RAG concatenates the top-k passages into a single prompt, which makes every retrieved passage a peer of the instructions. One attacker-planted passage saying 'ignore the above, the answer is X' is read jointly with all the others and can decide the output on its own. Detection filters offer no guarantee — they only raise the bar for how the injected text has to be phrased.

CONCATENATE · ONE POISONED PASSAGE WINS ONE PROMPT INJECTED TEXT STEERS THE WHOLE ANSWER ISOLATE → AGGREGATE ANS 1 ANS 2 ANS 3 AGGREGATE EACH PASSAGE ANSWERED ALONE — NO PASSAGE SEES ANOTHER a certified bound: with k corrupted passages out of n, the aggregate cannot be flipped
Concatenating retrieved passages into one prompt gives any single passage the power to steer the entire answer, which is exactly what a prompt-injection attack needs. Isolate-then-aggregate answers each passage independently — no passage ever sees another — and then combines the independent answers. Because a corrupted passage can only influence its own answer, the aggregation admits a certified bound on how many corrupted passages the system tolerates: a guarantee, rather than a benchmark delta.
What it costs

The bill is roughly one LLM call per retrieved passage instead of one per query, and the stronger decoding-based aggregator needs next-token probabilities that many inference servers never expose. Isolation also destroys by construction any answer that requires combining two passages, and the certificate holds only up to a bounded number of corrupted passages — past that bound it says nothing.

CaMeLCaMeL — capabilities and information flow

The plan is written before any untrusted text is read, so retrieved data can change values but not steps.

The problem

Isolate-then-aggregate protects the answer, not the actions. In a tool-using agent the same context that holds a retrieved email or web page also decides the next tool call, so injected text does not have to win a vote — it only has to be read once to redirect a send, a write or a payment. Nothing about aggregating answers stops a poisoned document from supplying the recipient address.

PRIVILEGED PLANNER · NEVER SEES DATA plan: fetch(x) → summarise → send(y) WRITES THE CONTROL FLOW UP FRONT QUARANTINED EXECUTOR · SEES DATA, NO AUTHORITY untrusted text → values only CANNOT CHANGE WHAT RUNS NEXT CAPABILITY CHECK ON EVERY VALUE SOURCE ALLOWED SINKS BLOCKED injected instructions arrive as DATA, and data cannot rewrite the plan
A prompt injection works because instructions and data arrive through the same channel and the model cannot tell them apart. CaMeL separates the two structurally: a privileged planner writes the control flow before any untrusted content is seen, and a quarantined executor that does see the content can only produce values — it has no authority to change what runs next. Every value carries a capability recording where it came from and which sinks it may reach, so injected text arrives as data and data cannot rewrite the plan. The cost is a second, privileged model and a real loss of flexibility.
What it costs

It defends only what a plan can settle in advance, so genuinely data-dependent control flow — read the mail, then decide what to do — is either refused or escalated to the user, and enough of those prompts turn the guarantee into a rubber stamp. Policies must be authored and maintained per tool, the user's own query is assumed trusted, and the architecture costs a second privileged model plus a custom interpreter beside the agent.

Stage 12 · What this system itself runs

Thinking modes as (effort × harness) pairsThinking modes as (effort × harness) pairson by default

Four named modes that vary two things at once — and do not form the ladder they are drawn as.

The problem

Users want one dial: more effort, better answer. The implementation varies two independent things — the reasoning effort passed to the model, and the harness wrapped around it (rerank, sub-queries, verification) — and those do not compose into a single ordered scale.

AS DRAWN · A FOUR-RUNG LADDER chat think research max EACH RUNG STRICTLY ABOVE THE LAST AS MEASURED AT FULL-500 rrf research chat think max · NOT MEASURED AT THIS SIZE THREE BEHAVIOURS, NOT FOUR RUNGS WHAT THE MODES ACTUALLY VARY REASONING EFFORT × HARNESS AROUND IT — not a single “depth” dial
The four thinking modes are drawn as a ladder in which each rung strictly contains the one below. At the only sample size with bound artifacts — the full 500 questions — that is not what the measurements show: research ties plain RRF, both sit above chat, think sits below chat, and max has no full-500 measurement at all. Three measured behaviours, not four rungs. What the modes actually vary is a pair — reasoning effort and the harness wrapped around it — rather than one depth dial, which is why more of one does not automatically mean better retrieval.
What it costs

Measured at full scale the ladder does not hold: <code>research</code> ties plain RRF, both beat <code>chat</code>, and <code>think</code> scored <em>below</em> <code>chat</code> while it still carried the reranker. <code>max</code> has no full-500 measurement at all. The four-rung figure was retired on 2026-07-27 as a retracted claim; three measured behaviours is the honest count.

Governed write gate + earned autonomyGoverned write gate + earned autonomyon by default

Classify every incoming write as allow, quarantine or block, with a trust level that moves on outcomes.

The problem

A memory an agent can write to is a memory anything reaching that agent’s input can write to. Memory-injection attacks exploit exactly this, and a poisoned memory is worse than a poisoned retrieval because it persists and is retrieved again.

INCOMING WRITE CANDIDATE GOVERNED WRITE GATE ALLOW → STORED QUARANTINE → HELD BLOCK → REFUSED EARNED AUTONOMY trust rises with successful writes, falls with failures ONE BAD ARG CAN CLOSE THE GATE a memory an agent can write to is a memory an attacker can write to — the gate is the trust boundary
An agent that can write to its own memory can also be made to write to it by anything that reaches its input, which is the mechanism behind memory-injection attacks. A governed write gate classifies every candidate write as allow, quarantine or block, and ties the threshold to earned autonomy — trust that rises with successful writes and falls with failures. The cost is real and was measured here: a single malformed call debits trust, and a category can drop below its threshold and refuse subsequent writes, so the gate that protects the store can also silence the learning it exists to protect.
What it costs

The gate is a trust boundary, and trust boundaries have false positives. Measured on this system: a single malformed call debits the trust score, a category can fall below its threshold, and subsequent legitimate writes are then refused — the mechanism protecting the store can silence the learning it exists to protect. A bootstrap defect of exactly this shape blocked every write on a fresh store until it was fixed.

Verify-and-rankVerify-and-rank — claim-level, weakest-linkwired · default off

Decompose the top candidate into claims, check each, and score it by its least-supported one.

The problem

Reranking every candidate is expensive and measured negative here. The alternative is to spend the model call only where it can change the outcome, and to check something more specific than “is this relevant” — a passage can be topically perfect and still not support the claim being made.

RANKED CANDIDATES 1 2 3 4 5 CLAIM-LEVEL VERIFICATION FOR THE TOP CANDIDATE ONLY CLAIM 1 · SUPPORTED CLAIM 2 · SUPPORTED CLAIM 3 · NOT SUPPORTED WEAKEST LINK SETS THE SCORE CONFIDENCE GATE → DEFAULT TO THE INCUMBENT A VERIFIER THAT IS UNSURE CHANGES NOTHING the expensive check runs on the few candidates whose order it could actually change
Reranking every candidate with a model is expensive and, measured here, can be worse than not doing it. Verify-and-rank inverts the shape: instead of rescoring everything, it decomposes the top candidate into individual claims, checks each against the evidence, and takes the weakest link as the score — a passage is only as supported as its least-supported claim. A confidence gate means a verifier that is unsure defaults to the incumbent ordering rather than reshuffling it, so the technique can decline to act. It is the most accurate configuration measured on the 50-question slice, and the slowest by a wide margin.
What it costs

It is the slowest configuration measured by a wide margin — it issues many local-model generations per search, where chat and think issue none. Its accuracy advantage is recorded only on a 50-question slice that is 100 % single-session-user, which is favourable ground; at full scale it has never been measured. A confidence gate lets it decline to reorder, which is what keeps it from repeating the reranker’s failure.

More techniques · 19

Agentic retrievalAgentic retrieval

What it is

The managed-infrastructure form of RAG in which the retrieval service plans the query, issues parallel subqueries and reranks the merged result instead of doing one vector lookup; Azure AI Search's agentic retrieval reached general availability in April 2026, and ApeRAG packages the same shape as an agentic GraphRAG platform on top of a modified LightRAG.

MANAGED RETRIEVAL SERVICE · ONE QUESTION IN QUERY PLAN ISSUED IN PARALLEL SUBQUERY 1 SUBQUERY 2 SUBQUERY 3 MERGE RERANK ANSWER NO FAILURE SIGNAL LEAVES THE PIPELINE RETRIEVAL MISSED GENERATION DRIFTED ONE EQUALLY FLUENT OUTPUT
Instead of a single vector lookup, the retrieval service plans the question into subqueries, issues them in parallel, merges the returned sets and reranks the union before answering — the shape that reached general availability in Azure AI Search in April 2026 and that ApeRAG packages as an agentic GraphRAG platform over a modified LightRAG. Every extra stage is another model call and more latency per question, bought for coverage. The band below is what the pipeline still does not produce: a retrieval miss and a generation drift both exit as the same fluent answer, with nothing in the output telling the two apart.
What it costs

It trades latency and extra model calls per question for coverage, and it still emits no signal distinguishing a retrieval failure from a generation failure — the output is fluent either way.

Background consolidation / "Observations" processBackground consolidation / "Observations" process

What it is

A separate agent curates the memory store off the hot path — during idle time rather than mid-conversation — resolving contradictions and rewriting entries, so the store can get smaller and better instead of only larger. Letta's sleep-time compute and Hindsight's "Observations" process do the same job; the latter took first place on BEAM.

HOT PATH · MID-CONVERSATION USER TURN APPEND RAW NO REVIEW HERE — LATENCY BUDGET FORBIDS IT STORE · BEFORE allergic to nuts prefers tea prefers coffee now lives in Oslo moved to Oslo 2019 IDLE · CURATOR AGENT MERGE DUPLICATES RESOLVE CONFLICTS REWRITE OR DELETE STORE · AFTER prefers coffee Oslo since 2019 allergic to nuts 3 ROWS, NOT 5 curation runs off the hot path, so the store can end a cycle smaller and better instead of only larger NO CONSOLIDATION-ON VS CONSOLIDATION-OFF ARM → ITS RETRIEVAL EFFECT IS UNMEASURED
Nothing on the conversational path reviews what gets written — an append is all the latency budget allows, so the store only grows. A separate curator works the same store on idle compute, merging duplicates, resolving contradictions between entries written weeks apart, and rewriting or dropping what no longer holds, which is how a cycle can end with fewer and truer rows than it began. Letta's sleep-time compute and Hindsight's Observations process are the same job under different names, and the latter took first place on BEAM. Here the stage is built with no consolidation-on against consolidation-off arm, so the write decision moves into a process no user observes and its retrieval effect stays unmeasured.
What it costs

It buys review quality with idle compute and moves the write decision into a process no user observes, and in this system the stage is built with no consolidation-on against consolidation-off arm, so its retrieval effect is unmeasured.

Claim-level weakest-link verificationClaim-level weakest-link verification

What it is

Part of TerranSoul's Stage 6 corrective path alongside CRAG grading, hard abstain and read-path spotlighting: an answer is checked claim by claim against the retrieved evidence and takes the verdict of its weakest claim, so a single ungrounded claim cannot ride along on well-supported ones.

ANSWER · SPLIT INTO CLAIMS claim 1 claim 2 claim 3 claim 4 EACH CHECKED SEPARATELY NONE RETRIEVED EVIDENCE evidence A evidence B evidence C VERDICT · WEAKEST LINK c1 c2 c3 MIN c4 ANSWER TAKES c3 → ABSTAIN the verdict of the whole answer is the verdict of its weakest claim BUILT, NOT BENCHED · THE FOUR FULL-500 ARMS RECORD ZERO ABSTENTIONS
The answer is decomposed into claims and each one is checked against the retrieved evidence on its own, so a claim with no supporting passage shows up as its own failure instead of being averaged into the claims that do have support. The answer then takes the verdict of its weakest claim — the dashed line is where the shortest bar ends — which is what stops an ungrounded sentence riding along on well-supported neighbours, and what feeds the hard-abstain path beside CRAG grading and read-path spotlighting. Per-claim checking multiplies judge calls by the number of claims, and the stage is built rather than benchmarked: no arm isolates the corrective loop, and the four full-500 arms record zero abstentions.
What it costs

It is built, not benchmarked — no arm isolates the corrective loop and the four full-500 arms record zero abstentions — and per-claim checking multiplies judge calls while deliberately letting one unsupported claim condemn an otherwise grounded answer.

Confidence-threshold gating (crag_ok / crag_bad / τ_claim / τ_abstain)Confidence-threshold gating (crag_ok / crag_bad / τ_claim / τ_abstain)

What it is

Corrective-RAG control implemented as tuned numeric cut-offs rather than model judgement: a retrieval-grader score above crag_ok = 0.7 accepts the retrieved set and below crag_bad = 0.4 rejects it, while τ_claim = 0.3 and τ_abstain = 0.3 decide per-claim support and when to refuse to answer. A published June-2026 pipeline shipped exactly these values around a verifier benchmarked on HaluBench.

RETRIEVAL-GRADER SCORE · ONE AXIS, TWO TUNED CUT-OFFS crag_bad = 0.4 crag_ok = 0.7 0.0 1.0 REJECT → RE-ROUTE AMBIGUOUS → MIX ACCEPT THE RETRIEVED SET τ_claim = 0.3 → CLAIM COUNTS AS SUPPORTED τ_abstain = 0.3 → REFUSE TO ANSWER WHAT THE PUBLISHED OPERATING POINT COSTS >50% ABSTAINED OR RE-ROUTED EVERY CUT-OFF SITS ON A VERIFIER ONLY MODESTLY BETTER THAN CHANCE — THE GATE INHERITS ITS ERROR AT ANY SETTING
Corrective RAG is implemented here as fixed numeric cut-offs on a grader score rather than as model judgement: below 0.4 the retrieved set is rejected and the query re-routed, above 0.7 it is accepted as-is, and the band between is treated as ambiguous. Two further constants decide per claim whether evidence counts as support and when the system refuses to answer at all. The cost is visible in the operating point — the published low-hallucination number is bought by abstaining or re-routing more than half of all queries — and every one of those constants rests on a verifier only modestly better than chance, so the gate inherits a large share of the judge's error whatever the thresholds are set to.
What it costs

The published low-hallucination operating point is bought by abstaining or rerouting more than half of all queries, and every threshold sits on a verifier only modestly better than chance, so the gate inherits a large share of the judge's error at any setting.

Cosine-similarity ranking / exact cosine scanCosine-similarity ranking / exact cosine scan

What it is

A learned encoder maps queries and documents into one vector space and relevance becomes cosine similarity between two points in it, so a paraphrase ranks near its source without any literal token match. The exact form scores the query against every stored vector.

ONE SPACE · ANGLE, NOT WORD OVERLAP COS θ = RELEVANCE QUERY PARAPHRASE UNRELATED θ EXACT SCAN · EVERY STORED VECTOR TIME VECTORS STORED INTERACTIVE BUDGET 10k · FINE MILLIONS · TOO SLOW a paraphrase ranks beside its source with no token in common — the angle closes what term overlap cannot COST IS LINEAR IN CORPUS SIZE → THIS IS WHAT FORCES APPROXIMATE NEAREST-NEIGHBOUR INDEXING
A learned encoder places queries and documents in a single space, and relevance becomes the angle between two points rather than the words the two texts happen to share — which is how a paraphrase ranks beside its source with no token in common while an unrelated passage swings wide. The exact form of this scoring compares the query against every stored vector, so cost grows in a straight line with the corpus. At a few thousand vectors that is invisible; at a few million 768-dimension vectors it puts query time past any interactive budget, which is precisely what forces approximate nearest-neighbour indexing.
What it costs

The exact scan is linear in corpus size — a few million 768-dimension vectors put query time beyond any interactive budget — which is what forces approximate nearest-neighbour indexing.

Entity disambiguationEntity disambiguation

What it is

Resolving mentions in a query to specific typed entities in a knowledge graph, so that entity disambiguation and multi-hop relational answers become exact rather than probabilistic and the answer carries its own derivation. It is the core Stage 4 argument for graph structure over pure similarity.

SIMILARITY ONLY “apple” — which one? TOP-K — NO TYPE, NO PATH TYPED GRAPH · RESOLVED THEN TRAVERSED MENTION FRUIT:APPLE ORG:APPLE INC employs PERSON works_on PROJECT EXACT — THE ANSWER CARRIES ITS DERIVATION WHAT IT COSTS EXACT ONLY FOR ENTITIES THE GRAPH CONTAINS AND LINKS CORRECTLY an up-front extraction pipeline — and a mislink becomes a confidently wrong derivation
On the left the mention is embedded and answered by proximity: the neighbourhood inside the radius holds several senses at once, ranked but untyped, and nothing in the result says which sense was meant. On the right the same mention is first resolved to a specific typed node — the competing sense is ruled out rather than co-ranked — and the answer is then reached by following named edges, so the traversal itself is the derivation. The exactness is bounded by the graph: it holds only for entities that were extracted and linked correctly, and a mislinked node produces a wrong answer with the same confident provenance trail attached.
What it costs

The exactness holds only for entities the graph actually contains and links correctly, so it trades an up-front extraction and curation pipeline for precision — and a mislinked or missing entity turns into a confidently wrong derivation.

Filtered / metadata-constrained vector searchFiltered / metadata-constrained vector search

What it is

An approximate-nearest-neighbour query restricted by a metadata predicate — "semantic search, but only in this tenant's documents" — so similarity ranking runs inside a filtered subset of the index.

ONE INDEX · MANY TENANTS PREDICATE · tenant = A ACCENT = PASSES THE PREDICATE WHAT THE FILTER COSTS RECALL · UNFILTERED RECALL · FILTERED LATENCY · FILTERED BOTH MOVE THE WRONG WAY NEITHER HALF IS THE HARD PART VECTOR ONLY — ANY TENANT METADATA ONLY — NO RANK BOTH AT ONCE — HARD
The query vector's own neighbourhood is the ring, and almost everything inside it fails the predicate: the points that satisfy tenant = A sit further out, so the search must keep walking past disqualified neighbours to reach an admissible one. That extra walking is exactly the cost — recall falls because the traversal gives up before enough surviving candidates are found, and latency rises because reaching them takes more hops. Running the similarity search unconstrained is easy and returns the wrong tenant; running the metadata query alone is easy and returns no ranking; only the conjunction is hard.
What it costs

Filtering degrades both recall and latency, making the combination harder than either the unfiltered vector search or the plain metadata query on its own.

Inverted indexInverted index

What it is

A postings structure that maps every term to the documents that contain it, so a query touches only documents sharing a word with it instead of scanning the corpus. A statistical ranking function (TF-IDF, then BM25) then orders those documents by how unusual the matched terms are.

SCAN · TOUCH EVERY DOC COST ∝ CORPUS SIZE POSTINGS · TERM → DOC IDS mars d7 d9 d31 rover d9 d44 the A TERM IN EVERY DOC WEIGHS NOTHING SCORED d9 d7 d31 3 DOCS, NOT 10k WHAT IS NEVER A CANDIDATE “the red planet buggy” SHARES NO TERM WITH THE QUERY → IN NO POSTINGS LIST → NEVER SCORED
Instead of visiting every document, the index is inverted: each term owns a list of the documents containing it, so a query opens only the lists for its own terms and the candidate set collapses from the whole corpus to their union. A statistical ranking function then orders that union by how unusual the matched terms are, which is why a term appearing in every document contributes essentially nothing. The structural cost is visible on the right: a passage answering the query in different words appears in none of the query's postings lists, so it is never a candidate and is never scored at all.
What it costs

It trades semantic reach for exact-term matching: a document that expresses the same concept in different words is never a candidate at all, because it is not in any of the query's postings lists.

Knowledge refinementKnowledge refinement

What it is

CRAG's retrieval-internal corrective branch: when the lightweight retrieval evaluator labels retrieved documents Correct, Incorrect or Ambiguous, the grade routes the query to knowledge refinement — cutting the retrieved documents down to the relevant parts and recomposing them — to a web-search fallback with query rewriting, or to both.

RETRIEVED DOCUMENTS → ONE GRADE EACH LIGHTWEIGHT EVALUATOR 3-WAY GRADE correct ambiguous incorrect KNOWLEDGE REFINEMENT RECOMPOSED BOTH BRANCHES REFINE WEB MERGED EVIDENCE REWRITE → WEB SEARCH reset pasword password reset steps EXTERNAL CORPUS REFINEMENT CAN ONLY RE-CUT WHAT RETRIEVAL RETURNED · THE GRADER ITSELF IS WEAK
CRAG puts a lightweight evaluator between retrieval and generation that grades each retrieved document Correct, Incorrect or Ambiguous, and the grade routes rather than merely filters. Correct sends the documents into knowledge refinement, which cuts each one into strips, drops the irrelevant strips and recomposes what survives. Incorrect abandons the retrieved set and rewrites the query for a web search; Ambiguous runs both branches and merges their evidence. The refinement branch can only re-cut what retrieval already returned, so it cannot recover a miss without the web branch, and the whole routing decision rests on a grader that is itself weak.
What it costs

It can only re-cut what retrieval already returned, so it cannot recover a miss without the web-search branch, and the whole routing decision rests on a grader that is itself weak.

LLM-arbitrated conflict resolutionLLM-arbitrated conflict resolution

What it is

When a new fact contradicts a stored one, a language model rather than a fixed rule decides the outcome — which claim survives, which is updated, which is dropped. TerranSoul adopts Mem0's approach and applies it at the typed-edge layer during governed consolidation.

CONTRADICTION AT GOVERNED CONSOLIDATION STORED TYPED EDGE lives_in → hanoi INCOMING FACT lives_in → da nang FIXED RULE LLM ARBITER DECIDES KEEP STORED UPDATE → DA NANG DROP DURABLE WRITE WHAT IT COSTS A NONDETERMINISTIC JUDGEMENT SITS ON THE DURABLE WRITE PATH built, not benchmarked — no consolidation-on against consolidation-off arm exists
A new fact arrives contradicting a stored typed edge. Rather than a fixed precedence rule — last-write-wins or highest-confidence, shown struck out above — a language model reads both and chooses the outcome: keep the stored claim, update it, or drop the new one. TerranSoul takes this from Mem0 and runs it at the typed-edge layer during governed consolidation, which means a nondeterministic judgement now sits on the durable write path, and no arm measures what it does to retrieval.
What it costs

It puts a nondeterministic model judgement on the durable write path, and it is built but not benchmarked here — no consolidation-on against consolidation-off arm exists, so its effect on retrieval is unmeasured.

Mem-α learned memory constructionMem-α learned memory construction

What it is

A learned approach to building memory itself — training what gets written and how it is structured — cited alongside Memory-R1's reinforcement-learned add / update / delete / noop management as part of the shift from hand-tuned write heuristics to learned ones.

WRITE POLICY THIS SYSTEM RUNS if novel → add if conflict → update if duplicate → noop THRESHOLDS SET BY HAND NO TRAINING SIGNAL MEM-α / MEMORY-R1 · LEARNED ADD UPDATE DELETE NOOP POLICY reward → policy TRAINED, NOT HAND-SET RUNS HERE FROZEN-MODEL BOUNDARY CITATION ONLY hand-tuned write heuristics give way to learned ones, bought with training this design cannot run
On the left is what this system actually executes: a fixed rule table deciding add, update or noop from thresholds a human chose, with no signal that could ever revise them. On the right is the learned alternative — Mem-α trains what gets written and how it is structured, and Memory-R1 trains an add / update / delete / noop manager by reward, so the same four operations are chosen by a policy rather than an if-chain. The dashed line is the frozen-model boundary: everything to its right requires training runs the local design cannot perform, so it enters the page as a citation and not as a component.
What it costs

Like Memory-R1 it is bought with training the local design cannot run, so it appears in this system only as a citation, on the excluded side of the frozen-model boundary.

Parallel subqueriesParallel subqueries

What it is

A managed-RAG pattern in which a query planner splits one question into several retrievals issued concurrently, whose results are then merged and reranked. By 2026 it was standard in hosted agentic-retrieval infrastructure.

PLAN · FAN OUT · MERGE QUERY PLANNER sub-q 1 sub-q 2 sub-q 3 INDEX INDEX INDEX MERGE + RERANK ANSWER OFF-TOPIC SPLIT · STILL RETRIEVED, STILL MERGED WHAT THE FAN-OUT BUYS AND COSTS 3× retrieval calls and 3× tokens per question, plus a planner that can decompose wrongly one merged answer — no signal separating a retrieval failure from a generation failure
A planner rewrites one question into several narrower subqueries that are issued against the index concurrently, and their candidate sets are merged and reranked into a single ordering before generation. The parallel calls buy coverage a single query would miss, at three times the retrieval calls and tokens. A subquery that was split off wrongly is not detected anywhere — it retrieves, merges and reranks exactly like the good ones. And because only one answer emerges from the merge, a wrong output carries no evidence of whether the retrieval or the generation was at fault.
What it costs

It multiplies retrieval calls and tokens per question and adds a planner that can decompose wrongly, and it still emits no signal distinguishing a retrieval failure from a generation failure.

Pointwise judge rerankingPointwise judge reranking

What it is

An LLM judge scores each retrieved candidate on its own, and the scores reorder the candidate list. It is the reranking path the think rung ran before the reranker was taken off think's retrieval path.

EACH CANDIDATE SCORED ALONE · NO PAIRWISE CONTEXT c1 c2 c3 c4 c5 JUDGE ONE AT A TIME 0.91 0.84 0.42 0.77 0.28 RE-ORDERED BY SCORE — THEN CUT c1 0.91 GOLD #1 c2 0.84 c4 0.77 DROP AT 0.50 c3 0.42 GOLD #2 c5 0.28 DELETED, NOT DEMOTED WHY A REORDER-ONLY STAGE MOVED RECALL RAN ON THINK UNTIL THE RERANKER CAME OFF ITS PATH SCORE + DROP THRESHOLD = A FILTER MULTI-GOLD QUESTION LOSES GOLD #2
The judge sees one candidate at a time and returns a score for it in isolation, and the scores are then sorted to give a new order — the reranking path think ran before the reranker was taken off its retrieval path. Scoring in isolation is what makes a numeric cut-off tempting, and on the prompt path the stage was handed a drop threshold at which anything scoring below it was removed rather than pushed down. On a multi-gold question that deletes the secondary gold outright, which is how a stage that should only permute a list was able to move recall at all.
What it costs

Because each candidate is scored in isolation, a score threshold turns the reranker into a filter: on the prompt path it was handed a drop threshold and was deleting the secondary golds of multi-gold questions instead of demoting them, which is how a reorder-only stage moved recall at all.

Query planningQuery planning

What it is

The managed-retrieval pattern in which an incoming question is decomposed into subqueries that are issued in parallel and whose merged results are reranked, rather than being sent to the index as a single query. The page names it in passing as evidence that RAG had hardened into managed infrastructure by 2026.

ONE TURN, PLANNED ISSUED IN PARALLEL MERGED & RERANKED QUESTION PLAN sub-query 1 sub-query 2 sub-query 3 MERGE RERANK → ANSWER WHAT ONE TURN NOW COSTS 3 × retrieval 3 × model calls 1 answer INDUSTRY CONTEXT · NOT MEASURED HERE OPEN ITEM FOR RESEARCH MODE
Instead of handing the question straight to the index, a planner decomposes it into subqueries that go out together, and the returned lists are merged into one pool that a reranker orders before the answer is written. The pattern is what turned retrieval from a single call into managed infrastructure — but the accounting is unavoidable: three subqueries mean three retrievals and three model calls charged against one turn. TerranSoul draws it here as context rather than as a result; decomposition at the retrieval stage remains an unmeasured open item for its research mode.
What it costs

Every planned subquery multiplies retrieval work and model calls for one turn, and it appears here as industry context — TerranSoul does not publish a measurement of retrieval-stage decomposition, which remains an open item for its research mode.

Query rewriting / rewrite-and-retry loopQuery rewriting / rewrite-and-retry loop

What it is

A CRAG-style grader sits between retrieval and generation and reads the retrieved set; the grade routes the query to grounding, to a rewrite-and-retry loop that reformulates and searches again, or to an abstention. It gives a retrieval failure somewhere to go other than a confident answer built on it.

READ PATH GRADER WHERE THE QUERY GOES NEXT QUERY RETRIEVE GRADER READS THE SET CORRECT GROUND & ANSWER AMBIGUOUS REWRITE & RETRY INCORRECT ABSTAIN A SECOND FULL RETRIEVAL ROUND-TRIP WHAT THE ESCAPE HATCH COSTS one extra grading pass, plus a whole second retrieval round-trip on every rewrite a mis-grade becomes a wasted retry, or an answer wrongly withheld
The grader sits between retrieval and generation and reads the retrieved set rather than the query, so a retrieval failure is caught before an answer is built on it. Three routes leave it: ground and answer, reformulate and search again, or abstain. The rewrite route is a loop back into retrieval, which is where the cost lives — one grading pass plus a whole second round-trip per attempt, and the judgement is the grader's, so a mis-grade spends that budget on nothing or withholds an answer that was fine.
What it costs

It buys that escape hatch with an extra grading pass plus a whole second retrieval round-trip, and it inherits the grader's judgement — a mis-grade becomes a wasted retry or a wrongly withheld answer.

Retrieval evaluator / grader between retrieval and generationRetrieval evaluator / grader between retrieval and generation

What it is

A grading step placed between retrieval and generation that reads the retrieved set and labels it, so the grade routes the query to grounding, to a rewrite-and-retry loop, or to an abstention. TerranSoul's Stage 6 adopts CRAG's retrieval-evaluator pattern for this role.

STAGE 6 · GRADE, THEN CORRECT RETRIEVE GRADER (WEAK) CORRECT AMBIGUOUS INCORRECT GROUND & ANSWER REWRITE & RETRY ABSTAIN GROUNDED RE-RETRIEVE NO ANSWER EMITTED a weak grade sends sound evidence to abstain — low hallucination bought by not answering
Nothing reaches the generator ungraded: an evaluator reads the retrieved set and labels it, and the label picks the route. Correct evidence goes straight to grounded generation, ambiguous evidence goes back through a rewrite-and-retry loop into retrieval, and evidence judged incorrect ends in an abstention that emits no answer at all. The correction is therefore only as good as the grader driving it — a weak grader passes its own error rate straight into the routing, and the low hallucination numbers this shape produces are partly bought by abstaining and re-retrieving rather than by answering better.
What it costs

The loop is only as trustworthy as its own grader, which is weak, so grade-then-correct inherits a large share of the judge's error, and low hallucination rates are bought by abstaining or rerouting rather than by answering better.

Sparse autoencoders over frozen dense retrievers (Latent Terms)Sparse autoencoders over frozen dense retrievers (Latent Terms)

What it is

A published method (Latent Terms) in which sparse autoencoders are trained over a frozen dense retriever and extract Zipfian vocabularies — term-like latent features that can be scored by BM25 over an ordinary inverted index, matching the dense model's own accuracy. It is cited as evidence that lexical machinery keeps resurfacing inside its successors rather than being replaced by them.

FROZEN DENSE RETRIEVER → ORDINARY INVERTED INDEX DENSE MODEL FROZEN SPARSE AUTOENCODER ZIPFIAN LATENT TERMS INVERTED INDEX BM25 MEASURED RELATION DENSE MODEL LATENT TERMS + BM25 SAME ACCURACY — AND THE SAME CEILING
A sparse autoencoder is trained over a dense retriever whose weights never move, and the features it recovers turn out to be distributed like a vocabulary — a few latents firing constantly, a long tail firing rarely. Because those latents behave like terms, they can be written into an ordinary inverted index and scored with BM25, and the resulting lexical system matches the dense model it was extracted from. That equality is the whole point and the whole limit: the frozen model's accuracy is the ceiling, and building the index still requires running the dense model plus the autoencoder over the corpus first.
What it costs

It matches the frozen retriever it was extracted from, so that model's accuracy is also its ceiling, and you still have to run the dense model plus an autoencoder to build the index you then serve lexically.

TF-IDFTF-IDF

What it is

The first statistical ranking function over an inverted index: documents that share a term with the query are ordered by how unusual the matched terms are, so rare terms outweigh common ones. Okapi BM25 succeeded it at TREC-3 in 1994.

INVERTED INDEX · ONE POSTINGS ROW PER TERM rover IDF 4.1 mars IDF 3.0 the IDF 0.1 RANK BY SUMMED WEIGHT d7 1 d2 2 d9 3 rank = Σ tf × idf over the tokens the query and the document literally share A DOCUMENT ON NO POSTINGS ROW "the red planet buggy" NEVER ENTERS THE CANDIDATE SET
Each query term opens one postings row, and the weight that row carries is set by how few documents contain the term: a term present almost everywhere contributes almost nothing, while a rare term dominates the sum. Documents are ordered by that summed weight, so the short document carrying the unusual terms finishes first. Nothing outside the opened rows is ever scored — a document phrasing the same meaning in different words is not ranked low, it is never a candidate at all. BM25 replaced this scoring function at TREC-3 in 1994 by adding saturation and length normalisation, but kept the same literal-token matching.
What it costs

Matching is on the literal token and nothing is interpreted, so a document that expresses the query's meaning in different words is not retrieved at all.

Web-search fallbackWeb-search fallback

What it is

One of CRAG's corrective actions: a lightweight retrieval evaluator labels the retrieved documents Correct, Incorrect or Ambiguous, and on a bad grade the pipeline rewrites the query and goes out to web search instead of, or alongside, refining what the local index returned.

LOCAL RETRIEVED SET passage · on topic passage · off topic passage · off topic EVALUATOR LIGHTWEIGHT GRADER CORRECTIVE ACTION CORRECT AMBIGUOUS INCORRECT REFINE THE LOCAL SET REWRITE THE QUERY → GO OUT TO WEB SEARCH the grade is read off the retrieved set, before generation THE BOUNDARY IT CROSSES network latency and an external dependency — un-vetted passages enter the same context window
A lightweight evaluator reads the retrieved set before generation and labels it Correct, Ambiguous or Incorrect. A Correct grade refines what the local index already returned; an Incorrect grade rewrites the query and sends it out to web search instead, and an Ambiguous grade takes both routes at once. The corrective action therefore swaps a governed local corpus for an ungoverned external one, adding network latency and a dependency, and admitting passages nothing has vetted into the same context window.
What it costs

It trades a governed local corpus for an ungoverned external one — network latency and dependency, plus un-vetted passages entering the context window.

Components and internal machinery · 27

1-bit quantization (Bonsai 27B Q1 product default)1-bit quantization (Bonsai 27B Q1 product default)

What it is

The model the product actually ships with by default: a 27B Bonsai quantized to roughly one bit per weight so a large actor fits a local machine. Benchmarks deliberately do not use it — they hold a frozen gemma4:12b-it-qat actor fixed.

WHAT THE PRODUCT SHIPS FP16 16 BITS PER WEIGHT Q1_0 ~1 BIT → 27B FITS ONE MACHINE Bonsai 27B · product default WHAT THE BENCH RUNS gemma4:12b-it-qat FROZEN held fixed across every arm DELIBERATELY NOT THE SHIPPED MODEL WHY THE BENCH REFUSES THE SHIPPED DEFAULT MEMORY + HARNESS + MODEL · HELD CONSTANT ATTRIBUTABLE Δ the delta is attributable to memory and harness — and the shipped default is never measured
The product default compresses a 27B Bonsai from sixteen bits per weight down to roughly one, which is what lets an actor that size run on a local machine. The benchmark refuses to use it: it pins a frozen gemma4:12b-it-qat actor across every arm, so the model term in the comparison is a constant and any measured change has to come from memory or harness rather than a model swap. The price of that discipline is that the published numbers describe an actor nobody actually runs.
What it costs

The published numbers therefore describe a different actor from the one users run; the frozen bench model is what makes a measured change attributable to memory and harness rather than to a model swap, at the price of never measuring the shipped default.

ACL / access control on memoryACL / access control on memory

What it is

Access-control metadata carried on stored memories alongside provenance, typed edges and CRDT sync, so a governed write path can record and enforce who a memory belongs to and who may read it rather than treating the store as one flat pool.

ONE STORED MEMORY · METADATA CARRIED WITH IT TEXT PROVENANCE EDGES ACL OWNER ALLOW OTHER DENY GATEMEM TRILEMMA UTILITY ACCESS CONTROL FORGETTING NO METHOD DELIVERS ALL THREE BUILT, NOT BENCHMARKED no attack or access evaluation exists for it — the trilemma stays open here
Access-control metadata rides on the stored memory itself, in the same row as its provenance and its typed edges, so the store is not one flat pool that any reader can draw from. A read by the owner is allowed against that metadata; a read by anyone else is refused before the memory enters a result set. The right panel is why this is not a solved problem: GateMem's finding is that utility, access control and reliable forgetting have not been achieved together by any current method. The left mechanism is built here and the right constraint is unresolved here, and no attack or access evaluation has been run against either.
What it costs

Built, not benchmarked — no attack or access evaluation exists for it, and GateMem's trilemma says no current method delivers utility, access control and reliable forgetting at once, which stays open in this design as it does elsewhere.

Agentic ripgrep retrieval (obsidian-wiki)Agentic ripgrep retrieval (obsidian-wiki)

What it is

A peer system in the agentmemory-corpus comparison that retrieves by having an agent run ripgrep over a markdown wiki, rather than by querying an index. It is charted against TerranSoul and the shared-embedder cluster on the same queries.

AGENTIC RIPGREP · obsidian-wiki QUERY rg ‘PATTERN’ AGENT GUESSES THE STRING TURN 1 TURN 2 TURN 3 LITERAL HITS · NO RANKING ALL EQUAL INDEXED PEERS · SHARED-EMBEDDER CLUSTER QUERY INDEX LOOKUP ONE PASS · SCORED ORDER 1 2 3 4 EARLY-PRECISION RECALL, SAME QUERIES INDEXED PEERS AGENTIC RIPGREP pattern matching returns hits; only an index returns an order
The peer system retrieves by letting an agent run ripgrep across a markdown wiki instead of querying an index, so each attempt costs an agent turn and depends on the agent guessing a string the document actually contains. What comes back is a set of literal matches with no score, which means nothing orders them. Charted against TerranSoul and the shared-embedder cluster on the same queries, it trails the indexed peers on early-precision recall while spending turns the indexed path does not need.
What it costs

Literal pattern matching returns hits, not a ranking, so results depend on the agent guessing the right strings and it trails the indexed peers on early-precision recall while spending agent turns per query.

Auto router (per-turn mode dispatch)Auto router (per-turn mode dispatch)

What it is

A per-turn classifier that resolves the Auto setting into one of the four thinking modes — chat, think, research, max — using the message plus recent-turn context, then stashes the resolved (reasoning-effort, harness) pair for that turn. It is shared by the desktop, CLI and MCP entrypoints so the same input routes the same way on every surface.

THREE SURFACES · ONE ROUTER DESKTOP CLI MCP AUTO ROUTER RESOLVED PER TURN MESSAGE + RECENT TURNS chat think research max RESOLVED FOR THIS TURN REASONING EFFORT HARNESS STASHED PAIR WHAT MEASURES IT EVERY ARM PINS A MODE ROUTER NEVER EXERCISED A MIS-ROUTE MOVES LATENCY AND RETRIEVAL WITH NOTHING WATCHING the dispatch that decides every unpinned turn has no accuracy number at all
Auto is not a fifth mode: a per-turn classifier reads the message plus recent-turn context and resolves it into chat, think, research or max, then stashes that mode's reasoning-effort and harness pair for the turn. Desktop, CLI and MCP all reach the same router, so the same input dispatches the same way on every surface. Every published benchmark arm pins its mode explicitly, which means the router itself is never exercised by a measurement and a mis-route changes both latency and retrieval quality unobserved.
What it costs

Every published benchmark arm pins a mode explicitly, so the router's dispatch accuracy has no number at all, and a mis-route silently changes both latency and retrieval quality with nothing measuring it.

Cascade expansion / cross-round edge walkCascade expansion / cross-round edge walk

What it is

Internal machinery of this system's graph layer: after the fused ranking is formed, it walks typed edges out from already-retrieved memories to pull in linked neighbours across rounds. It is built but default-off, and the bench harness only populates entity edges when LONGMEM_KG_EDGES=1.

FUSED RANKING m-1 RANK 1 m-2 RANK 2 m-3 RANK 3 ALREADY RETRIEVED TYPED EDGE WALK · DEFAULT-OFF mentions derived_from SEED HOP 1 HOP 2 MERGED POOL +NEW +NEW MEASURED ON AN EMPTY EDGE TABLE memory_edges → 0 rows HARNESS POPULATES THEM ONLY WHEN LONGMEM_KG_EDGES=1 R@10 GAIN 0.00 pp MEAN LATENCY 2.04x twice the cost, nothing proven
After the fused ranking is formed, its top memories become seeds and the walk follows typed edges outward — one hop, then a second — folding the linked neighbours into the pool the next round scores. The machinery is built and default-off. Its single published measurement was taken against a memory_edges table holding zero rows, because the bench harness writes entity edges only when LONGMEM_KG_EDGES=1, and walking an empty graph returns the seed set unchanged. That is why the number reads 0.00 pp of R@10 at 2.04x the mean latency: double the cost, and no evidence either way about a graph that is actually populated.
What it costs

Its one published measurement — 0.00 pp of R@10 at 2.04x the mean latency — was taken on an empty edge table, so it bought double the latency for nothing while proving nothing about a graph that is actually populated.

Cascade-delete referential integrity on the edge tableCascade-delete referential integrity on the edge table

What it is

The design keeps one edge table — bitemporal, typed, confidence-weighted, CRDT-syncable, written by five different producers — with cascade-delete integrity, so deleting a memory removes the edges that reference it rather than leaving dangling rows.

FIVE PRODUCERS INGEST CONSOLIDATION ENTITY EXTRACT CHAT WRITE CRDT MERGE ONE EDGE TABLE SRC · DST · TYPE · CONFIDENCE VALID-FROM · VALID-TO · CRDT CASCADE-DELETE INTEGRITY DELETE ONE MEMORY MEM 7 DELETED CASCADE SCHEMA INTEGRITY IS NOT EVIDENCE OF USE empty for every published number — and a cascade removes edges any producer wrote
Five different producers write into a single edge table whose rows are typed, confidence-weighted, bitemporal and CRDT-syncable. Cascade-delete integrity means removing a memory also removes every edge that referenced it, so no dangling rows survive the delete. The same propagation is the cost: the delete cannot tell which producer wrote an edge, so it silently takes edges from all five. And the table this protects held no rows at all for every published retrieval number.
What it costs

Schema integrity is not evidence of use: the table it protects was empty for every published retrieval number, and a propagating delete can silently remove edges any of the five producers wrote.

ColQwenColQwen

What it is

An extension of ColPali, which does late interaction over page images: a vision-language model embeds a rendered document page directly and the query is scored token-against-token, so no OCR or layout parsing step sits in front of retrieval.

THE PIPELINE IT REMOVES OCR LAYOUT PARSE CHUNK · EMBED ERRORS COMPOUND DOWNWARD LATE INTERACTION OVER THE PAGE IMAGE PAGE VLM max-sim per query token PAGE TOKENS QUERY TOKENS WHAT IT REQUIRES PER-TOKEN EMBEDDER — EXCLUDED HERE MULTI-VECTOR INDEX · ONE VEC / PATCH no OCR and no layout parser sits in front of retrieval
The left column is the stack ColQwen deletes: optical character recognition, then layout parsing, then chunking and embedding, each stage inheriting the errors of the one above it. In its place a vision-language model embeds the rendered page directly into one vector per patch, and scoring happens late — each query token is matched against its best-matching page token and those maxima are summed, so the comparison is token-against-token rather than summary-against-summary. That is also the bill: it is a multi-vector retriever, so it needs the per-token embedder this deployment rules out and an index sized by patches rather than by documents.
What it costs

It is a per-token multi-vector retriever, so it needs exactly the per-token embedder this deployment excludes, and it carries the multi-vector index size that late interaction implies.

Complementary-learning-systems consolidationComplementary-learning-systems consolidation

What it is

A governed consolidation stage modelled on fast-episodic / slow-semantic complementary learning systems, with FSRS spaced-repetition scheduling for reconsolidation, a nightly maintenance job, and LLM-arbitrated conflict resolution at the typed-edge layer.

FAST · EPISODIC turn 14:02 turn 14:07 file edit observation NIGHTLY MAINTENANCE JOB FSRS REPETITION SCHEDULE LLM-ARBITRATED CONFLICTS TYPED-EDGE REWRITE SLOW · SEMANTIC stable preference merged entity resolved fact RECONSOLIDATION DUE → SCHEDULED BACK FOR REVIEW MEASUREMENT STATUS consolidation-on against consolidation-off was never run AND NOTHING IN IT TOUCHES UTILITY / ACCESS-CONTROL / FORGETTING A/B ARM · NONE
Episodic rows are written fast and unfiltered; a nightly maintenance job is the only thing that promotes them into the slow semantic store. That job runs three governed stages — an FSRS spaced-repetition schedule, LLM arbitration of contradictions, and a rewrite at the typed-edge layer — and the schedule feeds back so consolidated items come due for reconsolidation. The whole stage is built and running, but no consolidation-on against consolidation-off arm exists, so its retrieval effect is unmeasured and none of it addresses the utility / access-control / forgetting trilemma.
What it costs

It is built but not benchmarked — no consolidation-on against consolidation-off arm exists, so the retrieval effect of the entire stage is unmeasured, and nothing in it touches the utility / access-control / forgetting trilemma.

Confidence-weighted typed edgesConfidence-weighted typed edges

What it is

This system's graph layer is a single edge table whose rows are bitemporal, typed, confidence-weighted and CRDT-syncable with cascade-delete integrity, written by five producers, feeding a neighbour boost and an edge-degree activation multiplier on the default fused path.

FIVE WRITERS INGEST EXTRACTOR CONSOLIDATOR SYNC PEER MANUAL EDIT ONE EDGE TABLE src → dst · type · conf · time BITEMPORAL TYPED CONFIDENCE CRDT-SYNC CASCADE-DELETE INTEGRITY ONE TABLE, NOT A GRAPH DB CONSUMERS NEIGHBOUR BOOST EDGE-DEGREE ACTIVATION × THE ONE LANE WHERE RETRIEVAL NUMBERS ARE PUBLISHED EDGE TABLE · 0 ROWS EVERY DEGREE = 0 MULTIPLIER × 1.0 · NEVER EXERCISED the entity-edge build sits behind a flag that defaults off and appears in no arm report
Five separate producers write into a single edge table whose rows are bitemporal, typed, confidence-weighted, CRDT-syncable and cascade-delete safe, and two consumers on the default fused path read it: a neighbour boost and an edge-degree activation multiplier. On the one lane where retrieval numbers are actually published, that table held zero rows, because the harness only builds entity edges behind a flag that defaults off. Every node's degree was therefore zero, the multiplier was a constant 1.0, and no published number has ever exercised the confidence weighting.
What it costs

On the one lane where retrieval numbers are published the edge table was empty — the harness only builds entity edges behind a flag that defaults off and appears in none of the arm reports — so edge degree was uniformly zero and the confidence weighting has never been exercised by a published number.

connector_burst_anomaly (same-origin re-ingestion scoring)connector_burst_anomaly (same-origin re-ingestion scoring)

What it is

A poisoning-guard signal in TerranSoul's ingest path: it measures the incoming source's share of a bounded window of recent connector-authored rows and feeds that score to the write gate, so repeated re-ingestion from one origin — the MINJA persistence pattern of establishing a claim by repetition — raises the anomaly value. It is computed once per document, deliberately snapshotting the window before a document's own chunks are written so a large legitimate document cannot look concentrated against itself.

BOUNDED WINDOW · RECENT CONNECTOR-AUTHORED ROWS ONE ORIGIN HOLDS 7 OF 12 share = 0.58 → anomaly BURST SCORE WRITE GATE SNAPSHOT READ WINDOW ONCE SCORE EVERY CHUNK COMPUTED ONCE PER DOCUMENT BLIND SPOT ONE CLAIM, MANY ORIGINS → SHARE STAYS LOW · NO TRIP it scores source concentration, not content — and no MINJA or PoisonedRAG run stands behind it
The signal takes a bounded window of the most recent connector-authored rows and measures what share of it belongs to the incoming source, then hands that score to the write gate — so the MINJA pattern of establishing a claim by repeated re-ingestion from one origin pushes the anomaly value up. The window is read once per document and every chunk of that document is scored against the same snapshot. It is pinned by regression tests and never benchmarked, and because it scores concentration rather than content, an injector who spreads the identical claim across many origins keeps the share low and never trips it.
What it costs

Built and pinned by regression tests but never benchmarked — there is no MINJA or PoisonedRAG run behind it — and it scores source concentration rather than content, so an injector that spreads the same claim across diverse origins does not trip it.

Context packing (retrieve → context pack → generate)Context packing (retrieve → context pack → generate)

What it is

The middle step of this system's default RAG path over a single substrate: retrieved units are assembled into the prompt payload before generation, supported by contextual retrieval at ingest, late chunking, and parent-child resolution in which a matched sub-chunk resolves to its larger parent at query time.

DEFAULT RAG PATH · ONE SUBSTRATE RETRIEVE CONTEXT PACK GENERATE MEASURED ONLY END-TO-END · AS THE MODE’S SCORE CONTEXTUAL RETRIEVAL DOC CONTEXT CHUNK ONE STORED UNIT PREPENDED AT INGEST LATE CHUNKING EMBED WHOLE DOC SPLIT AFTER EMBEDDING PARENT–CHILD RESOLUTION PARENT MATCH → RESOLVES UP SUB-CHUNK → PARENT AT QUERY TIME three supports feed one packing step, and only the whole path ever gets a number
The default path is retrieve, pack, generate over a single substrate: matched units are assembled into the prompt payload before the model is called. Three mechanisms feed that middle step — document context prepended at ingest, chunk boundaries applied after the whole document is embedded, and a matched sub-chunk resolving to its larger parent at query time. All three are built and none is benchmarked on its own, so the only number that exists is the mode's end-to-end score and the packing step's own contribution is unknown.
What it costs

It is only ever measured end-to-end as the mode's score — parent-child resolution, contextual retrieval and late chunking are built but never benchmarked in isolation, so the packing step's own contribution is unknown.

Coverage gating / coverage floor on the judgeCoverage gating / coverage floor on the judge

What it is

An internal guard on TerranSoul's judge rerank path: if the judge returns usable scores for less than a floor fraction of the candidate pool, the whole verdict is discarded and the base retrieval order is kept, so partial coverage cannot masquerade as a full ranking. It was extended to the listwise path after the permutation parser was found backfilling documents the model never named, turning a three-of-twenty reply into a well-formed permutation applied wholesale over RRF.

CANDIDATE POOL 3 OF 10 CAME BACK WITH USABLE SCORES COVERAGE 0.30 FLOOR BELOW THE FLOOR OUTCOME WHOLE VERDICT DROPPED BASE ORDER KEPT WHY IT WAS EXTENDED TO THE LISTWISE PATH the permutation parser back-filled documents the model never named, so a partial verdict could read as a complete ranking THE GATED LISTWISE JUDGE STILL RANKED BELOW PLAIN RRF
The judge is asked to score a pool of candidates, and here only three of ten come back with usable scores — a coverage of 0.30, under the floor. Rather than rank on the fraction that answered, the gate discards the entire verdict and keeps the base retrieval order, so partial coverage can never masquerade as a full ranking. It was extended to the listwise path after the permutation parser was caught back-filling documents the model never named; the floor buys output integrity, not ranking quality, and it throws away the scored portion along with the rest.
What it costs

It only makes malformed verdicts impossible — the coverage-gated listwise judge still ranked worse than plain RRF, so the floor bought output integrity, not ranking quality, and it throws away the scored portion along with the unscored one.

CRDT syncCRDT sync

What it is

This system's edge table is stored in a conflict-free replicated form, so memory written on separate replicas can merge without a central coordinator; the same governed write path carries provenance, typed edges and ACLs beside the CRDT sync.

REPLICA A · EDGE TABLE alice → acme bob → acme dana → acme PER-EDGE CRDT METADATA NO COORDINATOR REPLICA B · EDGE TABLE alice → acme bob → acme eve → acme WRITTEN WHETHER OR NOT B EXISTS MERGED STATE · UNION, ORDER-INDEPENDENT ALICE → ACME BOB → ACME DANA → ACME EVE → ACME NO MULTI-REPLICA CONVERGENCE RESULT IS PUBLISHED
Each replica holds its own copy of the edge table, and every row carries replication metadata beside the edge itself — the accent segment on the right of each row — alongside the provenance, typing and ACLs the governed write path already attaches. Because the representation is conflict-free, the two replicas exchange state directly and the merged table is the union, independent of arrival order, with no central coordinator to elect or wait on. The overhead is paid on every write whether or not a second replica ever exists, and no convergence measurement is published: it is built, not benchmarked.
What it costs

Built, not benchmarked — no multi-replica convergence result is published, and the replication metadata is per-edge overhead paid on every write whether or not a second replica exists.

Edge-degree activation multiplierEdge-degree activation multiplier

What it is

Internal machinery applied after RRF fusion on TerranSoul's default path: each row's fused score is multiplied by a bounded factor built from log-scaled access count and log-scaled graph edge degree. The factor is capped at 1.0 with a protective floor, so it attenuates stale, disconnected rows toward the floor and never inflates a score above what fusion produced.

AFTER RRF FUSION r1 r2 r3 r3 · STALE, 0 EDGES ACTIVATION MULTIPLIER log(access count) log(edge degree) f = clamp(floor, 1.0) MULTIPLY, NEVER BOOST AFTER ACTIVATION r1 r2 r3 AT FLOOR CAPPED — NO ROW RISES ON THE ONLY LANE WITH PUBLISHED NUMBERS edge_degree = 0 for every row — half the multiplier moved nothing on this page
After RRF produces a fused score for each row, that score is multiplied by a factor assembled from log-scaled access count and log-scaled graph edge degree. The factor is capped at 1.0 with a protective floor, so it is purely an attenuator: a well-used, well-connected row keeps its fused score, while a stale row with no edges is pulled down toward the floor and no row can ever be lifted above what fusion gave it. On the lane whose numbers are published, though, the edge table was empty — edge degree was zero for every row, leaving the connectivity half of the factor constant and contributing nothing to any figure shown.
What it costs

On the only lane with published retrieval numbers the edge table was empty, so edge degree was uniformly zero and the connectivity half of the multiplier contributed nothing to any figure on the page.

Evidence-support diagnostic LLM call (no answer-generation stage)Evidence-support diagnostic LLM call (no answer-generation stage)

What it is

The single LLM call in TerranSoul's retrieval harness: it asks whether the retrieved sessions contain enough to answer the question, and is deliberately never shown the reference answer, with a regression test enforcing that omission. The harness contains no generator prompt and no completion call anywhere.

THE ONLY LLM CALL IN THE RETRIEVAL HARNESS QUESTION RETRIEVE SESSIONS EVIDENCE-SUPPORT CHECK ONE DIAGNOSTIC CALL ENOUGH TO ANSWER? YES / NO NEVER SHOWN TO THE CALL PINNED BY A REGRESSION TEST REFERENCE ANSWER EXISTS IN THE DATASET NO GENERATOR PROMPT NO COMPLETION CALL it measures whether the EVIDENCE was retrieved, never whether an answer is right SO ANSWER ACCURACY CANNOT COME FROM THIS HARNESS — THE QA BLANK IS STRUCTURAL
The harness runs one language-model call and it is diagnostic: given the retrieved sessions, does this evidence contain enough to answer the question. The reference answer sits in the dataset but is deliberately withheld from that call, and a regression test exists to keep it withheld. The dashed empty box is the point of the figure — there is no generator prompt and no completion call anywhere downstream. That absence is why LongMemEval answer accuracy cannot be produced from this harness at all, rather than being a run that was never finished.
What it costs

It measures whether evidence was retrieved, not whether an answer is right, so LongMemEval answer accuracy cannot be produced from this harness at all — the QA blank is structural, not an unfinished run.

Extract-consolidate-update vector pipeline (Mem0)Extract-consolidate-update vector pipeline (Mem0)

What it is

Mem0 sells the memory layer as a bought component: a pipeline that extracts candidate facts from a conversation, consolidates them against what is already stored, and updates the vector store accordingly. It sits in the same class as Zep/Graphiti's bitemporal graph and Letta's OS-style paging runtime.

IN YOUR APP BOUGHT COMPONENT — STORE + POLICY OUTSIDE THE DEPLOYMENT CONVERSATION TURNS EXTRACT CANDIDATE FACTS CONSOLIDATE AGAINST STORED UPDATE VECTOR STORE SUBSTRATE IS VECTORS salary → 90k salary → 120k ONE POINT PER FACT BITEMPORAL GRAPH, FOR CONTRAST TRUTH CARRIES AN INTERVAL VALID 2024→2026 VALID 2026→NOW a vector has no place to say WHEN a fact was true — only that it was said
The bought layer is a three-stage pipeline: candidate facts are extracted from the conversation, consolidated against whatever is already stored, and the vector store is updated accordingly. Only the first box sits inside the deployment; the store and the policy that decides which claim survives live on the other side of the dashed line. Because the substrate is vectors, two versions of the same fact become two nearby points with nothing to distinguish them but recency. A bitemporal graph gives the same fact a validity interval, which is the representation this pipeline has no native place for.
What it costs

Buying the layer puts the store and its consolidation policy outside the deployment, and the pipeline's substrate is vectors, so facts whose truth changes over time have no native representation the way a bitemporal graph gives them.

FSRS reconsolidationFSRS reconsolidation

What it is

This system's consolidation stage re-schedules stored memories using FSRS, a spaced-repetition scheduling algorithm, inside a complementary-learning-systems design with a nightly maintenance job, LLM-arbitrated conflict resolution at the typed-edge layer, and a heuristic-core write policy.

CONSOLIDATION · COMPLEMENTARY LEARNING SYSTEMS FAST STORE SLOW STORE NIGHTLY MAINTENANCE FSRS SCHEDULE LLM ARBITER CONFLICT MEASUREMENT ARM A · CONSOLIDATION ON NO RUN ARM B · CONSOLIDATION OFF NO RUN Δ retrieval = unmeasured built and running nightly — but no arm turns it off, so its retrieval effect is unknown UTILITY / ACCESS-CONTROL / FORGETTING TRILEMMA · UNTOUCHED
Writes land in a fast store under a heuristic policy; a nightly maintenance job then replays them into the slow store, re-scheduling each memory with FSRS so a reviewed item's decay curve resets and its next visit is pushed further out. The same job hands contradictions at the typed-edge layer to an LLM arbiter, which picks the surviving edge. Every box on the left is implemented and runs, but the right-hand panel is the whole evidence base: no consolidation-on versus consolidation-off arm has ever been run, so the retrieval effect of the entire stage is a blank.
What it costs

Built, not benchmarked — no consolidation-on against consolidation-off arm exists, so the retrieval effect of the whole stage is unmeasured, and nothing in it touches the open utility / access-control / forgetting trilemma.

Information-flow-control kernelsInformation-flow-control kernels

What it is

Internal machinery on this system's learned-and-robust frontier: kernels that track where a value came from and constrain what untrusted retrieved content is allowed to influence, in the CaMeL capability/information-flow lineage, paired with semantic-entropy scoring. Committed and tested inside the system, but off by default.

RETRIEVED VALUES · LABELS doc-1 TRUSTED doc-2 UNTRUSTED doc-3 UNTRUSTED THE LABEL TRAVELS WITH IT IFC KERNEL · CAPABILITY CHECK ANSWER TEXT TOOL CALL / WRITE MAY INFORM, NEVER CAUSE SEMANTIC ENTROPY LOW HIGH ABSTAIN ABOVE THRESHOLD STATUS COMMITTED & TESTED DEFAULT OFF NO BENCH ARM NO NUMBER, NO PATH
Each retrieved value carries a label from the moment it enters, and the label travels with it rather than being re-inferred downstream. The kernel then checks capability at the outlet, not at the input: untrusted content is allowed to inform the answer text and is refused permission to cause a tool call or a durable write, which is the CaMeL distinction between influencing and acting. A semantic-entropy score runs beside it, abstaining when the model's own answers disagree with each other. It is committed and tested but default-off, has no benchmark arm, and its full CaMeL form would need a second privileged planner model this deployment excludes.
What it costs

Built, not benchmarked — it has never cleared a never-regress floor, so it carries no number and is not on any default path, and the full CaMeL form needs a second privileged planner model this deployment excludes.

Learned (heuristic-core) write policyLearned (heuristic-core) write policy

What it is

The component that decides what gets written to memory in the governed-consolidation stage; its 'learned' framing sits on a heuristic core rather than a trained model. It appears both in the consolidation stage and again on the default-off learned-and-robust frontier.

CANDIDATE WRITES stated fact preference correction small talk WRITE POLICY · “LEARNED” salience threshold novelty vs. store recency + decay HEURISTIC CORE · NOT TRAINED OUTCOME WRITTEN TO MEMORY DROPPED OFFLINE RL UPDATE · OUT OF SCOPE BUILT · DEFAULT OFF NO WRITE-POLICY-ON VS -OFF ARM APPEARS TWICE · SAME CORE
Every candidate write is scored by a policy whose visible body is three hand-set rules — a salience threshold, novelty against what is already stored, and a recency-and-decay term — and whose output is a binary keep or drop. The word "learned" describes the framing, not the mechanism: the offline reinforcement-learning loop that would close the arrow back from outcome to policy is an explicit boundary of the design, so the return path is drawn and struck out. The same core is the one that reappears on the default-off frontier, and no run has ever compared write-policy-on against write-policy-off.
What it costs

It is built but not benchmarked and stays off by default — no write-policy-on against write-policy-off arm exists — and the offline reinforcement-learning loop that would make it genuinely learned is a stated boundary this design excludes.

MaxSim kernelMaxSim kernel

What it is

The late-interaction scoring operator from the ColBERT line — for each query token vector take its maximum similarity against the document's token vectors and sum — committed in TerranSoul beside MUVERA fixed-dimensional encodings, which reduce MaxSim to a single vector that rides a standard ANN index instead of a multi-vector store.

MAXSIM · MAX OVER DOC TOKENS, THEN SUM t1t2t3t4t5t6t7t8 q1 q2 q3 0.81 0.64 0.72 SCORE 2.17 QUERY TOKENS ONE MAX PER QUERY TOKEN, SUMMED MUVERA · FDE COLLAPSES IT TO ONE VECTOR COMMITTED DEFAULT-OFF MULTI-VECTOR DOC FDE ONE VECTOR STANDARD ANN INDEX NEVER BENCHED — HAS MOVED NO PUBLISHED NUMBER, AND CANNOT SHIP UNTIL ITS FLOOR CLEARS
Late interaction keeps both sides as token vectors: every query token is compared against every document token, the largest similarity in each row is taken, and those per-token maxima are summed into the document score. The grid is the whole operator — one highlighted cell per query row, nothing else contributes. MUVERA sits beside it in the same commit and removes the multi-vector store from the serving path by encoding a document into a single fixed-dimensional vector whose inner product approximates the MaxSim sum, so an ordinary ANN index can serve it. Both are committed default-off and unbenchmarked, so neither has ever influenced a number on this page.
What it costs

It is committed default-off and has never been benchmarked, so it has never influenced a published number on this page and cannot be switched on until its own bench clears the never-regress floor.

Neighbour boost on the fused pathNeighbour boost on the fused path

What it is

Internal machinery of TerranSoul's default retrieval path: after fusion, candidates that share genuine lexical terms with the query act as seeds, and their live neighbours in the typed edge table receive a confidence-weighted, capped score increment. It runs by default rather than behind a flag, unlike cascade expansion and personalized PageRank.

FUSED ORDER · LEXICAL SEEDS c1 c2 SEED c3 c4 SEED c5 TYPED EDGE TABLE · LIVE mentions follows 1 HOP CAPPED INCREMENT CAP ON THE PUBLISHED BENCH LANE ENTITY-EDGE FLAG OFF EDGE TABLE EMPTY NOTHING TO BOOST
After fusion, the candidates that share genuine lexical terms with the query become seeds; their one-hop neighbours in the typed edge table are looked up, and each neighbour takes a confidence-weighted score increment held under a cap so a dense region cannot run away with the ranking. Two-hop nodes are never reached. It runs by default, unlike cascade expansion and personalized PageRank, which sit behind flags. The bench harness, though, only builds entity edges under a flag that defaults off, so the edge table was empty for every published LongMemEval number — the seeds resolved to no neighbours and the boost has never moved a measured result on the lane where retrieval numbers are published.
What it costs

The bench harness only builds entity edges under a flag that defaults off, so the edge table was empty for every published LongMemEval number — the neighbour boost found nothing to boost and has never influenced a measured result on the lane where retrieval numbers are published.

Nightly maintenance jobNightly maintenance job

What it is

TerranSoul's off-hot-path background job that carries the governed-consolidation stage: complementary-learning-systems consolidation with FSRS reconsolidation, LLM-arbitrated conflict resolution at the typed-edge layer, and a heuristic-core write policy, run on a schedule rather than during a turn.

HOT PATH · EVERY TURN NO CONSOLIDATION ON THIS PATH NIGHTLY JOB · OFF THE HOT PATH, ON A SCHEDULE CLS CONSOLIDATION + FSRS RECONSOLIDATION LLM-ARBITRATED CONFLICTS · TYPED EDGES WRITE POLICY HEURISTIC CORE STATUS BUILT · NO ON / OFF ARM RUN A FAILURE HERE RAISES NO USER SIGNAL
Turns run along the top lane and never pay for consolidation; everything below the dashed line happens on a schedule instead. The job carries the whole governed-consolidation stage in sequence — complementary-learning-systems consolidation with FSRS reconsolidation, then LLM-arbitrated conflict resolution over the typed-edge layer, then the heuristic-core write policy. Keeping it off the hot path is what makes it affordable and also what makes it invisible: no on-versus-off arm has ever measured its retrieval effect, and a night where it fails looks exactly like a night where it succeeded.
What it costs

Built, not benchmarked — no consolidation-on against consolidation-off arm exists, so the retrieval effect of the entire stage is unmeasured, and running off the hot path means a silent failure surfaces in no user-visible signal.

Permutation parsing with backfill (the missing quality gate)Permutation parsing with backfill (the missing quality gate)

What it is

The listwise judge returns a reordering of candidate documents as a permutation of their identifiers; this system's parser filled in whatever identifiers the model left out. A reply naming three of twenty documents therefore emerged as a complete, well-formed permutation.

LISTWISE JUDGE · 20 CANDIDATES IN 20 CANDIDATE DOCS LISTWISE JUDGE [ 7, 2, 15 ] 3 OF 20 NAMED PARSER BACKFILL the parser supplies every identifier the model left out, so non-coverage never surfaces OUT · WELL-FORMED PERMUTATION OF 20 3 JUDGED · 17 INVENTED — INDISTINGUISHABLE COVERAGE FLOOR ADDED AFTER REORDER OVER RRF
Twenty candidates go to the listwise judge, which is asked to return them as a permutation of their identifiers; the reply names three. The parser then fills in the seventeen it omitted, and what leaves the stage is a complete, well-formed permutation in which a judged rank and an invented one look identical — so a mostly fabricated ordering was applied wholesale over RRF, including on the max path whose R@5 100.0 was measured with no coverage check in place. The coverage floor shown before the reorder step was added afterwards, and it rejects a reply like this instead of repairing it.
What it costs

The backfill hid the judge's non-coverage instead of rejecting it, so a mostly invented ordering was applied wholesale over RRF — including on the max path, whose R@5 100.0 was achieved despite an ungated judge; a coverage floor was added afterwards.

Provenance trackingProvenance tracking

What it is

Part of this system's governed write path: every autonomous durable write is recorded with its origin alongside typed edges, ACL and CRDT sync, so a stored memory can be traced back to the producer that wrote it and repeated same-origin re-ingestion can be scored as an anomaly.

PRODUCERS AGENT LOOP CHAT TURN TOOL RESULT GOVERNED DURABLE WRITE memory #4821 STORED ORIGIN=AGENT:X TYPED EDGES ACL CRDT SYNC WHAT ORIGIN BUYS TRACE BACK answer → mem → agent:x REPEATED SAME ORIGIN anomaly score ↑ ORDER OF EVENTS WRITE LANDS ANSWER USES IT TRACED ATTRIBUTABLE AFTERWARDS — NOT PREVENTED NO MINJA / POISONEDRAG NUMBER
Every autonomous durable write is stamped with the producer that made it, and that origin field is stored alongside the typed edges, the ACL and the CRDT sync state rather than being derived later. Two things become possible: an answer can be walked back through the memory it cited to the agent, chat turn or tool result that wrote it, and repeated re-ingestion from one origin can be scored as an anomaly. The timeline is what limits it — the stamp is applied as the write lands, so a bad write is attributable after it has already been used, not blocked. The row carries no MINJA or PoisonedRAG evaluation, so how much of that attack surface it actually closes is unmeasured.
What it costs

Built, not benchmarked — provenance makes a bad write attributable after the fact rather than preventing it, and the row it belongs to has no MINJA or PoisonedRAG evaluation on record.

Read-path spotlighting / trust-boundary fencing of retrieved blocksRead-path spotlighting / trust-boundary fencing of retrieved blocks

What it is

On this system's read path every retrieved block is wrapped in an explicit trust-boundary fence that marks it as data to ground an answer on, never as instructions to obey — so text injected into a retrieved passage reaches the model as quoted content rather than as a directive.

UNFENCED · ONE FLAT CHANNEL system instructions passage 1 · passage 2 ignore the above → do X RETRIEVED TEXT IS A PEER OF THE PROMPT → READ AS A DIRECTIVE FENCED AT THE READ PATH · EVERY BLOCK « retrieved data begins » ignore the above → do X « ends » ground on it, do not obey DATA, NEVER INSTRUCTIONS → READ AS QUOTED CONTENT STATUS BUILT ON EVERY READ NO INJECTION EVAL NO ARM ISOLATES IT a prompt-level convention: the fence is stated, never tested, and the model can still disregard it
Without a fence, a retrieved passage arrives in the same flat channel as the system prompt, so an instruction planted inside it is read as an instruction. The read path wraps every retrieved block in an explicit trust boundary that marks the span as data to ground an answer on and not as commands to follow, so injected text reaches the model as quoted content. The mechanism is built and running on every read, but no arm isolates it and no injection evaluation tests whether the fence holds — it remains a convention the model is free to ignore.
What it costs

Built, not benchmarked: no arm isolates the corrective loop and no injection evaluation tests whether the fence holds, so it remains a prompt-level convention the model can still disregard.

Reason-then-rank rerankerReason-then-rank reranker

What it is

A Stage 11 reranker layered over TerranSoul's existing LLM judge that has the model reason about the candidates before emitting an ordering. It is committed and tested but shipped default-off.

INCOMING ORDER c1 c2 c3 c4 c5 REASON, THEN RANK WHY EACH CANDIDATE DOES OR DOES NOT ANSWER THE QUERY THEN EMIT AN ORDERING REASONED ORDER c3 ↑2 c1 c5 ↑2 c2 c4 NEVER-REGRESS FLOOR · COMMITTED AND TESTED, NOT CLEARED FLOOR THIS PATH BELOW FLOOR → DEFAULT-OFF NO MEASURED NUMBER PUBLISHED
The Stage 11 reranker wraps the existing LLM judge in one extra step: instead of emitting an ordering directly, the model first states why each candidate does or does not answer the query, and only then commits to an order — so the ranking is conditioned on an explicit argument rather than on a bare score. It is committed and tested, and in isolation it does move candidates. What it has not done is clear its own never-regress bench floor, so it ships default-off and carries no measured number, which leaves it an unexercised path on the published retrieval lane.
What it costs

It has not cleared its own never-regress bench floor, so it is off by default and carries no measured number — an unexercised path on the published retrieval lane.

Reasoning-effort dial (ReasoningEffort::Medium vs Off)Reasoning-effort dial (ReasoningEffort::Medium vs Off)

What it is

The single knob separating the think rung from the chat rung once reordering was dropped: both run identical retrieval at the same cost, and think simply spends more reasoning effort (ReasoningEffort::Medium against Off) on the answer.

TWO RUNGS · ONE KNOB APART MODE RETRIEVAL EFFORT DIAL ANSWER chat HYBRID RETRIEVE ReasoningEffort::Off GENERATED TEXT think HYBRID RETRIEVE ReasoningEffort::Medium GENERATED TEXT SAME UNITS, SAME COST · EVERYTHING LEFT OF THE DIAL IS IDENTICAL SCORED? RETRIEVAL → SCORED EFFECT LANDS HERE → ANSWER → NEVER READ the harness never opens the answer, so whatever the dial buys has no number on this page
Once reordering was dropped from the think rung, chat and think run the same retrieval over the same units at the same cost; the single remaining difference is the reasoning effort passed to the model, Off against Medium. That difference can only show up in the generated answer. The harness scores the retrieved set and never reads an answer, so the dial's effect falls entirely outside what is measured — making it visible needs an answer-generation and judging stage that does not yet exist.
What it costs

The harness scores retrieval and never reads an answer, so whatever the dial buys is invisible in every number on the page — making it measurable needs an answer-generation and judging stage that does not yet exist.

Metrics · 5

Faithfulness scoring / hallucination detection suites (e.g. FaithJudge)Faithfulness scoring / hallucination detection suites (e.g. FaithJudge)

What it is

Reference-free scores that ask a judge model whether a generated answer is actually supported by the passages retrieved for it, sitting alongside RAGAS, TruLens span tracing and MT-Bench-style LLM-as-a-judge in the observability layer. They let a team detect hallucination and catch regressions without gold labels.

REFERENCE-FREE SCORING · NO GOLD LABELS NEEDED ANSWER RETRIEVED JUDGE MODEL CLAIM 1 · OK CLAIM 2 · OK CLAIM 3 · NO faithfulness = 0.67 · scored without a reference answer WHAT THE NUMBER HIDES SAME PAIR, ORDER SWAPPED A B → A WINS B A → B WINS HIGH TEST-RETEST, STILL SEVERE POSITION BIAS AND EVEN A PERFECT SCORE WRONG EVIDENCE FAITHFUL = 1.00 ANSWER STILL WRONG
The score is produced by handing one judge model the generated answer together with the passages that were retrieved for it, and asking per claim whether the passage set supports it — no reference answer is involved, which is what makes it usable for regression watching without gold labels. The two failure modes sit beside the pipeline: the same pair of candidates judged in swapped order can flip the verdict, so a metric with high test-retest reliability can still be invalid, and published rankings move by many positions between benchmarks. The lower band shows the structural limit — an answer perfectly faithful to evidence that was retrieved wrongly scores 1.00 and is still wrong.
What it costs

They hide that the score is one LLM's opinion — judges with very high test-retest reliability also carried severe position bias and rankings that moved by many positions between benchmarks, so the number looks trustworthy while being invalid — and an answer faithful to wrongly retrieved evidence still scores well, because the metric never inspects whether retrieval failed.

Listwise judge reranking (measured −7.6 / −5.4 NDCG, negative)Listwise judge reranking (measured −7.6 / −5.4 NDCG, negative)

What it is

A measured result, not a shipped capability: an LLM judge re-ordering the whole RRF candidate list as a permutation scored NDCG@10 85.9 ungated (−7.6 against the chat baseline) and 88.1 once coverage-gated (−5.4), at roughly 4.7–4.8 s per query against ~550 ms. The gated arm is what makes it a ranking-judgement result rather than an output-format bug, since malformed permutations were impossible and the judge still lost.

THE JUDGE EMITS A PERMUTATION OF THE WHOLE LIST rrf 1 rrf 2 rrf 3 rrf 4 rrf 5 JUDGE RE-ORDERS ALL 3 1 4 2 5 GOLD FALLS 2 → 4 NDCG@10 · 50-QUESTION SLICE CHAT / RRF ORDER 93.5 BASE LISTWISE · GATED 88.1 −5.4 LISTWISE · UNGATED 85.9 −7.6 LATENCY ~550 ms → 4.7–4.8 s PER QUERY WHAT THE DELTAS HIDE ONE 50Q SLICE · ONE 12B JUDGE ON AN ALREADY NEAR-RIGHT ORDER THE SAME UNGATED PATH PRODUCED max R@5 = 100.0
Instead of scoring candidates one at a time, the judge is shown the whole RRF list and returns a permutation of it — so a gold passage sitting at rank 2 can be pushed to rank 4 by a single re-ordering decision. Measured on one 50-question slice the permutation lost ground both ways: 85.9 ungated and 88.1 once coverage-gated, against a 93.5 baseline, at roughly nine times the latency. Because the gated arm made malformed permutations impossible and still lost, the deltas indict the judge's ranking, not its output format — but they are one slice with one 12B judge, and the same ungated path is what produced max's R@5 of 100.0.
What it costs

It is one 50-question slice with one 12B judge on a corpus whose RRF ordering is already near-right, so the deltas hide that they indict this judge on this workload rather than listwise reranking generally — and they hide that the same ungated path is what produced max's R@5 100.0.

recall_ANY@k vs recall_ALL@krecall_ANY@k vs recall_ALL@k

What it is

Two recall definitions that diverge whenever a question has more than one gold session: recall_ANY@k is satisfied the moment a single gold lands inside the top k, while recall_ALL@k requires every gold to be inside it. Every R@k figure published for the LongMemEval-S arms on this page is recall_ANY@k.

ONE QUESTION · THREE GOLD SESSIONS · TOP-5 GOLD 1 NON-GOLD NON-GOLD NON-GOLD NON-GOLD RANK 1 RANK 2 RANK 3 RANK 4 RANK 5 BEYOND k GOLD 2 GOLD 3 RANKS 9 AND 14 — OUTSIDE THE TOP 5 recall_ANY@5 = 1.00 AS PUBLISHED ONE GOLD INSIDE k IS ENOUGH recall_ALL@5 = 0.00 EVERY GOLD MUST BE INSIDE k
One ranking, two scoring rules. The question has three gold sessions; the top-5 contains exactly one of them, with the other two sitting at ranks 9 and 14. recall_ANY@5 is already satisfied by that single hit and reports a perfect 1.00, while recall_ALL@5 requires all three inside the cut and reports 0.00 for the identical result list. Every R@k figure published for the LongMemEval-S arms is the ANY form, so the questions with the most golds — the ones where the headline looks strongest — are exactly where the two definitions diverge most.
What it costs

ANY@k hides the missing secondary golds — the same ranking scores far lower under ALL@k, and the gap is widest exactly on the multi-gold questions where the ANY@k headline looks best.

Reference-free evaluation of model outputReference-free evaluation of model output

What it is

Scoring generated output without a gold answer to compare against — faithfulness and groundedness suites such as RAGAS and FaithJudge, and MT-Bench's LLM-as-a-judge protocol — paired with span-level tracing of the pipeline that produced the output.

GRADED AGAINST A GOLD ANSWER OUTPUT GOLD MISMATCH IS PROVABLE TRUTH BOUNDS THE SCORE REFERENCE-FREE SCORING ANSWER CONTEXT SPANS JUDGE NO GOLD ROW TO CONTRADICT IT RAGAS · FAITHJUDGE · MT-BENCH FAITHFULNESS .94 GROUNDEDNESS .88 JUDGE FAILURES RIDE ALONG SPAN TRACE · WHERE THE NUMBER CAME FROM RETRIEVE RERANK GENERATOR ABSTAINS FAITHFUL 1.00 STILL PASSES
With a gold answer present, a wrong output is contradicted by a row the scorer can point at. Reference-free suites remove that row: the answer and its retrieved context are handed to a judge model, which emits faithfulness and groundedness directly, so every failure mode of the judge is inherited by the number it produces. The span trace underneath records which stage produced what — and shows the shape that survives the metric, where the generator abstains rather than answering and the faithfulness score reads a perfect 1.00.
What it costs

Because there is no reference to contradict it, the score inherits the judge's own failures and can look healthy while the pipeline abstains or degrades its way to a good-looking number.

Semantic entropySemantic entropy

What it is

An uncertainty measure that groups a model's sampled answers by meaning and computes entropy over those meaning clusters as a hallucination or confidence signal. In TerranSoul it exists as a Stage 11 kernel alongside information-flow-control kernels, committed and default-off.

k SAMPLES, ONE QUESTION “1968” “in 1968” “the year 1968” “1972” “around 1970” CLUSTER BY MEANING SAME MEANING ×3 OTHERS ×2 ENTROPY OVER CLUSTERS p(MEANING A) p(OTHERS) H = 0.67 → flag THE FAILURE IT CANNOT SEE ONE CLUSTER — ALL WRONG H ≈ 0 READS CONFIDENT NOT TRUE STAGE 11 KERNEL · COMMITTED · DEFAULT OFF · NO MEASURED NUMBER
The same question is sampled several times and the answers are grouped by what they mean rather than by their surface strings, so three different wordings of 1968 collapse into one cluster; entropy is then computed over the cluster probabilities and a spread distribution raises the flag. The bottom band is the case the measure is blind to: when every sample agrees on the same wrong answer, there is exactly one cluster, entropy goes to zero, and the signal reports confidence. It measures agreement among the model's own samples, never truth — and in TerranSoul it sits as a committed Stage 11 kernel that is off by default, with no number attached.
What it costs

It scores how much the model's own samples disagree, not whether they are true, so an answer the model is consistently and confidently wrong about registers as low entropy — and here it is default-off with no measured number at all.

Disciplines and operating rules · 4

Deliberate forgetting / store shrinkageDeliberate forgetting / store shrinkage

What it is

The Stage 9 stance that a memory store should be able to get smaller and better rather than only larger: writes are reviewed at the gate and background consolidation resolves contradictions off the hot path. It is the first stage that treats forgetting as a feature rather than as data loss.

APPEND-ONLY STORE EVERY WRITE KEPT · CONTRADICTIONS PILE UP GATED, THEN CONSOLIDATED WRITE GATE KEPT REFUSED BACKGROUND CONSOLIDATION SMALLER AND BETTER, OFF THE HOT PATH WHAT CANNOT BE SHOWN utility + access control + reliable forgetting: no method has all three at once
An append-only store only grows: every write is kept, so contradictory claims accumulate side by side and the newest bar is always the longest. The Stage 9 stance splits that into two moves — the write gate refuses some candidates before they become rows, and background consolidation resolves the contradictions that did get in, off the hot path. The store can then end up smaller than it was and better than it was, which is the first time forgetting is treated as a feature rather than as data loss. What the bottom band records is that no current method has demonstrated utility, access control and reliable forgetting together.
What it costs

GateMem finds no current method achieves utility, access control and reliable forgetting at the same time — a trilemma, not a backlog — so a store that promises to forget cannot yet prove it did.

Fail-open judge discipline (judges never veto)Fail-open judge discipline (judges never veto)

What it is

A standing rule governing every LLM judge on the read path: a judge may reorder or annotate candidates but never veto them, and when it errors or returns nothing, retrieval proceeds ungraded. It was adopted after the DEAD-JUDGE-1 incident, in which a stale model tag silently erased all recall.

CANDIDATES JUDGE WHAT REACHES THE ANSWER A B C D E JUDGE · HEALTHY C A E B D SAME FIVE, REORDERED A B C D E JUDGE · ERROR A B C D E UNGRADED, UNCHANGED a judge may reorder or annotate the set; it may never remove from it THE REJECTED ALTERNATIVE · A JUDGE THAT MAY VETO A B C D E JUDGE · STALE TAG NOTHING RETURNED RECALL → 0 DEAD-JUDGE-1 · A STALE MODEL TAG SILENTLY ERASED ALL RECALL
On the read path a judge is allowed to change the order of the candidate set and to annotate it, but the set that leaves is always the set that arrived. When the judge errors or returns nothing, the candidates pass through ungraded in their base order rather than being dropped. The rejected alternative is drawn below: a judge with veto power and a stale model tag returns nothing, and nothing is exactly what reaches the answer — the DEAD-JUDGE-1 incident. The cost of fail-open is that bad evidence is never filtered out either, and a silently broken judge degrades to no judging at all.
What it costs

It gives up the judge's ability to remove bad evidence — a silently broken judge degrades to no judging at all, and nothing on the read path is ever filtered out.

One-arm-per-process bench isolation (cross-arm contamination control)One-arm-per-process bench isolation (cross-arm contamination control)

What it is

A measurement rule: each benchmark arm runs in its own process with its own store, rather than several systems sharing one process and one store. It is adopted because cross-arm contamination in a shared process was demonstrated — the same questions and binary produced different orderings depending on which other arms ran alongside.

SHARED PROCESS · ONE STORE ARM A ARM B ARM C ONE PROCESS ONE STORE 20/50 ORDERINGS DIFFER ONE ARM PER PROCESS · OWN STORE ARM A STORE ARM B STORE ARM C STORE REPEATABLE THE COST · TWO METHODOLOGIES ON ONE PAGE shared-process numbers are not retired — comparing them compares methods, not systems
On the left, three arms share one process and one store: the arms can influence each other's state, and the same binary answering the same questions produced twenty different orderings out of fifty depending on which neighbours ran alongside. The rule on the right gives every arm its own process and its own store, so a rerun of the same input reproduces the same ranking. The cost is at the bottom — numbers set under the older shared-process method are still published beside numbers set under this one, so a reader comparing across that line is comparing two methodologies rather than two systems.
What it costs

It does not retire numbers that were set under the older shared-process methodology, so results measured both ways sit on the same page and a reader comparing them is comparing two methodologies, not two systems.

Span-level tracingSpan-level tracing

What it is

An observability practice, carried by tools like TruLens, RAGAS and LangSmith, that records each step of a RAG or agent pipeline — retrieve, rerank, judge, generate — as its own timed, inspectable span. It lets a failure be localised to a span instead of to the pipeline as a whole, and by 2025–2026 standardised on OpenTelemetry GenAI semantic conventions.

ONE REQUEST · ONE TIMED SPAN PER STAGE retrieve 180 ms rerank 120 ms judge 300 ms generate 90 ms OTEL GENAI SEMCONV · SAME ATTRIBUTE NAMES ACROSS TOOLS RECORDED PER SPAN span.name start / end model tokens error A SPAN ANSWERS WHERE IT HAPPENED · YES WHETHER IT IS RIGHT — STILL AN LLM JUDGE
Each stage of the pipeline emits its own span with a start, an end and its own attributes, so the request becomes a waterfall in which one bar — here the judge at 300 ms — is visibly the cost, and a failure lands inside a named span instead of somewhere in the pipeline. Standardising those attribute names on the OpenTelemetry GenAI conventions is what lets spans from different tools be read together. The lower band is the boundary: the trace establishes where an answer was produced, never whether it is correct, and the correctness verdict still comes from the same unreliable judge — bought by instrumenting every call path.
What it costs

It shows where an answer was produced, not whether it is correct — the correctness verdict still comes from an unreliable LLM judge — and it adds instrumentation plumbing to every call path.

Attacks · 3

Memory lifecycle attacks (formalized write-path attack class)Memory lifecycle attacks (formalized write-path attack class)

What it is

A 2026 formalization of adversarial manipulation aimed at the memory write path across its lifecycle — injection, persistence and later retrieval — rather than at a single prompt or turn. Its effect on the field is that write-path governance became a named target instead of an assumed defence.

ATTACK SURFACE · THE WRITE PATH ACROSS TIME ONE ADVERSARY, ALL THREE STAGES 1 · INJECT POISONED WRITE WRITE GATE 2 · PERSIST SURVIVES IN STORE 3 · RETRIEVE LATER SURFACES AS MEMORY WHAT NAMING THE CLASS DOES NOT DO MINJA · NOT EVALUATED POISONEDRAG · NOT EVALUATED 0% ATTACK SUCCESS — WITHDRAWN resistance follows structurally from blocking, not from a measurement
The 2026 formalization moves the target from a single prompt to the memory lifecycle: the adversary spans injection, persistence and later retrieval, and a write that clears the gate keeps paying off on every future turn that surfaces it. The bracket above all three stages is what the class names — write-path governance became something to attack rather than something assumed. The band below is what naming it does not settle here: TerranSoul's gate has run neither a MINJA nor a PoisonedRAG evaluation, so its resistance is a structural argument about blocking, and the 0% attack-success figure once published on that argument was withdrawn.
What it costs

Naming the class is not a defence: TerranSoul's write gate has no MINJA or PoisonedRAG evaluation, so its resistance follows structurally from blocking rather than from a measurement, and a 0% attack-success figure once published on that argument was withdrawn.

MINJA memory-injection attackMINJA memory-injection attack

What it is

A published attack in which ordinary interaction with an agent plants attacker-controlled content into its durable memory store, so the injected item persists and is retrieved on later turns rather than being confined to one prompt. MINJA reports over 95 % injection success against unguarded stores.

UNGUARDED STORE · WHAT MINJA MEASURED TURN 1 TURN 2 TURN 3 · PAYLOAD DURABLE MEMORY STORE LATER TURN OVER 95 % INJECTION SUCCESS, REPORTED GATED WRITE PATH · NEVER RUN AGAINST IT TURN 1 TURN 2 TURN 3 · PAYLOAD WRITE GATE · PROVENANCE + ANOMALY SCORE STORE · NOTHING WRITTEN STRUCTURAL, NOT MEASURED PUBLISHED 0 % ATTACK SUCCESS withdrawn — an argument, not a measurement
MINJA plants attacker-controlled content through ordinary interaction, so the item lands in the durable store and is retrieved on turns long after the conversation that carried it. The reported success rate above 95 % is measured against stores like the left panel, where a write reaches the store with nothing in between. A gated write path interposes provenance and an anomaly score, and the payload is refused before it becomes a row. The right panel is an argument from the gate's structure: no MINJA run exists behind it, which is why the 0 % figure once published was withdrawn.
What it costs

The over-95 % figure is measured against stores with no write-time defence, so it says nothing about a gated write path — and TerranSoul has never run MINJA against its own gate: the 0 % attack-success result it once published was withdrawn as an argument, not a measurement.

PoisonedRAG attackPoisonedRAG attack

What it is

A corpus-poisoning attack in which an adversary injects a small number of crafted passages into the retrieval corpus so that a target query retrieves them and the answer follows the attacker's text rather than the real evidence. It is named in this page as an evaluation the system has not run.

A FEW CRAFTED PASSAGES INTO THE CORPUS ATTACKER CORPUS AT QUERY TIME TARGET QUERY POISONED #1 POISONED #2 real passage ANSWER FOLLOWS ATTACKER TEXT WHAT THIS SYSTEM HAS AGAINST IT NO RUN NO RESULTS DIRECTORY NO BENCHMARK ROW RESISTANCE ARGUED FROM BLOCKING BEHAVIOUR — NOT MEASURED
The attack needs only a handful of crafted passages placed in the retrieval corpus, shaped so that one target query pulls them into its own top-k. Once they are in the retrieved set the generator has no way to tell them from real evidence, and the answer follows the attacker's text rather than the corpus. The lower band is this system's position against it: an audit found no run, no results directory and no benchmark row for MINJA or PoisonedRAG, so the write gate's resistance is argued from what it blocks structurally rather than from anything measured.
What it costs

There is no MINJA or PoisonedRAG evaluation behind the write gate — an audit found no run, no results directory and no benchmark row — so the gate's resistance is argued from its blocking behaviour, not measured.

Stated boundaries — deliberately NOT built · 5

Decoding-logit aggregation (stated boundary, not built)Decoding-logit aggregation (stated boundary, not built)

What it is

RobustRAG's stronger secure aggregator combines the isolated per-passage answers using the model's decoding-time token probabilities rather than the emitted text alone. It is named on this system's frontier row as explicitly not built and not planned.

BUILT · MAJORITY OVER EMITTED TEXT ANS 1 ANS 2 ANS 3 STRING VOTE TEXT ONLY A TIE HAS NOTHING LEFT TO BREAK IT NOT BUILT · NOT PLANNED · DECODING LOGITS ANS 1 ANS 2 ANS 3 p(token) PER CANDIDATE WEIGHTED AGGREGATE CONFIDENCE, NOT ONLY THE STRING WHY IT STOPS HERE NEEDS DECODER LOGITS LOCAL SERVER RETURNS TEXT HOSTED STACK → A LINE ITEM · SOVEREIGN LOCAL STACK → A HARD BOUNDARY the stronger aggregator is named on the frontier row as not built and not planned
The secure aggregator that ships combines the isolated per-passage answers by voting over the emitted strings alone, so two candidates that produce the same token carry the same weight and a tie has nothing left to break it. The stronger variant weights each isolated answer by the model's decoding-time token probabilities, which separates candidates the text cannot. That variant needs next-token probabilities from the decoder, and the local Ollama-style inference server returns text only — a line item on a hosted stack, a hard boundary on a sovereign local one.
What it costs

It needs decoding logits, which the local Ollama-style inference server does not expose — a line item on a hosted stack, a hard boundary on a sovereign local one.

Offline reinforcement-learning training loop (stated boundary, not built)Offline reinforcement-learning training loop (stated boundary, not built)

What it is

The training machinery reinforcement-learned memory management needs: Memory-R1-style policies learn add / update / delete / noop decisions from downstream reward, which requires collecting trajectories and training a policy offline. This system names it as one of four frontier items it will not build.

WHAT RL-MANAGED MEMORY REQUIRES COLLECT TRAJECTORIES DOWNSTREAM REWARD LABEL WEIGHT-LEVEL LEARNING TRAIN POLICY OFFLINE NOT BUILT ADD · UPDATE DELETE · NOOP PER MEMORY reward closes the loop only if the weights can change collecting trajectories and fitting a policy to them is an offline pass over reward-labelled data A SINGLE-FROZEN-MODEL DEPLOYMENT EXCLUDES IT BY DEFINITION · ONE OF FOUR STATED BOUNDARIES
Memory-R1-style policies learn add / update / delete / noop decisions from downstream reward rather than from hand-written rules, and the loop only closes if that reward can reach the weights. Reaching them means collecting trajectories, labelling each with its downstream outcome, and training a policy offline — the boxed step in the middle. The action head on the right and the reward signal on the left are both describable in a sovereign deployment running one frozen local model; the weight-level training pass between them is not, which is why this is recorded as one of four stated boundaries rather than a backlog item.
What it costs

It requires an offline training loop over reward-labelled trajectories — weight-level learning that a sovereign, single-frozen-model local deployment by definition excludes, which is why it is stated as a boundary rather than a backlog item.

Per-token embedder (stated boundary, not built)Per-token embedder (stated boundary, not built)

What it is

Late interaction scores query tokens against document tokens, so it needs an embedder that emits one vector per token. TerranSoul does not build it, and lists it with the offline RL loop, decoding-logit aggregation and a second privileged planner model as a stated boundary rather than a backlog item.

NEEDED · ONE VECTOR PER TOKEN tok1 tok2 tok3 MULTI-VECTOR STORE GAP AVAILABLE · ONE MEAN-POOLED VECTOR TOK1 TOK2 TOK3 MEAN ONE VECTOR TOKEN DETAIL IS GONE STATED BOUNDARY · NOT A BACKLOG ITEM PER-TOKEN EMBEDDER not built — listed beside the offline RL loop, decoding-logit aggregation and a second planner
Late interaction can only score query tokens against document tokens if the embedder hands back one vector per token, which is the left-hand structure. The local model server produces the right-hand structure instead: the token vectors are mean-pooled inside the server and a single vector per text comes out, so the per-token detail the operator needs never leaves the process. The missing piece between them is an embedder, not a scorer, and this design records it as a stated boundary alongside the offline RL loop, decoding-logit aggregation and a second privileged planner model rather than as work queued for later.
What it costs

The resource it needs is per-token multi-vector output from the local model server, and a local Ollama-style server returns one mean-pooled vector per text.

PLAID enginePLAID engine

What it is

The serving engine that makes ColBERT-style late interaction practical at scale, one of the two routes (with MUVERA's fixed-dimensional encodings) by which multi-vector retrieval becomes deployable and recovers the token-level matching a single pooled vector discards.

LATE INTERACTION · ONE VECTOR PER TOKEN QUERY DOCUMENT MAX PER Q-TOKEN ∑ = SCORE PLAID · PRUNE, THEN SCORE CENTROID CANDIDATE GEN CENTROID PRUNE FULL MAXSIM SURVIVORS ONLY BOUNDARY · SOVEREIGN SINGLE-FROZEN-MODEL DEPLOYMENT LOCAL EMBEDDER ONE POOLED VECTOR PER-TOKEN MATRIX · NOT AVAILABLE
Late interaction keeps one vector per token on both sides and scores a pair by taking, for each query token, its largest similarity against any document token and summing those maxima — so a rare identifier still matches instead of being averaged away by pooling. PLAID is what makes that affordable: centroids generate candidates, centroid-level interaction prunes most of them away, and only the survivors are decompressed for the full MaxSim pass. The prerequisite is an embedder that emits the per-token matrix at all. A local Ollama-style server returns one mean-pooled vector per text, so on a sovereign single-frozen-model deployment this is a boundary rather than a line item.
What it costs

It needs a per-token embedder, and a local Ollama-style server returns one mean-pooled vector per text — so on a sovereign single-frozen-model deployment this is a boundary, not a line item.

Second privileged planner model (stated boundary, not built)Second privileged planner model (stated boundary, not built)

What it is

Full CaMeL-style capability and information-flow control requires a second, privileged planner model running alongside the answering model to constrain what untrusted retrieved data can cause. TerranSoul does not build it and lists it as one of four frontier items that will not be built.

CAMEL SHAPE · TWO MODELS TRUSTED INPUT ONLY PRIVILEGED PLANNER SEES UNTRUSTED TEXT ANSWERING MODEL PLAN & CAPABILITIES WHAT MAY BE CALLED TOOL CALL / WRITE THIS DEPLOYMENT RESIDENT MODELS ANSWERING MODEL 1x PRIVILEGED PLANNER 2x SECOND SLOT NOT PRESENT WHY IT IS A BOUNDARY, NOT A BACKLOG ITEM On a hosted stack this is a line item; on a local frozen-model deployment it doubles the footprint. NOT BUILT, NOT PLANNED
The CaMeL arrangement needs two models with different privileges: a planner that sees only trusted input and emits the plan and the capabilities it authorises, and an answering model that reads untrusted retrieved text but whose tool calls and writes must pass the gate the plan defined. The separation is the security property — one model cannot both read attacker-controlled text and decide what may be called. This deployment has one resident model, so the second slot stays empty. Filling it doubles the local footprint, which is why it is recorded as not built and not planned rather than as a backlog item.
What it costs

It needs a second resident model, which doubles the local footprint — on a hosted stack a line item, on a local frozen-model deployment a hard boundary.

Withdrawn claims · 3

CJK trigram mirror index (WITHDRAWN claim)CJK trigram mirror index (WITHDRAWN claim)

What it is

A retired claim that a character-trigram mirror index lifted Japanese NDCG@10 from 9.5 to 42.3–65.0 at one million rows. It was withdrawn outright rather than re-published with a caveat.

CHARACTER-TRIGRAM MIRROR · WHAT THE CLAIM DESCRIBED CJK RUN · NO SPACES TO SPLIT ON c1 c2 c3 c4 c5 c6 c1c2c3 c2c3c4 c3c4c5 THE WITHDRAWAL LEDGER MEASURED BEFORE THE CROSS-LINGUAL FIX NO FULL-500 ARTIFACT ON DISK 1M-ROW SCALE NOTHING COVERS PUBLISHED ja NDCG@10 9.5 → 42.3–65.0 WITHDRAWN OUTRIGHT — NOT RE-PUBLISHED WITH A CAVEAT THE OWED RE-MEASUREMENT WAS NEVER RUN
The claim rested on a mirror index that cut an unspaced CJK run into every overlapping three-character window, so a Japanese query could match on grams where whitespace tokenisation produced nothing. Three ledger entries retired it: the numbers were taken before the cross-lingual tokenizer fix, no full-500 artifact exists on disk, and nothing on disk covers the million-row scale the figure quotes. What was published therefore described code that no longer exists at a size nothing recorded — and the re-measurement that would have settled it was never run, so the claim was withdrawn outright rather than caveated.
What it costs

Every digit predates the cross-lingual tokenizer fix and no full-500 artifact exists, so it described code that no longer exists at a scale nothing on disk covers — and the owed re-measurement was never run.

RAPTOR (explicitly absent — recorded negative finding)RAPTOR (explicitly absent — recorded negative finding)

What it is

RAPTOR is deliberately absent from this page's reference list. It appears nowhere in the source document the citations are drawn from, and that absence is recorded explicitly for auditability rather than the method being attributed to a source that never mentioned it.

SOURCE DOCUMENT · THE ONLY CITATION POOL METHOD PRESENT → CITED METHOD PRESENT → CITED RAPTOR — NOT PRESENT SCAN RESULT: ZERO OCCURRENCES WHAT THE PAGE DOES WITH THE ABSENCE RECORD THE ABSENCE AUDITABLE NEGATIVE REJECTED PATH CITE ANYWAY → MISATTRIBUTION PROVENANCE, NOT MERIT NOTHING HERE EVALUATES OR REJECTS RAPTOR · NO BENCH, NO CLAIM the record says where a citation may come from, not what the method is worth
Every reference on this page is drawn from one source document, and a scan of it returns zero occurrences of RAPTOR. Rather than silently omitting the method or attributing it to a table that does not contain it, the absence is written down as an auditable negative. The rejected path is the one where the citation is added anyway, which would misattribute the method to a source that never mentions it — so the record is about provenance, and nothing here evaluates or rejects RAPTOR on merit.
What it costs

The record is about provenance, not merit — nothing here evaluates or rejects RAPTOR, and citing it would have misattributed it to a source table that does not contain it.

Sharded write engine (~1.15M CRUD/s figure withdrawn)Sharded write engine (~1.15M CRUD/s figure withdrawn)

What it is

A sharded write path in this system, for which a throughput figure of roughly 1.15M CRUD operations per second was published and has since been withdrawn.

SHARDED WRITE PATH · BUILT ROUTER SHARD 0 SHARD 1 SHARD 2 SHARD n WRITES FAN OUT BY KEY THE PUBLISHED THROUGHPUT ~1.15M CRUD operations / second WITHDRAWN results dir — no run committed report — none git history — nothing AFTER THE WITHDRAWAL INGEST SIDE · STILL MEASURED WRITE THROUGHPUT · UNMEASURED ENGINE STAYS
The write path itself is real: a router fans each write out to its shard by key, and the code for it is in the tree. What is missing is the evidence for the number that was published on top of it — no results directory, no committed report, and nothing in history produces roughly 1.15M CRUD operations per second, so the figure is struck from the record rather than defended. The withdrawal removes the throughput claim only; the separately measured ingest rate is unaffected and the engine remains built, merely unmeasured.
What it costs

No artifact produces the number — no results directory, no committed report, nothing in history — so the engine is built but its throughput is unmeasured on the record; only the separately measured ingest side survives the withdrawal.

Measured

BenchedWhat this system has actually measured

Everything above is a mechanism. This section is the evidence: which configurations were run against a benchmark, what they scored, and which of those numbers are bound — recorded in docs/published-numbers.json against the artifact they came from, and re-verified by npm run docs:check-numbers so a later measurement change breaks a check instead of silently leaving a page wrong.

An unbound number is not a wrong number. It means the artifact exists but nothing re-reads it, so it can drift out of agreement with the page without anything noticing. The distinction is drawn here rather than hidden because this project has retracted published figures before.

ConfigurationSetNDCG@10MRRBound?
rrf — hybrid + RRFfull 50095.0495.76bound
researchfull 50095.0495.76bound
chatfull 50093.7894.36bound
think (while it still carried the reranker)full 50093.2694.36bound
maxfull 500never measured — one attempt stopped at 227/500 and is named STALE; another output directory is empty
max50q slice98.598.0unbound
research50q slice95.794.4unbound
chat / think (post rung-fix, identical)50q slice93.591.4unbound

The negative results, which are the useful half

Four techniques were implemented, measured, and found to cost accuracy. They are recorded here because a page that lists only what worked is not evidence of anything.

TechniqueMeasured againstOutcome
MMR diversity re-rankthink, 50q−3.4 NDCG — and before this run it was dark code nothing called
Listwise judge rerankthink, 50q−7.6 NDCG; with a confidence gate, still −5.4
Graded-EV judgemax, 50qthe worst max arm measured
Cascade / cross-round edge walk100 adversarial queries0.00 pp — and the edge table was empty, so the run measured nothing at all
LLM-judge rerank on thinkfull 500below plain chat; retired 2026-08-02

BestThe best combination for a top-1 outcome

First, the honest constraint: no true top-1 metric was ever measured. The harness emits exactly five retrieval keys — recall_any_at_5, recall_any_at_10, recall_any_at_20, ndcg_at_10 and mrr. There is no recall@1 and no precision@1 at any sample size. MRR is the closest available proxy and it is rank-1-sensitive, not a top-1 measurement: on the 324 of 500 questions that have several gold passages it scores where the first gold landed, not whether rank 1 was correct. Everything below reads MRR as that proxy and should be read as such.

At full scale — the only size with bound artifacts — the answer is plain hybrid retrieval with RRF fusion. It records the best MRR measured on this system, and research ties it to four decimals while taking roughly 7.5× the latency and returning 499 of 500 identical orderings. chat and think trail it. Every rung layered above hybrid+RRF either matched it or cost accuracy.

So the recommended configuration for rank-1 retrieval is the simplest one measured:

sparse (FTS5/BM25) + dense embeddings → RRF fusion at k=60 · no reranker · no MMR · no listwise judge

That is an uncomfortable recommendation for a project that built the other rungs, which is why it is worth stating plainly rather than burying. The techniques above it are not useless — they are unproven on this metric, on this corpus, at this scale.

Five things that would make that claim wrong

  1. The ladder is not a ladder at full scale. The four drawn modes are three measured behaviours: research ties rrf, both beat chat, think scored below chat. The increasing-four-rungs figure was retired on 2026-07-27 as a retracted claim.
  2. max is unmeasured at full scale. Every max number on this page is n ≤ 50. Combining “max is best” with any 500-question framing asserts something no artifact supports — and max is the best arm on the slice, so this is the gap most likely to be filled in the flattering direction.
  3. The 50-question slice is 100 % single-session-user. LongMemEval’s hard categories — multi-session, temporal reasoning, knowledge update — do not appear in it at all. It is favourable ground, and 50q and 500q results never share a series in either direction.
  4. The noise band at n=50 is about ±1.3 points on NDCG and MRR, derived from two identical-configuration repeats. Several apparent “best” arms differ by less than that, and an R@5 step from 98 % to 100 % on 50 questions is exactly one question.
  5. MRR is not top-1. Restated because it is the load-bearing caveat: a system could improve MRR while getting rank 1 wrong more often, and nothing measured here would detect it.

What would settle it: emit recall@1 from the harness, and run max to completion at 500 questions. Until both exist, “best for top-1” is an inference from a proxy, and this page says so rather than rounding it up.

Method

HowHow the best combination is actually searched for

Listing techniques is easy; deciding which set to run is not. With this many techniques the obvious approach — try the combinations and keep the winner — is not available, and the reasons are worth stating because they shape everything below.

Why there is no grid search. Over 104 techniques a full sweep is 2104 configurations, which is not a large number so much as a meaningless one. Worse, most pairs are not composable in the first place: MUVERA and IVF-PQ answer different questions, RRF and MMR act at different stages of the same pipeline, and CaMeL is a security boundary rather than a retrieval step. A grid over non-composable options mostly measures nothing, expensively.

The ladder that is used instead

  1. One frozen baseline. Every arm is measured against the same unchanged configuration, so a delta means one thing.
  2. Single-factor deltas. One technique changed at a time, each in its own process. This is not fastidiousness: running arms in one process was measured to change 20 of 50 orderings on identical inputs, so a shared process silently manufactures differences that look like results.
  3. Report latency beside accuracy. A technique that wins a fraction of a point for several times the latency has not won, and a table with only the accuracy column cannot say so.
  4. Keep only survivors — positive delta and a cost the deployment can actually pay. A frozen local model cannot spend an offline training loop or a second privileged planner, so techniques needing those are excluded on grounds of affordability, not merit.
  5. Search combinations among survivors only, and only within a stage where they genuinely compose.
  6. Publish the pruning rule with the result. A silently pruned arm reads as an arm that lost, which is a different and much stronger claim than the one the data supports.

Three rules that constrain every arm

RuleWhat it forbidsWhy it exists
No unexercised features Publishing a capability that no default path reaches An audit found a module described as shipped with zero callers, and a graph result measured against an empty edge table. Three techniques on this page are still marked code only for exactly this reason.
Never-regress floors Re-baselining downward after a lower run A published number is a floor. A run below it triggers investigate → optimise → rebench, not a new baseline. The only exit is forensic proof the old number was a measurement error.
One arm per process Sharing a process between arms Measured contamination: same binary, same questions, different orderings. Every delta must have a cause, and process reuse supplies causes that are not the technique.

What has been settled, and what has not

Single-factor deltas have been run for part of the set, and they are the reason several techniques on this page carry a measured-negative note rather than a recommendation. The combination search over survivors has not been run. What exists today is:

The honest status is therefore: partially benched, and the combination search is still to come. The single-factor stage has produced enough to justify the current recommendation — the simplest configuration measured — but not enough to call it optimal, and the difference between those two words is the entire point of the method above.

Coverage

NoteWhat this page covers, and what it deliberately does not

A full-text audit of the parent article found 104 distinct named techniques, and this page covers all of themevery technique it names has its own mechanism and animated diagram, chosen as those with real weight in the article, plus every technique this system implements or measured. The remaining seven are named and placed here rather than animated, because they are one-mention items (entity disambiguation, web-search fallback, knowledge refinement, semantic entropy, FSRS reconsolidation), stated boundaries rather than built things (per-token embedder, offline RL loop, second privileged planner), or named products and benchmarks rather than methods.

Two entries in the parent that this page corrects rather than repeats: the Stage 12 coverage row lists TurboVec among shipped indexes when it has no callers, and the seeded HNSW expansion_* configuration rows are documented as tuning the live index but are never read — every production call site passes the compiled defaults.