RAGFlow: BM25 and MiniMax M3 hit 91% on FRAMES, claim leaves trim tokens 38%

Context as Infrastructure: Knowledge Compilation for Retrieval in Agentic Systems with Harnesses

Zhichang Yu, Baining Cao, Sbaaoui Idriss, Qi Wang, Gangqiang Xu, Ling Qin, Xiaoling Jin, An Liu, Shaohao Cai, Xiaoyang Bao, Shengle Chen, Changchang Ding, Pengfei Zhu, Jingxiang Xu, Yifeng Mao, Lu Liu, Hai Jin, Yingfeng Zhang

cs.IR, cs.AI, cs.CL

2026-10-30

BM25/grep, MiniMax M3 hits 91% on FRAMES and 85% on BrowseComp-Plus; claim leaves cut tokens 91% on hits and 38% on average, accuracy flat; a gate cuts latency from 140s to 30s.

What problem this solves

Once an agent owns search, accuracy stops hinging on a better index. The search harness writes queries, reads snippets, reformulates, and decides when to stop. RAGFlow runs that loop with only BM25 and grep, MiniMax M3 answering, and neither a vector index nor a compiled index. It scores 85% on BrowseComp-Plus and 91% on multi-hop FRAMES. Those scores do not sit on the same scale: BrowseComp-Plus uses about 3 million tokens a question, while FRAMES averages 324,479 tokens and 46.7 seconds.

The loop can still waste the window. Left alone, it rewrites the same keywords, rereads the same document, and piles in passages that never enter the answer. Knowledge compilation is the supply step in front of that loop. At ingestion, a model adds context no single chunk contains. Queries then read the artifacts. The compiler does not choose the query or the stopping time.

Method

Compilation is paid once and reused. Six replaceable stages do the work: parse, chunk, extract with glm-4-flash, drop any span that is not verbatim in the source, assemble, and register version, offsets, and access labels. The uncompiled baseline sees the same chunks. Derived text stays read-only and is never written back into the source.

The measured artifact is the claim leaf. A claim-evidence pair stores one atomic claim, a verbatim evidence span, and a source offset. No span, no stored claim. Internal nodes are navigation labels. A chunk of a few hundred tokens usually shrinks to a few evidence sentences, which is where the token cut comes from. Search itself stays lexical. Semantic work stays in the model's reformulation.

Default serving swaps what gets read and keeps the retrieval path. After BM25 localizes a chunk, that chunk is replaced by its claims, and a gate either answers or opens the raw text. Direct search over evidence text beat document-then-tree routing: the document was usually found, the tree did not resolve the chunk inside it, and the extra hop spent a turn. A small decision model only chooses whether a deep read is needed. The Qwen preview model had zero failed groups and 30.5 seconds total; StartLux had 18 failed groups and 560.1 seconds total. With no compiled evidence, the same gate saves about 30% of tokens by skipping deep reads.

Five stations run in order. An uncompiled corpus does not expose navigation or graph tools. Evidence is prefetched once, flat across the corpus, before the model speaks. A block that fails the check on count, diversity, or coverage is deleted from the prompt. Only then does a budgeted tool loop start. An abnormal stop still has to close. The framework assigns citation numbers. A zero-hit is retried with a looser filter before the model may call the corpus silent.

Results

Structural compilation did not lift accuracy. Each variant ran once under the same harness. With claim leaves removed, a RAPTOR-style summary tree, an LLM wiki, and an entity-relation graph were neutral: a single run could not separate them from noise. A PageIndex-style outline was neutral at small scale and negative at FRAMES scale, and the paper does not say how many points were lost. An analytic model, not a scale sweep, puts end-to-end routing near 75% if every decision is 95% correct and the branch factor is 8. A dense leg lowered accuracy by an unreported amount, so every number below is lexical.

Token and accuracy numbers use 200 FRAMES questions against the same uncompiled harness.

ConditionToken changeAccuracyLatency
Uncompiled BM25/grep0% (324,479)91.0%46.7 s
Evidence sufficient-91%no reliable changenot reported separately
Evidence insufficient+1.9%no reliable changenot reported separately
FRAMES average-38%no reliable gainnot reported separately
Decision gate, with evidence-52% (mean 155,305)no reliable change140 s to 30 s
Decision gate, no evidenceabout -30%no reliable changenot reported separately
BrowseComp-Plus, harness onlyabout 3 million / question85%not reported separately

The -52% figure is an arm mean, so it lines up with neither the -91% hit nor the -38% average. With claim leaves in place, the gate cuts latency from 140 seconds to 30. Substitution has the opposite latency sign. On the 7 questions both arms answered, the claim page roughly halved tokens and roughly tripled latency, because a thinner page needs more rounds. Time spent waiting on the judge is a small share of that wall clock.

Let ph be the gate acceptance rate. Expected token change is 0.019 - 0.929 times ph. Query tokens break even above about 2%. The -38% average implies ph near 43%. At that rate, compilation costing 10 query-equivalents pays back after about 26 queries when the horizon is long. With 1,000 queries and the same cost of 10, the bar rises to 3.12%. An acceptance rate of 2.5% in that finite example still loses 5.8 query-equivalents. The 2.5% figure belongs only to that example. The rate implied by FRAMES is about 43%.

Recall checks are directional. Anchor depth 20 beat depth 10; depth 30 added nothing. The chunk leg and the claim-text leg were both required. Page caps at 16 and at 32 dropped claims that arrived late. The kept setting is topN=20, k=100, both legs, and no count cap.

Why it matters

A harness already at 91% leaves little accuracy for a vector index or an outline router to buy. Treat compilation as supply. Claim leaves reduce what the model reads. The tree organizes. Graphs, ontologies, timelines, mind maps, and session memory target relations, governance, orientation, and continuity. Benchmark accuracy does not measure those jobs.

If latency is binding, the token cut is a bad trade, because it is purchased with extra rounds. Evidence-first retrieval removes the extra hop, and the gate removes unnecessary deep reads. Those move wall time. Ontology and wiki value is not a measured win yet. The deployment ledger names the metric, the denominator, and the ship rule, and at writing every row is no measured effect. No pre-registered target had been met.

Limitations

The 91% saving and the 1.9% miss penalty are operating points from one benchmark and one extractor, with no confidence intervals and no extra seeds. Structural variants ran once, so a gap of a few points is not a finding. FRAMES is English Wikipedia. Tables, scans, and local jargon can raise the miss rate and shrink the saving. The break-even rate moves much more when the miss penalty moves than when the hit saving does: a penalty band of 0.4% to 3.4% swings the threshold from about 0.4% to 3.6%, while the same absolute wobble in the hit saving barely moves it. The 75% routing figure is an analytic example.

ph counts acceptances, not true sufficiency. The false-accept rate is unmeasured. The specified audit was not run. At a true rate near 10%, about 100 labels would span roughly 4% to 16%, and 400 labels roughly 7% to 13%. A gate can look precise on final accuracy and still hand a real share of questions the wrong block.

Shadow runs are in progress, and the deployment ledger has cleared nothing. The part that should generalize is the qualitative split: evidence changes cost, and structure does not change recall. The percentages belong to glm-4-flash and MiniMax M3.

Terms

Source

What people are saying

Related papers

All paper explainers