One model loop and two tools — no pipeline in between. The model decides what to search, what to read and when to answer.一个模型循环、两个工具,中间没有流水线。搜什么、读什么、何时回答,都由模型决定。
The query rewrite, the router, the retrievers, the top-k and the prompt are all fixed before the model ever sees the question.查询改写、路由、检索器、top-k、提示词,在模型看到问题之前就全部定死了。
What to search, whether to search again, what to read and when to stop — decided by the model, every turn, for every question.搜什么、要不要再搜、读哪里、何时停止——每道题、每一轮,都由模型判断。
Just two. search ranks original passages with BM25; read returns original text at any position. Both hand back document IDs and offsets the model can act on.只有两个:search 用 BM25 给原文段落排序;read 返回任意位置的原文。两者都返回文档 ID 和偏移,模型可以直接接着用。
No embeddings, no reranker, no router. What connects the model to its tools is a 66-line loop.没有向量、没有重排序、没有路由。连接模型和工具的,只是一个 66 行的循环。
A real run, recorded on 2026-10-13 with gpt-6.1-sol over a five-document demo corpus. Every green note marks a choice the model made on its own — nothing in the code makes it.一次真实运行:2026-10-13 用 gpt-6.1-sol 在 5 篇演示文档上录制。每条绿色标注都是模型自己做出的选择,代码没有替它决定任何一步。
Same model, same BM25 index, same 230 queries. Replace our search/read with the benchmark's standard search tool and correct answers fall from 217 to 194. The gain comes from the interface, not only the model.同一模型、同一 BM25 索引、同样 230 道题。把我们的 search/read 换成基准自带的标准搜索工具,答对数从 217 掉到 194。提升来自工具接口,而不只是模型。
Ranks original passages with SQLite FTS5 BM25 and returns each with its document ID and character offset — real text, not a summary.用 SQLite FTS5 BM25 给原文段落排序,每条都带文档 ID 和字符偏移——给的是原文,不是摘要。
Returns original text at any position in any document. Where to look and how much to read is up to the model — like a person scrolling a file.返回任意文档任意位置的原文。读哪里、读多少由模型决定,就像人翻文件一样。
The model replies with text or tool calls; the loop runs the tools and appends the results. That is the entire control flow. Green lines hand control to the model; blue lines run a tool.模型返回文本或工具调用;循环执行工具、把结果追加回去。控制流就这些。绿色行把控制权交给模型,蓝色行执行工具。
core loop核心循环
search + read toolssearch + read 工具
model adapter模型适配器
Line counts at tag frozen-20261017, the version behind the submitted results.行数取自产生提交成绩的 frozen-20261017 标签。
No decision is hard-coded in the loop, so there is no pipeline to re-tune around a better model — it simply makes better decisions.循环里没有写死任何决定,换上更强的模型不需要重调流水线——它只是做出更好的判断。
Each dot below is one of the 830 queries, in query-ID order, from the submitted run. 781 correct, 49 not. Hover a dot to inspect it; dimmer dots had lower evidence recall.下面每个点是 830 题中的一道,按题号排列,来自提交的那次运行。781 对,49 错。悬停可查看单题;越暗表示证据召回越低。
Agents leaderboard; top single-agent and BM25-only entryAgents 榜排名;单智能体与纯 BM25 条目中最高
evidence recall证据召回率
calibration error校准误差
reads per query每题读取次数
Both submissions are with the maintainers. BrowseComp was scored by us with the official script; Enterprise official grading is pending.两份提交都在等维护方处理。BrowseComp 由本项目用官方脚本判分;Enterprise 等待官方判分。
Both benchmarks were used during development; Enterprise dev/test is our own split. One generation per question except technical reruns; failures stay in the denominator.两个基准都在开发中用过;Enterprise 的 dev/test 是本项目自己的划分。除技术错误重跑外每题生成一次,失败计入分母。
Timeouts, usage limits and SDK interrupts hit eight BrowseComp queries; each was rerun once with the same configuration. Counted as wrong: 93.37%.8 道 BrowseComp 题遇到超时、额度和 SDK 中断,各用相同配置重跑一次。全算错则为 93.37%。
Codex injects extra tool definitions and multi-agent text; traces show no built-in tool calls. The direct API backend was only migration-tested on Enterprise dev30.Codex 会注入额外工具定义和多智能体说明,轨迹中没有内置工具调用。直连 API 后端只在 Enterprise dev30 上做过迁移验证。
BrowseComp judging ran on one A800 with max_model_len=8192 added. The longest judge prompt is 1,216 tokens, so nothing is truncated.BrowseComp 判分在单张 A800 上运行,仅加入 max_model_len=8192;最长判分提示 1,216 token,不会截断。
Budget-limited. Every question keeps an inspectable trace, configuration and evaluation record.受预算限制。每道题都保留可检查的轨迹、配置和评测记录。
The demo builds a real SQLite index from bundled samples and replays search → read → cited answer. It calls no model. Start in an empty directory with Python 3.12+ on macOS or Linux.演示用内置样例建立真实 SQLite 索引,回放“检索 → 读取 → 带来源回答”,不调用模型。在空目录运行以下命令;需要 Python 3.12+,适用于 macOS 或 Linux。
python3.12 -m venv .venv.venv/bin/python -m pip install https://github.com/hxli2005/minimal-rag/archive/refs/heads/main.zip.venv/bin/python -m minimal_rag demo