Context Compilation for Agents: Better Than Retrieval?
Under a competent harness, compiled artifacts do not raise accuracy; they change what enters the window, and that trade only pays once roughly 2% of queries can be answered from compiled evidence alone.
On this page
A shell with only BM25 and grep answered 85% of BrowseComp-Plus, but the retriever was not the bottleneck.[1] Most people would still buy a stronger one.
The reflex you probably had first
Most people reach for a stronger retriever first. The reasoning is tidy: the answer was wrong, so the passages were wrong, so the retriever is too weak, so you buy a better one, add a reranker, cut the chunks smaller. Every step holds. The conclusion does not. The paper's runs say something else. A shell with only BM25 and grep, paired with MiniMax M3, answered 85% of BrowseComp-Plus and 91% of multi-hop FRAMES, with no compiled index and no vector index.[1] A dumb retriever plus a disciplined loop already covers accuracy, so more spend on retrieval buys almost nothing.
What the loop exposes is a supply problem. Left alone, it resubmits the same query, rereads the same document, and fills the window with passages that never get cited; the token bill climbs and the answer does not improve. The model sees more words and can use no more of them.
So the question changes.
Compilation is not a smarter retriever
The paper names the missing layer knowledge compilation: a configurable ingestion pipeline where an LLM enriches each document with context that no single chunk holds alone.[1] The output is not a summary. It is structure.
The usual shape is a navigation tree whose leaves are claim-evidence pairs: one checkable assertion plus the passage behind it. Entity graphs, timelines, mind maps, ontologies, wikis, and memory sit in the same family.
Here is the cold water. Compilation is not a better retriever. Under a competent harness, the structural artifacts gave no detectable accuracy gain on FRAMES, and a PageIndex-style outline degraded at scale.
So do not sell it on accuracy.
Only one mechanism is measured: the tree with claim-evidence leaves. The rest pay off in deployment, in governance, integration, onboarding, temporal orientation, and continuity, and an accuracy table has no column for any of that. The pipeline turns the loop into five disciplined stations, and its stated goal is narrow: keep the context entering the model the smallest sufficient set. That is a subtraction problem, which is why it is hard to sell.
Put 91% and 1.9% into one equation
The tree's arithmetic is simple. When the evidence suffices, it cuts query tokens by 91%; when it does not, it adds 1.9%. One positive, one negative, and the average turns on one ratio. Let that rate be p. The average change is -91% × p + 1.9% × (1 - p). Set it to zero and p = 1.9 / 92.9 ≈ 2.0%, the break-even the paper reports. The measured rate sits near 43%, and plugging it in gives 0.43 × (-91%) + 0.57 × 1.9% ≈ -38%, matching the reported average cut.[1]
| Sufficiency rate | Change in query tokens | What the setting looks like |
|---|---|---|
| 0% | +1.9% | Evidence never suffices; you pay a tax |
| 2% | about 0% | Break-even, no gain and no loss |
| 25% | -21% | Low sufficiency, thin gain |
| 43% | -38% | The paper's measured rate |
| 70% | -63% | High sufficiency, near the ceiling |
| 100% | -91% | Every query suffices; ceiling |
Read 43% as a property of a corpus and a query mix, not a capability score. On this material, 43% of questions could be answered from compiled evidence alone. Change the queries and the threshold moves with them.
A decision gate cuts latency from 140 s to 30 s, a 79% drop. Do not fold that into the token story. Swapping compiled artifacts for raw passages saves tokens and pays for it with more retrieval rounds, each carrying its own latency. Two ledgers.
Take a query that burns 10,000 tokens. At a 38% average cut it lands near 6,200; at a sufficiency rate pinned to the 2% break-even, those 10,000 tokens barely move, and the saving will not cover one extra round. Same mechanism, two settings, two conclusions, and the only thing separating them is that ratio.
Run these five things first
- Measure sufficiency before you buy. A few dozen real queries, asked one at a time. Below 2%, compilation only adds tokens.
- Write 2% into the acceptance line. Ask for that rate first, the token saving second.
- Put a stop condition on the loop. The gate took 140 s down to 30 s; ask what makes it stop.
- Assign artifacts by job. Governance wants wikis, temporal orientation wants timelines, continuity wants memory.
- Track tokens, rounds, and latency together. Watch only the first and you buy a slower system.
The first item is the one teams skip. Starting with the tree is easier, because a tree is a deliverable and a sufficiency table is not. That table decides whether everything after it pays or costs.
Get the order wrong and the money is gone.
When this stops working
The first limit is the harness. Every gain sits on top of a competent one, and this only holds when the loop can rewrite its own queries and decide when to stop. Swap in a shell that dumps top-k into the prompt and the saved tokens get eaten by extra rounds. The second limit is scale. The PageIndex-style outline degraded as the corpus grew, so finer structure is not free: deeper leaves cost more to maintain, and they pay only where evidence suffices.
The third limit is what a benchmark cannot see. Governance, integration, onboarding, temporal orientation, and continuity are real returns, but they never appear in an accuracy table.
It fails when you sell them as one. Compilation does not make the model smarter, it keeps junk out of the window.
