关于「自进化:反馈回路、回归门、漂移与技能库的累积」,《专著蒸馏与技能包工程》给出的定量结论是什么?

结论:一份没有黄金样本的技能包,在频繁修改下会悄悄退化:p60 的模型里,30 轮之后只剩 0.7080 的规则完好,靠投诉来修只能把它托在 0.6757 的地板上;九成规则有样本守着的包,同一时刻保留 0.9708。回归门把版本号、样本通过与覆盖率三件事绑在一起,十次候选发布挡下了四次。漂移要按天、按对话来监测,累积和比周平均早约五天报警。把可见样本通过率当成目标,会得到一个满分却变坏的包;技能库要靠入库门积成山,而不是堆成堆。自我批评会把技能包拉向它自己的固定点,只有外部样本能把这个固定点抬高。下一章讨论的治理,要回答的是另一半问题:谁有权改、改了以后怎样追溯,以及什么时候该让一条规则退场。

数据口径:书中样本全部虚构,定价与成交规则只写一般框架,不是法律或合规意见。 全书按证据分级标注每一条说法,以《荀子·劝学》考辨工具与积累,所有计算由书中程序生成,作者的判断一律写进假说框并写明什么结果会推翻它。

English version

对照数据表

下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.6757, 0.7080, 0.9708, 30

rules 40, touch 0.3, silent-break 0.08, q0.024 per rule per round, repair 0.05
round | no tests: sim formula | 90% golden coverage: sim formula
0 |1.0000 1.0000 | 1.0000 1.0000
5 |0.8963 0.8965 | 0.9892 0.9896
10 |0.8272 0.8260 | 0.9820 0.9826
15 |0.7784 0.7780 | 0.9766 0.9778
20 |0.7431 0.7454 | 0.9739 0.9745
25 |0.7225 0.7231 | 0.9713 0.9723
30 |0.7072 0.7080 | 0.9698 0.9708
an uncovered rule with no repair survives 28.5 rounds with probability 0.5
coverage 0.0: round-30 retention 0.7080, long-run 0.6757, broken at round 30 11.68 of 40
coverage 0.5: round-30 retention 0.8540, long-run 0.8378, broken at round 30 5.84 of 40
coverage 0.9: round-30 retention 0.9708, long-run 0.9676, broken at round 30 1.17 of 40
coverage 1.0: round-30 retention 1.0000, long-run 1.0000, broken at round 30 0.00 of 40
no repair at all (F0): round-30 retention, no tests 0.4825, 90% coverage 0.9482
查看完整验算程序
# Chapter 6. p60: Rule retention of a skill pack over edit rounds, with and without golden tests.
# Model. A pack holds R rules. In each edit round every rule is touched with probability T, and a
# touched rule is silently broken with probability B, so q = T * B per rule per round. A golden test
# suite covers a fraction C of the rules; a break in a covered rule fails the regression gate and is
# reverted before release; a break in an uncovered rule ships. A shipped break is repaired when a
# customer complaint exposes it, with probability F per round. An uncovered rule is a two-state
# Markov chain, so with s = F / (q + F):
#   E[retention after n rounds] = C + (1 - C) * (s + (1 - s) * (1 - q - F)^n).
# The Monte Carlo below checks the closed form with a fixed seed.
import math
import random

R, T, B, F, ROUNDS, PACKS = 40, 0.30, 0.08, 0.05, 30, 2000


def closed(n, cover, repair=F):
    q = T * B
    s = repair / (q + repair)
    return cover + (1 - cover) * (s + (1 - s) * (1 - q - repair) ** n)


def simulate(cover, seed):
    rng = random.Random(seed)
    curve = [[] for _ in range(ROUNDS + 1)]
    for _ in range(PACKS):
        ok = [True] * R
        covered = [i < round(cover * R) for i in range(R)]
        curve[0].append(1.0)
        for n in range(1, ROUNDS + 1):
            for i in range(R):
                if ok[i]:
                    if rng.random() < T and rng.random() < B and not covered[i]:
                        ok[i] = False
                elif rng.random() < F:
                    ok[i] = True
            curve[n].append(sum(ok) / R)
    return [math.fsum(c) / PACKS for c in curve]


if __name__ == "__main__":
    q = T * B
    print("rules {}, touch {}, silent-break {}, q = {:.3f} per rule per round, repair {}".format(
        R, T, B, q, F))
    sims = {c: simulate(c, 6060 + int(c * 100)) for c in (0.0, 0.9)}
    print("round | no tests: sim  formula | 90% golden coverage: sim  formula")
    for n in (0, 5, 10, 15, 20, 25, 30):
        print("{:5d} | {:14.4f} {:8.4f} | {:25.4f} {:8.4f}".format(
            n, sims[0.0][n], closed(n, 0.0), sims[0.9][n], closed(n, 0.9)))
    half = math.log(0.5) / math.log(1 - q)
    print("an uncovered rule with no repair survives {:.1f} rounds with probability 0.5".format(half))
    for c in (0.0, 0.5, 0.9, 1.0):
        print("coverage {:.1f}: round-30 retention {:.4f}, long-run {:.4f}, broken at round 30 {:.2f} of {}"
              .format(c, closed(30, c), c + (1 - c) * F / (q + F), R * (1 - closed(30, c)), R))
    print("no repair at all (F = 0): round-30 retention, no tests {:.4f}, 90% coverage {:.4f}".format(
        closed(30, 0.0, 0.0), closed(30, 0.9, 0.0)))

唯一数据源与引用

范雅福(Fan, Y.). (2026). 《专著向智能体技能包无损蒸馏、规则可执行化编译与系统自进化工程》第 6 章「自进化:反馈回路、回归门、漂移与技能库的累积」(版本 0.1.0). 5D Library. DOI 待发布

DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-150 · v0.1.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026150,
  author    = {Fan, Yafu},
  title     = {Lossless Distillation of Monographs into Agent Skill Packs, Executable Rule Compilation and Self-Evolving Systems},
  year      = {2026},
  publisher = {5D Library},
  edition   = {0.1.0},
  note      = {DOI pending}
}

本书其他章节结论