关于「检索增强:单书召回与跨书综合」,《五维灵商、先验条件化与检索增强》给出的定量结论是什么?
结论:第五章显示跨三卷的综合问题直接检索在前 40 段中只有 0.060 的成功率,先拆分问题后成功率由拆分准确率决定。
数据口径:书中以标注框区分证据、16 段可运行的 Python 程序、原典与假说。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.060, 40
| question sigma k | 5 k=10 k=20 k=40 |
| one book | 0.5 1.000 1.000 1.000 1.000 |
| one book | 1.0 0.913 0.980 0.987 0.993 |
| three | 0.5 0.000 0.007 0.013 0.060 |
| three | 1.0 0.000 0.000 0.000 0.000 |
| Reading: a question about one book finds its passage in a | |
| short list. A question that needs three books at once is far | |
| harder: all three must outrank thousands of passages, and | |
| plain top-k retrieval misses them even at k | 40. |
查看完整验算程序
# Chapter 5. p09: Recall at k in an 82-volume library, one book or three.
# Each of 82 volumes has 40 passages. In a 24-dimensional embedding, a
# volume has a topic vector t, and its passages are 0.8 t + 0.6 u (u its
# own direction), normalised. A single-book question points at one
# passage plus noise of size sigma; a cross-book question points at the
# mean of three passages from three different volumes plus noise.
# Passages are ranked by cosine similarity. Over 150 questions of each
# kind (fixed seed) the program reports recall at k: the share of
# questions whose needed passage (or all three) are in the top k.
import math
import random
BOOKS, PER, DIM = 82, 40, 24
def unit(v):
n = math.sqrt(sum(x * x for x in v))
return [x / n for x in v]
def corpus(rng):
out = []
for b in range(BOOKS):
t = unit([rng.gauss(0, 1) for _ in range(DIM)])
for _ in range(PER):
u = unit([rng.gauss(0, 1) for _ in range(DIM)])
out.append((b, unit([0.8 * x + 0.6 * y for x, y in zip(t, u)])))
return out
def ranks(cor, q):
q = unit(q)
sc = [sum(a * b for a, b in zip(v, q)) for _, v in cor]
return sorted(range(len(cor)), key=lambda i: -sc[i])
def run(rng, cor, sigma, nneed, ks):
hits = {k: 0 for k in ks}
for _ in range(150):
books = rng.sample(range(BOOKS), nneed)
need = [b * PER + rng.randrange(PER) for b in books]
q = [sum(cor[i][1][d] for i in need) / nneed +
sigma * rng.gauss(0, 1) / math.sqrt(DIM) for d in range(DIM)]
order = ranks(cor, q)
pos = {i: r for r, i in enumerate(order)}
worst = max(pos[i] for i in need)
for k in ks:
hits[k] += worst < k
return {k: hits[k] / 150 for k in ks}
if __name__ == "__main__":
rng = random.Random(76009)
cor = corpus(rng)
ks = (5, 10, 20, 40)
print(" question sigma " + " ".join("{:>7s}".format(
"k={}".format(k)) for k in ks))
for nneed, name in ((1, "one book"), (3, "three")):
for sigma in (0.5, 1.0):
r = run(rng, cor, sigma, nneed, ks)
print(" {:9s} {:6.1f} ".format(name, sigma) + " ".join(
"{:7.3f}".format(r[k]) for k in ks))
print("\nReading: a question about one book finds its passage in a")
print("short list. A question that needs three books at once is far")
print("harder: all three must outrank thousands of passages, and")
print("plain top-k retrieval misses them even at k = 40.")唯一数据源与引用
范雅福(Fan, Y.). (2026). 《五维灵商量化架构、先验条件化生成与检索增强认知体》第 5 章「检索增强:单书召回与跨书综合」(版本 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090203
DOI: 10.5281/zenodo.24090203 · 阅读本章所在专著 · 5DL-B-076 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026076,
author = {Fan, Yafu},
title = {Spiritual Quotient Quantification, Prior-Conditioned Generation and Retrieval-Augmented Cognitive Agents},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
doi = {10.5281/zenodo.24090203},
url = {https://doi.org/10.5281/zenodo.24090203}
}