关于「季度寻优闭环与证伪方案」,《分块与混合配比》给出的定量结论是什么?
结论:第八章给出知识库分块参数的季度寻优流程、蒸馏小工具「分块配比网格寻优器」、按康纳公式取样本量的预注册检验(精确麦克尼马尔检验的实测把握度 0.762)与推翻本书核心命题的三个条件。书中以标注框区分已发表的证据、可运行的 Python 计算(17 段程序)、原典与作者的假说。
数据口径:书中参数为示意;全部计算由书中程序生成;程序不读写任何文件,不连接任何线上知识库;本书是非个人化经营建议,任何线上知识库参数的改动须经离线评测并由主事者人工复核放行。 第五章扫描混合权重:编号型查询最优 0.0,改写型最优 1.0,示意基线 0.7 / 0.3 在全改写型时遗憾 0.098;按类型分流在判别出错率为 0.10 时留出召回 0.928,已低于调好的全局权重 0.938。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.762
| psi | delta=0.02 | delta=0.03 | delta=0.05 |
| 0.06 | 1175 | 521 | 186 |
| 0.10 | 1960 | 870 | 312 |
| 0.20 | 3923 | 1742 | 626 |
| check psi=0.10 delta=0.03 n=870: simulated power 0.762 |
查看完整验算程序
# Chapter 8. p82: how many labelled queries a paired A/B of two configs
# needs. Model: each query is scored under both configs (paired). With
# discordant share psi and true recall gap delta, Connor (1987) gives
# n = (z_a sqrt(psi) + z_b sqrt(psi - delta^2))^2 / delta^2, two-sided
# alpha 0.05, power 0.8. Check: 1000 simulated trials (seed 20261113)
# of an exact McNemar test at one cell.
import math
import random
from statistics import NormalDist
ZA, ZB = NormalDist().inv_cdf(0.975), NormalDist().inv_cdf(0.8)
def connor(psi, delta):
num = ZA * math.sqrt(psi) + ZB * math.sqrt(psi - delta * delta)
return math.ceil(num * num / (delta * delta))
def mcnemar_p(b, c):
m, k = b + c, min(b, c)
tail = math.fsum(math.comb(m, i) for i in range(k + 1)) / 2 ** m
return min(1.0, 2 * tail)
print(" psi delta=0.02 delta=0.03 delta=0.05")
for psi in (0.06, 0.1, 0.2):
print("%5.2f %10d %10d %10d" % (
psi, connor(psi, 0.02), connor(psi, 0.03), connor(psi, 0.05)))
psi, delta = 0.1, 0.03
n = connor(psi, delta)
pb, pc = (psi + delta) / 2, (psi - delta) / 2
rng, rej = random.Random(20261113), 0
for _ in range(1000):
b = c = 0
for _ in range(n):
u = rng.random()
if u < pb:
b += 1
elif u < pb + pc:
c += 1
rej += mcnemar_p(b, c) < 0.05
print("check psi=%.2f delta=%.2f n=%d: simulated power %.3f" % (
psi, delta, n, rej / 1000))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《知识库分块边界网格寻优、重叠率与向量词频混合检索配比母典》第 8 章「季度寻优闭环与证伪方案」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-261 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026261,
author = {Fan, Yafu},
title = {Grid Search over Knowledge-Base Chunk Boundaries: Overlap Ratios and the Hybrid Weighting of Vector and Term-Frequency Retrieval},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}