5D Library › 算法之镜 · English

第八章 实践:提示审计与预注册试验

第一部分 四步审计

在请模型帮忙做一项研究、一篇文章或一份计划之前,值得先审计一下任务书。下面四个步骤把前几章的想法变成几分钟就能数出来的计数。

  1. 约束。 数一数从答案中去掉自由度的约束:范围、读者、篇幅、形式、哪些不在范围内、哪些必须包含。(第一章:信息改变概率的方向。)
  2. 桥接。 数一数明确的、在点名的领域之间建立的桥接,每一个都写明要考察的关系,例如「用控制论中的延迟反馈模型分析歌唱中的音高纠正」。(第二章:问题的射程。)
  3. 证伪条件。 数一数事先写明的、能证明答案中某个想法是错的条件。(第四章:防止只看见自己预期的东西。)
  4. 独立来源。 数一数将用来核对答案的独立来源、数据或检验。(第三章:核查系统的多样性。)

推导

把审计写成满分 20 分的评分,每一步都设上限以免某一步占主导,并用于三份任务书。

# The four-step audit of a prompt or research brief, scored by hand and summed.
# Each count is capped so that no single step can dominate.
def audit(constraints, bridges, falsifiers, sources):
    parts = {
        "1 constraints that remove degrees of freedom": min(constraints, 5),
        "2 explicit bridges between named fields":      min(bridges, 3) * 5 / 3,
        "3 conditions that would show the idea wrong":  min(falsifiers, 3) * 5 / 3,
        "4 independent sources to check against":       min(sources, 3) * 5 / 3,
    }
    return parts, sum(parts.values())

briefs = {
    "'Write about AI and creativity.'": (0, 0, 0, 0),
    "domain brief (scope, audience, length, 2 sources)": (4, 0, 0, 2),
    "cross-field brief (as above + 2 bridges + 2 tests)": (4, 2, 2, 3),
}
for name, counts in briefs.items():
    parts, total = audit(*counts)
    print(f"{name:52s} score {total:4.1f} / 20  ("
          + ", ".join(f"{v:.1f}" for v in parts.values()) + ")")
# 'Write about AI and creativity.'                     score  0.0 / 20  (0.0, 0.0, 0.0, 0.0)
# domain brief (scope, audience, length, 2 sources)    score  7.3 / 20  (4.0, 0.0, 0.0, 3.3)
# cross-field brief (as above + 2 bridges + 2 tests)   score 15.7 / 20  (4.0, 3.3, 3.3, 5.0)

这个分数是教学工具,不是经过验证的量表;它的权重是一种选择。分数越高是否预示输出越好,正是下面的试验要检验的。

注

多不一定好。约束过多的任务书可能使好答案无处容身;在毫无真实关系的领域之间架桥,只会产生自信的胡说。这份审计是检查是否缺少结构,而不是要最大化的目标。

第二部分 预注册随机试验

问题

对于研究规划类任务,跨领域结构化提示是否使语言模型产出的研究方案,在盲评专家看来比常规单一领域提示产出的方案更新颖、更严谨?

设计

要素 规定
单位 事先从一份公开的开放问题清单中抽取 60 个研究问题,覆盖六个大领域,每个领域十个
提示 每个问题由独立的提示撰写者写两个提示,撰写者看不到输出:A,常规单一领域提示(问题、所属领域、要求的输出);B,跨领域结构化提示(同上,另加至少两个点名的领域桥接、两个可证伪条件和三个用于核对的独立来源)。A 用中性的背景材料补足,使两种提示长度相近
生成 固定一个模型版本和设置并记录;每个提示生成三个样本,随机选一个送评
顺序 成对的输出按随机顺序呈现;去掉可能暴露组别的格式线索
评审 每个领域三名专家,不知道组别和假说,按新颖性和严谨性给每份方案打分(1–7 分,有书面锚定说明)
结局 共同主要结局:平均新颖性评分与平均严谨性评分;次要结局:评审一致性(ICC),事实核查员发现至少一处事实错误的方案比例
分析 以问题为随机效应的混合模型;每个共同主要结局以 α = 0.025 检验

样本量

推导

import math
from statistics import NormalDist

z = NormalDist().inv_cdf

def topics_needed(sd_diff, delta, alpha=0.025, power=0.90):
    """Paired design: each research topic gets both prompt types. alpha = 0.025 per
    co-primary outcome (novelty, rigour), a Bonferroni split of 0.05."""
    za, zb = z(1 - alpha / 2), z(power)
    return math.ceil(((za + zb) * sd_diff / delta) ** 2 + za ** 2 / 2)

# Outcomes: mean of three blinded experts' ratings on a 1–7 scale.
SESOI = 0.5
for sd in (0.8, 1.0, 1.2):
    print(f"SD of within-topic difference {sd}: {topics_needed(sd, SESOI)} topics")
# SD of within-topic difference 0.8: 35 topics
# SD of within-topic difference 1.0: 53 topics
# SD of within-topic difference 1.2: 75 topics

方案按中间情形计划,需要 53 个问题;抽取 60 个,以容纳因模型拒答或评审无法评估而剔除的问题。问题内差值的标准差 1.0 分是一个假设,将在 6 个问题的预试验中核对。

判定规则

推导

SESOI = 0.5     # rating points on a 1–7 scale

def verdict(name, diff, lo, hi):
    """diff = cross-field structured prompt minus single-domain prompt, with a
    97.5 % confidence interval. Fixed before any data are seen."""
    if lo >= SESOI:
        v = "clearly higher (by at least 0.5)"
    elif lo > 0:
        v = "higher; size not shown to reach 0.5"
    elif hi < 0:
        v = "lower"
    elif lo >= -SESOI and hi <= SESOI:
        v = "no difference worth acting on"
    else:
        v = "unclear"
    return f"{name:8s} {diff:+.2f} ({lo:+.2f} to {hi:+.2f}): {v}"

print(verdict("novelty", 0.9, 0.6, 1.2))
print(verdict("rigour", 0.1, -0.3, 0.5))
print("Both outcomes are reported together: higher novelty with no gain in rigour is a")
print("different result from higher novelty and higher rigour, and is reported as such.")
# novelty  +0.90 (+0.60 to +1.20): clearly higher (by at least 0.5)
# rigour   +0.10 (-0.30 to +0.50): no difference worth acting on
# Both outcomes are reported together: higher novelty with no gain in rigour is a
# different result from higher novelty and higher rigour, and is reported as such.

示例是编造的,用来事先说明结果将怎样报告。新颖性和严谨性一起报告,因为只提高了新颖性而没有提高严谨性,是一个不同的、用处更小的结果。

这项试验不能说明什么

试验比较的是一个模型、一个版本、一类任务上的两种提示。结果未必能推广到变化很快的其他模型,或其他任务。提示 B 与 A 同时在几个方面不同;阳性结果支持的是整套做法,而不是其中任何一个部分。专家对新颖性的评分也不等于重要性:一个方案可以是新的,却仍然不值得做。

伦理与利益冲突

试验涉及专家评审,但不涉及病人或弱势参与者;评审签署知情同意,并按时间获得报酬。方案将在生成任何输出之前公开登记,遵循预注册的原则 (Nosek et al. 2018)。

利益披露

作者创办并经营 Asia Influencer X 与 Yafu Global,在网红营销、数字营销和内容制作中使用 AI 工具,并提倡本书所描述的「人类架构师 + AI 起草 + 人类核查」工作方式,因此与有利的结果有利益关系。为限制这种利益的影响:方案、提示模板、分析代码和判定规则在生成任何输出之前公开;提示撰写者、评审和分析者都独立于作者的企业;无论结果如何,结果、输出、评分和代码都将公开。

参考文献

Nosek, Brian A., Charles R. Ebersole, Alexander C. DeHaven, and David T. Mellor. 2018. “The Preregistration Revolution.” Proceedings of the National Academy of Sciences 115 (11): 2600–2606.

Fan, Y. (2026). The Algorithmic Mirror: Self-Attention Geometry, Ashby's Requisite Variety and Cognitive Projection in Information Theory and East Asian Philosophy of Mind [算法之镜] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.23723557 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).