Beyond Top-K: Replacing Black-Box Retrieval with Interpretable Agentic Operations
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.
₹ 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.
48,964.89 from 18,942.94.
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.
| Tool | What it does |
|---|---|
| memory_grep | Normalization-aware line search. Returns line numbers. |
| memory_outline | The heading structure with line numbers — the agent's map. |
| memory_read | Lines a–b of one file, bounded at 400 per call. |
| memory_list | What files exist, with sizes and line counts. |
Two properties do the work
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.
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.
| System | Accuracy | Δ vs READ | pHolm | $/question |
|---|---|---|---|---|
| read_no_outline | 66.7% | −7.8 | 1.00 | 0.040 |
| read_naive_grep | 66.7% | −7.8 | 1.00 | 0.043 |
| read | 58.8% | — | — | 0.058 |
| bm25 | 51.0% | +7.8 | 1.00 | 0.020 |
| hybrid | 29.4% | +29.4 | 0.016 | 0.022 |
| agentic_rag | 27.5% | +31.4 | 0.012 | 0.051 |
| dense | 15.7% | +43.1 | 2×10−5 | 0.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.
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.
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.
Limitations
- One document, one backbone. Every number is
gemini-2.5-proon one 780-page report, and the conversion-artifact counts are specific topymupdf4llm. Generality is asserted by argument, not shown. - 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.
- 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.
- 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.