Beyond Top-K: Replacing Black-Box Retrieval with Interpretable Agentic Operations

TwoSpoon · arXiv:2608.06305 · Preprint, 2026

Two retrieval interfaces over the same 780-page financial report. Above: conventional RAG chunks the report, embeds the chunks and selects top-k, reaching 15.7 percent accuracy. Below: READ greps with normalized line search, consults an outline of headings and line numbers, and reads bounded spans, looping as the agent chooses what to read next, reaching 58.8 percent.
Two retrieval interfaces over the same document. Figures at right are accuracy over the same 51 verified questions: 15.7% for dense top-k against 58.8% for READ. Tuning the dense baseline's chunk size and retrieval depth raises it to 35.3% at best, which READ still leads by 23.5 points.
58.8%READ accuracy
15.7%dense top-k, matched k=8
86.8%of content lines are table rows
13median lines from a figure to its unit header
3.68×numeric repetition ratio
0embeddings, indexes, or vectors

Abstract

Retrieval-augmented generation over long documents is dominated by one design: chunk the text, embed the chunks, and surface the top-k nearest neighbours of the query. We argue that for an important class of documents — financial statements, audit reports, regulatory returns — this design is structurally unsound, and we make the argument measurable. On a 780-page government financial report, 86.8% of content lines are table rows, thousands of near-identical figures compete in one embedding space, and a figure inherits its unit from a header a median of 13 lines above it — so a chunk boundary routinely separates a number from whether it is in lakh or crore, an error of two orders of magnitude. A table-aware chunker built as a steelman fixes the unit problem but leaves 27–30% of numeric chunks with no fiscal-year header at every chunk size we tried. We propose READ (Reliable Embedding-free Agentic Document-search), in which an agent reads the raw document through three deterministic operations — normalized lexical search, structural navigation, and bounded span reads — exposed over the Model Context Protocol, so a trajectory is a replayable audit trail, not an opaque similarity score. On 51 verified questions READ answers 58.8% against dense retrieval's 15.7% (pHolm = 2 × 10−5) — or 35.3% tuned, which READ still leads by 23.5 points (pHolm = 0.017). An agent given the same loop but a top-k tool reaches only 27.5%, locating the gain in the interface rather than in iteration. We also report what the evidence does not support: BM25 is statistically indistinguishable from READ, so our result separates embedding-based from embedding-free retrieval, not agentic from lexical search.

Why top-k fails on this document

Not because the retriever is badly tuned. Because chunking destroys the thing that makes a number mean anything.

A figure's unit lives in a header, far above it. The book mixes units: 666 lines declare ₹ in lakh, 50 declare ₹ in crore. A figure inherits the nearest declaration above it, sitting a median of 13 lines below — p90 of 26, max of 143. Any chunk that starts below that header carries figures ambiguous by a factor of 100.
The numbers are near-duplicates of each other. 58,791 numeric tokens take only 15,960 distinct values — a 3.68× repetition ratio. This is precisely the regime in which a dense vector cannot separate 48,964.89 from 18,942.94.
Fixing the chunker is not enough, and we built the steelman to show it. A table-aware chunker that carries the governing unit and fiscal-year rows across every boundary cuts unitless chunks from 18.0% to 0.3%. But the yearless residue is invariant to chunk size: 27–30% across a 5× sweep. Every retrieval baseline in the paper uses this stronger chunker.
Two panels plotting the percentage of numeric chunks with no unit declaration and no fiscal-year header, against chunk size from 800 to 4000 characters. Fixed-size chunking, marked with squares, falls steeply as chunk size grows. Table-aware chunking, marked with circles, is near zero for units at every size, but flat at roughly 28 percent for fiscal years.
Fixed-size chunking (squares) trades one failure for another as size grows. Table-aware chunking (circles) removes the unit problem entirely and leaves the year problem untouched at every size.

What READ is

Three deterministic operations over the raw Markdown, exposed as an MCP server. No embedding model, no vector index, nothing to rebuild when the document changes.

ToolWhat it does
memory_grepNormalization-aware line search. Returns line numbers.
memory_outlineThe heading structure with line numbers — the agent's map.
memory_readLines a–b of one file, bounded at 400 per call.
memory_listWhat files exist, with sizes and line counts.

Two properties do the work

The agent picks its own span, after seeing where the evidence is. A chunk boundary is fixed offline, before anyone knows what will be asked. An agent that greps to line 432 can extend its read upward to pull in the unit header at line 399. The partition is chosen at query time, by something that has read the query.
Normalized matching is what makes lexical search viable on a converted PDF. The book prints 48,964.89; an agent that has computed a figure searches for 48964.89. The converter welds emphasis markers onto words and splits others across table cells (|**Fiscal**| **Defi**|**cit**|). Matching runs against two normalized shadows of each line while reporting the original line and number, so results stay valid inputs to the next read.
Every operation is a pure function of the document, so a trajectory replays exactly. The shipped result records contain exposed_lines — the precise lines each system saw — which is what turns "auditable" from a claim into something you can check against your own copy of the document.

Results

51 hand-verified questions, gemini-2.5-pro throughout, matched k=8 for every retrieval baseline. Paired inference: exact McNemar on discordant pairs, bootstrap CIs, Holm-corrected across the family.

SystemAccuracyΔ vs READpHolm$/question
read_no_outline66.7%−7.81.000.040
read_naive_grep66.7%−7.81.000.043
read58.8%——0.058
bm2551.0%+7.81.000.020
hybrid29.4%+29.40.0160.022
agentic_rag27.5%+31.40.0120.051
dense15.7%+43.12×10−50.023

It is the interface, not the iteration

agentic_rag is the same agent, the same loop, the same turn budget — but its tool is vector search instead of grep-and-read. It reaches 27.5%. If READ's advantage were merely that it can iterate, this control would have closed the gap. It does not.

15.7% is not dense's ceiling, and we say so

Sweeping chunk size and retrieval depth over six configurations lifts dense to 35.3% at 2,000 characters and k=16 — more than double the number in the main table, at 41% higher cost per question. READ still beats that configuration by 23.5 points (pHolm = 0.017), and beats every one of the six after correction.

Heatmap of dense retrieval accuracy over chunk size (2000 and 4000 characters) against retrieval depth k (4, 8 and 16). The best cell is chunk 2000 at k equals 16, reaching 35.3 percent.
Dense accuracy over chunk size and retrieval depth, n=51 per cell. Depth is the lever; chunk size is not.

What we don't claim

Three results cut against the paper's thesis. All three are in the paper, and none of them is buried in an appendix.

BM25 is statistically indistinguishable from READ. 51.0% against 58.8%, pHolm = 1.00. Of 22 discordant questions, 13 favour READ and 9 favour BM25 — close to a coin toss. Our result separates embedding-based from embedding-free retrieval. It does not establish that agentic search beats lexical search.
Two of READ's own ablations scored higher than READ. Removing the outline tool, and removing normalized matching, each landed at 66.7%. Neither difference is significant at n=51, so both are reported as nulls rather than reversals — but we are not going to print the ablations only when they flatter the system.
n=51 is underpowered. This benchmark cannot resolve small differences. That is why every comparison is paired — conditioning on discordant pairs alone is more sensitive — and why a null here means "not resolved", never "shown equivalent".

Try it

The retrieval interface needs no API key, no GPU, and no index. One dependency.

git clone https://github.com/twospoon/READ.git
cd READ
pip install -e .

# point it at any directory of Markdown
MEMORY_DIR=./memory memory-mcp --transport stdio

Or drive the store directly, with no MCP layer at all:

from pathlib import Path
from memory_mcp import store

root = Path("memory")
print(store.outline(root))                 # the map
print(store.grep(root, "48964.89"))        # finds the printed "48,964.89"
print(store.read_lines(root, "FA_2024_25_GUJARAT/pymupdf4llm.md", 380, 435))

That grep call is the normalization result in one line: the document prints 48,964.89, the agent searches for 48964.89, and a literal grep finds nothing.

Reproduce the paper

Every number in the paper can be re-derived from the shipped result records without spending anything. An API key is only needed to generate new rows.

pip install -e ".[eval,dev]"
python scripts/04_make_figures.py     # all tables + figures, no API calls

The full study — 663 cells across 7 systems and a 6-configuration sweep — cost $21.16. Runs are resumable and every one writes a provenance record with host, library versions, git commit and dirty flag.

The source document is not redistributed. The benchmark ships questions, gold answers, and line references — not the document text. The report is a public record of the Comptroller and Auditor General of India; the repository README has the two commands that download and convert it, and a verifier that tells you if your conversion drifted from the gold line numbers.

Limitations

  1. One document, one backbone. Every number is gemini-2.5-pro on one 780-page report, and the conversion-artifact counts are specific to pymupdf4llm. Generality is asserted by argument, not shown.
  2. A conversion ceiling no retriever can pass. Some evidence is destroyed by PDF→Markdown conversion before retrieval begins. Those questions get their own category rather than being charged to a retriever.
  3. The 800-character sweep arm was not run. Its 4,083 chunks were more CPU than the machine would give. Section 4 predicts it is strictly worse — 67.4% of its chunks carry no unit — so it is the least likely configuration to be dense's best, but it is an untested prediction and the appendix says so.
  4. No long-context baseline yet. The 1.68 MB corpus fits a 1M-token window. That baseline is implemented and disabled; it is the one comparison that would separate "the vector index hurts" from "retrieval itself is unnecessary at this scale".

Citation

@misc{tamang2026topkreplacingblackboxretrieval,
  title         = {Beyond Top-K: Replacing Black-Box Retrieval with Interpretable Agentic Operations},
  author        = {Sagar Tamang and Ayush Vyas and Tabarakul Hazarika},
  year          = {2026},
  eprint        = {2608.06305},
  archivePrefix = {arXiv},
  primaryClass  = {cs.AI},
  url           = {https://arxiv.org/abs/2608.06305}
}

Acknowledgements

This research was sponsored by Two Spoon Technologies Private Limited (TwoSpoon), which funded the model calls the experiments required. All three authors are affiliated with TwoSpoon, and the work was carried out with no external funding.

Sagar Tamang led the research: the question, the corpus analysis, the READ interface and its evaluation harness, the benchmark, and the experiments. Tabarakul Hazarika contributed to the experimental work. Ayush Vyas conducted the code review and the evaluation audit, and prepared the final manuscript.