5D Library › Books › 5DL-B-061
检索增强生成几何、倒数秩融合与多智能体误差级联
高维测度集中、词法-稠密混合检索边界与验证器门控不动点
Retrieval-Augmented Generation Geometry, Reciprocal Rank Fusion and Multi-Agent Error Cascades: High-Dimensional Concentration of Measure, Hybrid Lexical-Dense Retrieval Bounds and Verifier-Gated Fixed Points
DOI10.5281/zenodo.24090170摘要
检索增强生成(RAG)与多智能体流水线可以拆成三个环节:检索、拼接与链条。每个环节都有一条流行的直觉——维度越高、块越多越好;上下文越长越好;智能体越多越好。本书把每条直觉写成可运行的模型,找出它在哪里成立、在哪里失效。全部数据为程序生成的合成数据,数字说明机制与量级,不是对任何产品的测量。
第一章用测度集中、有效维度与枢纽现象说明:语料越大,第一名错误率越高(256 维时从 0.0730 升到 0.5030);名义 768 维、方差按幂律衰减时,有效维度只有 31.7,十万块中排错第一名的概率 0.9875;一百维时 1% 的枢纽块闯入 77.7% 的无关问题的前十名。第二章说明稠密检索认不出编号、词法检索认不出改写,融合完整排名时两类查询的 recall@1 都只剩 0.055,只融合短列表时编号查询停在 0.475;倒数秩融合的平滑常数 k = 60 在三种情形下都不是 recall@1 的最优值,一强一弱时任何 k 都不如强检索器单用(0.604)。第三章用程式化读者模型说明「中间遗失」与证据稀释:正确块在中间时回答正确的概率只有两端的三分之一左右(0.098 对 0.288),最佳块数随干扰强度从 8 降到 2。
第四章证实 0.92 的十次方等于 0.4344,三票表决只在错误独立时有效,并把验证器门控写成吸收马尔可夫链:确定、独立的检查把十步链提到 0.9949,只需 10.84 次尝试。第五章说明验证器的价值在于独立:困难步骤一直困难时,即使确定性检查也只到 0.886,与生成器共享盲区的评判只到 0.6950;可靠性的代价付在尾部延迟上。第六章说明三个百分点的改进需要约三千条查询才能可靠检出(3,000 条时把握度 0.989),从 256 个同样好的配置中挑最好的会虚高七个多百分点。第七章把《七略》读作分类路由(路由准确率须高于 0.656 才胜过全库检索),把《韩非子》的「参验」读作多源核验(来源同出一源时多少个都只相当于一个)。第八章给出五步核查与一项预注册的离线评测,并如实展示一次「坏运气」得出的错误结论及其错误率(0.045)。
关键词:检索增强生成;向量检索;测度集中;有效维度;参与率;枢纽现象;各向异性;BM25;稠密检索;混合检索;倒数秩融合;中间遗失;上下文窗口;多智能体系统;误差传播;多数表决;验证器;吸收马尔可夫链;基本矩阵;尾部延迟;模型评判;McNemar 检验;赢家诅咒;预注册
Abstract
Retrieval-augmented generation (RAG) and multi-agent pipelines can be split into three links: retrieval, assembly and the chain. Each has its popular intuition — higher dimension and more chunks are better; a longer context is better; more agents are better. This book writes each intuition as a runnable model and finds where it holds and where it fails. All data are synthetic, generated by the book's programs; the numbers show mechanisms and orders of magnitude and are not measurements of any product.
Chapter 1 uses concentration of measure, effective dimension and hubness to show that the larger the corpus, the higher the top-1 error (from 0.0730 to 0.5030 at 256 dimensions); that with 768 nominal dimensions and a power-law spectrum only 31.7 effective dimensions remain, putting the wrong chunk first among a hundred thousand with probability 0.9875; and that in a hundred dimensions 1 % of hub chunks intrude on the top ten of 77.7 % of unrelated questions. Chapter 2 shows that dense retrieval cannot recognise identifiers and lexical retrieval cannot recognise paraphrases; fusing complete rankings leaves both query types at a recall@1 of 0.055, and fusing short lists leaves identifier queries at 0.475; reciprocal rank fusion's smoothing constant k = 60 is not the best for recall@1 in any of three scenarios, and with one strong and one weak retriever no k beats the strong one alone (0.604). Chapter 3 uses a stylised reader model to show "lost in the middle" and evidence dilution: a gold chunk in the middle is answered correctly only about a third as often as at either end (0.098 against 0.288), and the best number of chunks falls from 8 to 2 as distractors grow plausible.
Chapter 4 confirms that 0.92 to the tenth power is 0.4344, shows that three-way voting helps only while errors are independent, and writes verifier gating as an absorbing Markov chain: a deterministic, independent check lifts a ten-step chain to 0.9949 for only 10.84 attempts. Chapter 5 shows that a verifier's value lies in independence: if hard steps stay hard even a deterministic check reaches only 0.886, and a judge sharing the generator's blind spot only 0.6950; reliability is paid for in tail latency. Chapter 6 shows that a 3-point improvement needs about three thousand queries to be detected reliably (power 0.989 at 3,000) and that picking the best of 256 equally good configurations inflates it by more than seven points. Chapter 7 reads the Qilue as routing by category (routing must be more than 0.656 accurate to beat searching everything) and the Han Feizi's canyan as checking against several sources (sources sharing an origin are worth one however many). Chapter 8 gives a five-step check and a pre-registered offline evaluation, and shows as it fell a wrong conclusion reached through bad luck, with its error rate (0.045).
Keywords: retrieval-augmented generation; RAG; vector search; concentration of measure; effective dimension; participation ratio; hubness; anisotropy; BM25; dense retrieval; hybrid search; reciprocal rank fusion; lost in the middle; context window; multi-agent systems; error propagation; majority voting; verifier; absorbing Markov chain; fundamental matrix; tail latency; LLM-as-judge; McNemar test; winner's curse; pre-registration
目录 · Contents
- 序:检索、拼接与链条English 中文Preface: Retrieval, Assembly and Chains
- 第一章 高维几何:测度集中、有效维度与枢纽块English 中文Chapter 1. High-Dimensional Geometry: Concentration of Measure, Effective Dimension and Hub Chunks
- 第二章 词法与稠密检索:各自的盲区与倒数秩融合的平滑常数English 中文Chapter 2. Lexical and Dense Retrieval: Their Blind Spots and the Smoothing Constant of Reciprocal Rank Fusion
- 第三章 上下文窗口:位置衰减、证据稀释与最佳块数English 中文Chapter 3. The Context Window: Position Decay, Evidence Dilution and the Best Number of Chunks
- 第四章 多智能体流水线:误差级联与验证器门控的吸收马尔可夫链English 中文Chapter 4. Multi-Agent Pipelines: Error Cascades and the Verifier-Gated Absorbing Markov Chain
- 第五章 验证器的独立性与重试的代价English 中文Chapter 5. Verifier Independence and the Cost of Retries
- 第六章 评测本身的统计:样本量、评判偏差与赢家诅咒English 中文Chapter 6. The Statistics of Evaluation Itself: Sample Size, Judge Bias and the Winner's Curse
- 第七章 《七略》的分类路由与《韩非子》的参验:检索与核验的两种古法English 中文Chapter 7. The Routing of the *Qilue* and Han Fei's *Canyan*: Two Ancient Methods of Retrieval and Verification
- 第八章 五步核查与一项预注册的离线评测English 中文Chapter 8. A Five-Step Check and a Pre-Registered Offline Evaluation
How to cite · 引用
Fan, Y. (2026). Retrieval-Augmented Generation Geometry, Reciprocal Rank Fusion and Multi-Agent Error Cascades: High-Dimensional Concentration of Measure, Hybrid Lexical-Dense Retrieval Bounds and Verifier-Gated Fixed Points [检索增强生成几何、倒数秩融合与多智能体误差级联] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090170
BibTeX
@book{fan2026rag,
title = {{Retrieval-Augmented Generation Geometry, Reciprocal Rank Fusion and Multi-Agent Error Cascades}: High-Dimensional Concentration of Measure, Hybrid Lexical-Dense Retrieval Bounds and Verifier-Gated Fixed Points},
author = {Fan, Yafu},
year = {2026},
publisher = {5D Library},
edition = {Version 1.0.0},
doi = {10.5281/zenodo.24090170},
url = {https://doi.org/10.5281/zenodo.24090170},
note = {Chinese title: 检索增强生成几何、倒数秩融合与多智能体误差级联}
}
| DOI | https://doi.org/10.5281/zenodo.24090170 |
|---|---|
| DOI(全部版本 all versions) | https://doi.org/10.5281/zenodo.24090169 |
| ORCID | https://orcid.org/0009-0004-3519-1203 |
| 5D Library ID | 5DL-B-061 |
| 版本 Version | 1.0.0 · 中英双语版 Bilingual edition |
| 出版日期 Date | 2026-11-08 |
| 网址 Online | https://5dlibrary.com/books/rag-vector-geometry-reciprocal-rank-fusion-agent-cascades/ |
| SHA-256 · rag-vector-geometry-reciprocal-rank-fusion-agent-cascades_bilingual_v1.0.0.pdf | 3775bb22393808f5f0996225e081245d107c85ef066924a9397739f1f088787c |
| SHA-256 · rag-vector-geometry-reciprocal-rank-fusion-agent-cascades_en_v1.0.0.pdf | dd29a0b346c4cd4bf66335d90402b89def20b8eecd79652b8fa54e0bd18ab6aa |
| SHA-256 · rag-vector-geometry-reciprocal-rank-fusion-agent-cascades_zh_v1.0.0.pdf | a7f7b6904ec711b6b77614cb2fb33d42cfd06ef1f39d93a49ca6a6f15f29d00f |
| Licence · 许可 | Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0). https://creativecommons.org/licenses/by-nc-nd/4.0/ |
Disclosure. The author uses the works of 5D Library, including this book, as the methodological basis of his community courses, the 5D Ascension Cards (Dimensional Shift Card Decks) and the Yafu AI knowledge base; the Yafu AI knowledge base itself uses retrieval augmentation, so the author has a direct commercial interest in the subject of this book. The book promotes no course, card deck, software, embedding model, vector database, language model or agent platform, provides no link to or recommendation of any vendor, and accepts no sponsorship. The evaluation in Chapter 8 uses only software and de-identified query text, and its code and protocol are published openly for anyone to check.