盲测 A/B 对比:skill-creator 中 Blind Comparator Agent 的评分机制与 comparison.json 实战
盲测 A/B 对比:skill-creator 中 Blind Comparator Agent 的评分机制与 comparison.json 实战
在 skills 仓库中,skill-creator 是一个用于创建、迭代和改进技能(skill)的元技能,它的评估链路里有一个常被忽略但设计精巧的环节:盲测对比(Blind Comparison)。本文以 agents/comparator.md 为核心,解析这个"不知道 A/B 分别由哪个技能产出"的评审 Agent 如何接收输入、生成评分量表、计算分数、处理断言,并最终写出可被下游 Analyzer 消费的 comparison.json。读完后你将能够独立搭建一套可复现、可审计的技能版本对比流程。
一、Blind Comparator 在 skill-creator 流水线中的位置
1.1 它解决的是"哪个版本更好"的问题
skill-creator 的主循环是"写技能 → 跑测试 → 人审 → 改进 → 重复",这条主路径依赖人工在 eval viewer 里逐条给反馈。但当用户提出更尖锐的问题——"新版本真的比旧版本好吗?"——人工浏览容易受先入印象影响,于是 SKILL.md 提供了一个可选的高级路径:
For situations where you want a more rigorous comparison between two versions of a skill (e.g., the user asks "is the new version actually better?"), there's a blind comparison system. Read
agents/comparator.mdandagents/analyzer.mdfor the details. The basic idea is: give two outputs to an independent agent without telling it which is which, and let it judge quality. Then analyze why the winner won.
这段话明确了三件事:
- 触发场景:需要对两个技能版本做更严格的比较时,而非日常迭代;
- 角色分工:
comparator.md负责判胜负,analyzer.md负责解释胜负原因; - 核心手法:把两份输出交给一个独立 Agent,且不告诉它哪份来自哪个技能。
1.2 三个 Agent 的职责边界
skill-creator/agents/ 目录下有三个职责互不重叠的子 Agent 说明文件,SKILL.md 的 "Reference files" 一节把它们并列列出:
| 文件 | 职责 | 主要输入 | 主要输出 |
|---|---|---|---|
| grader.md | 逐条判断断言是否通过,并顺带批评评测本身 | expectations、transcript_path、outputs_dir |
grading.json |
| comparator.md | 盲测 A/B,判断哪份输出更好 | output_a_path、output_b_path、eval_prompt、expectations |
comparison.json |
| analyzer.md | 揭盲,解释"赢家为什么赢、输家怎么改" | winner、两侧 skill 路径与 transcript 路径、comparison_result_path |
analysis.json |
这张表揭示了一个关键的架构意图:Grader 看过程,Comparator 只看结果,Analyzer 才看技能源码。
从源码结构看,Comparator 的输入清单里完全没有 skill_path 或 transcript_path 这类会泄露来源的字段。它的四个输入(见 comparator.md)只有:
output_a_path:第一份输出文件或目录的路径output_b_path:第二份输出文件或目录的路径eval_prompt:被执行的任务原始提示词expectations:待检查的期望列表(可选,可为空)
盲测不是靠"要求模型不要偷看"实现的,而是在输入层面物理性地移除归因信息。这是一个值得借鉴的工程做法:约束靠接口设计,而不是靠提示词自律。
1.3 适用前提与限制
盲测并非全平台可用,文档给了明确边界:
- 需要子 Agent 能力。SKILL.md 写明 "This is optional, requires subagents, and most users won't need it."
- Claude.ai 环境应跳过。SKILL.md 的适配说明里直接写 "Blind comparison: Requires subagents. Skip it."
- 常规迭代优先用人审。SKILL.md 补充 "The human review loop is usually sufficient.",即盲测是"更严格时"的加分项,而非默认步骤。
二、Comparator 的输入契约与盲测语境
2.1 为什么保留 eval_prompt
既然要盲,为什么还告诉评审"原始任务是什么"?因为盲测要屏蔽的是来源,不是任务。Comparator 的职责定义(comparator.md)说得非常清楚:
The Blind Comparator judges which output better accomplishes the eval task. You receive two outputs labeled A and B, but you do NOT know which skill produced which. This prevents bias toward a particular skill or approach.
Your judgment is based purely on output quality and task completion.
如果去掉 eval_prompt,评审就退化成"哪份文件更漂亮"的格式打分,失去任务完成度这个最核心的判据。保留任务、剥离来源,才是盲测的正确姿势。
2.2 输入准备的四条实操规则
虽然文档没有单列"如何准备输入"章节,但从其流程步骤可以反推出可执行规则:
- 两侧输出要对称落地。Step 1 要求 "Examine output A (file or directory)"、"Examine output B (file or directory)"(comparator.md),说明输入允许是单文件也可以是目录;若为目录,需遍历其中所有相关文件。
- 命名不能泄露来源。文档没有规定目录命名格式,但既然盲测目标是消除"bias toward a particular skill or approach",把路径写成
outputs-new-skill/与outputs-old-skill/就自相矛盾。实践上应使用a/、b/这类中性命名。 expectations可以为空。参数说明为 "(optional - may be empty)",且 Step 5 用 "if provided" 限定,输出格式也要求无期望时整个expectation_results字段省略。这意味着 Comparator 能纯靠量表打分工作。- 一次只比一对。Step 6 的胜负判定是二选一(含 TIE),输出中
rubric只有A与B两个键,没有多路比较的位置。
三、七步流程逐段拆解
comparator.md 用七个步骤定义了完整工作流。下面逐段说明每一步的产出物与易错点。
3.1 Step 1:读取两份输出
- Examine output A (file or directory)
- Examine output B (file or directory)
- Note the type, structure, and content of each
- If outputs are directories, examine all relevant files inside
注意第 3 点的三个观察维度——类型、结构、内容。这正是后续两层量表的来源:结构与内容分别对应 Structure 与 Content 两个维度。第 4 点强调"目录要看全",因为只看目录里的主文件容易漏掉副产品(如日志、清单、中间文件),而这些恰是判断完成度的证据。
3.2 Step 2:理解任务
- Read the eval_prompt carefully
- Identify what the task requires:
- What should be produced?
- What qualities matter (accuracy, completeness, format)?
- What would distinguish a good output from a poor one?
这一步骤的关键在最后一问:"什么能区分好输出与差输出"。它直接决定了 Step 3 要不要替换默认量表标准——如果任务本身不关心"格式",那就该把 Formatting 换成更贴题的维度。
3.3 Step 3:生成评分量表(Rubric)
Comparator 使用默认的两维三准则量表,每个准则按 1/3/5 三档锚定(comparator.md):
Content Rubric(输出包含什么)
| Criterion | 1 (Poor) | 3 (Acceptable) | 5 (Excellent) |
|---|---|---|---|
| Correctness | Major errors | Minor errors | Fully correct |
| Completeness | Missing key elements | Mostly complete | All elements present |
| Accuracy | Significant inaccuracies | Minor inaccuracies | Accurate throughout |
Structure Rubric(输出如何组织)
| Criterion | 1 (Poor) | 3 (Acceptable) | 5 (Excellent) |
|---|---|---|---|
| Organization | Disorganized | Reasonably organized | Clear, logical structure |
| Formatting | Inconsistent/broken | Mostly consistent | Professional, polished |
| Usability | Difficult to use | Usable with effort | Easy to use |
文档同时给出三条按任务类型替换准则的示例,这段是量表设计的精髓:
- PDF 表单 → "Field alignment"、"Text readability"、"Data placement"
- 文档 → "Section structure"、"Heading hierarchy"、"Paragraph flow"
- 数据输出 → "Schema correctness"、"Data types"、"Completeness"
也就是说:维度名称(Content / Structure)稳定,准则(criterion)按任务定制。这保证了跨评测的分数可比性,又避免了用"格式漂亮"去衡量一个本该看数据正确性的任务。
一个容易被忽略的隐含约束:三档锚点只有 1/3/5,但 Step 4 允许打 1–5 的任意分值。从示例评分可反推,中间值(2、4)是被允许的——示例中 accuracy 给了 4(comparator.md)。锚点只是语义参照,不是取值集合。
3.4 Step 4:逐项打分与总分换算
- Score each criterion on the rubric (1-5 scale)
- Calculate dimension totals: Content score, Structure score
- Calculate overall score: Average of dimension scores, scaled to 1-10
第三步的"scaled to 1-10"需要靠示例反推公式。以文档给出的 A 侧为例:
- content: correctness 5、completeness 5、accuracy 4 →
(5+5+4)/3 = 4.667,落盘为 4.7 - structure: organization 4、formatting 5、usability 4 →
(4+5+4)/3 = 4.333,落盘为 4.3 - overall:
(4.7+4.3)/2 = 4.5,×2 得 9.0
B 侧同样自洽:content (3+2+3)/3 = 2.667 → 2.7,structure (3+2+3)/3 = 2.7,overall (2.7+2.7)/2 × 2 = 5.4。
因此可归纳出确定性算法:
content_score = round(mean(correctness, completeness, accuracy), 1)
structure_score = round(mean(organization, formatting, usability), 1)
overall_score = round((content_score + structure_score) / 2 * 2, 1) # 等价于两者均值×2
由于保留一位小数,overall_score 实际等于 content_score + structure_score(9.0 = 4.7 + 4.3,5.4 = 2.7 + 2.7)。这一点对需要自动校验 JSON 的场景很有用:总分应当是两维分数之和,而不是再做一次四舍五入的均值,否则会出现 8.9 与 9.0 这类因舍入顺序导致的偏差。
3.5 Step 5:检查断言(作为次要证据)
If expectations are provided:
- Check each expectation against output A
- Check each expectation against output B
- Count pass rates for each output
- Use expectation scores as secondary evidence (not the primary decision factor)
这一步与 Grader 的硬性 PASS/FAIL 判定形成对照。Comparator 只是"计数通过率"并标注 "secondary evidence",并且在 Guidelines 里再次强调 "Output quality first: Assertion scores are secondary to overall task completion."(comparator.md)。
为什么这么设计?因为断言通常是二值的、偏窄的检查项,容易"全部通过但输出实际不可用",也可能"任务完成得很好但恰好漏掉某个机械检查"。把断言降级为佐证,可以让量表分数承担主判据,避免断言一票否决。
3.6 Step 6:判定赢家(优先级明确)
- Primary: Overall rubric score (content + structure)
- Secondary: Assertion pass rates (if applicable)
- Tiebreaker: If truly equal, declare a TIE
Be decisive - ties should be rare. One output is usually better, even if marginally.
这是全文最"工程化"的一段:三级裁决、顺序不可调换。文档还给了反向约束——不要滥用平局,只有在"truly equal"时才 TIE。这条约定是为了防止评审 Agent 用平局规避判断。
3.7 Step 7:写出结果文件
Save results to a JSON file at the path specified (or
comparison.jsonif not specified).
这里存在一处需要读者注意的路径约定差异:comparator.md 说未指定时落到 comparison.json,而 references/schemas.md 写明该文件 "Located at <grading-dir>/comparison-N.json"。两者并不冲突:comparison.json 是单次比较的默认落盘名,comparison-N.json 是多个 eval 并存时的编号约定。实操建议是显式传入路径并携带编号,这样下游 Analyzer 的 comparison_result_path 才能精确指向某一次比较结果。
四、comparison.json 完整字段解析
comparator.md 给出的输出样例,与 schemas.md 的记录一致。以下结构体可以当作模板直接复用:
{
"winner": "A",
"reasoning": "Output A provides a complete solution with proper formatting and all required fields. Output B is missing the date field and has formatting inconsistencies.",
"rubric": {
"A": {
"content": { "correctness": 5, "completeness": 5, "accuracy": 4 },
"structure": { "organization": 4, "formatting": 5, "usability": 4 },
"content_score": 4.7,
"structure_score": 4.3,
"overall_score": 9.0
},
"B": {
"content": { "correctness": 3, "completeness": 2, "accuracy": 3 },
"structure": { "organization": 3, "formatting": 2, "usability": 3 },
"content_score": 2.7,
"structure_score": 2.7,
"overall_score": 5.4
}
},
"output_quality": {
"A": {
"score": 9,
"strengths": ["Complete solution", "Well-formatted", "All fields present"],
"weaknesses": ["Minor style inconsistency in header"]
},
"B": {
"score": 5,
"strengths": ["Readable output", "Correct basic structure"],
"weaknesses": ["Missing date field", "Formatting inconsistencies", "Partial data extraction"]
}
},
"expectation_results": {
"A": {
"passed": 4, "total": 5, "pass_rate": 0.80,
"details": [
{"text": "Output includes name", "passed": true},
{"text": "Output includes date", "passed": true},
{"text": "Format is PDF", "passed": true},
{"text": "Contains signature", "passed": false},
{"text": "Readable text", "passed": true}
]
},
"B": {
"passed": 3, "total": 5, "pass_rate": 0.60,
"details": [
{"text": "Output includes name", "passed": true},
{"text": "Output includes date", "passed": false},
{"text": "Format is PDF", "passed": true},
{"text": "Contains signature", "passed": false},
{"text": "Readable text", "passed": true}
]
}
}
}
4.1 顶层字段
| 字段 | 类型 | 约束 | 说明 |
|---|---|---|---|
winner |
string | "A" / "B" / "TIE" |
三选一,不允许其他值 |
reasoning |
string | 必填 | 说明为何获胜(或为何平局),应具体到缺失字段、格式问题等 |
rubric |
object | 必含 A、B |
结构化评分 |
output_quality |
object | 必含 A、B |
定性总结 |
expectation_results |
object | 条件字段 | 仅当提供 expectations 时存在,否则整体省略 |
"无期望则整体省略 expectation_results"是一条硬约束("If no expectations were provided, omit the expectation_results field entirely.")。写空对象 {} 或塞入 pass_rate: 0 都违背契约,会让下游误判为"断言全部失败"。
4.2 rubric 内部结构
content:correctness、completeness、accuracy,取值 1–5structure:organization、formatting、usability,取值 1–5content_score:content 三项均值,1–5,保留一位小数structure_score:structure 三项均值,1–5,保留一位小数overall_score:两维均值缩放到 1–10
如果按 Step 3 替换了准则名(例如 PDF 表单改用 field_alignment),那么 content / structure 对象内的键也会随之改变,而 content_score / structure_score / overall_score 三个聚合字段保持不变。这层"内层可定制、外层稳定"的结构,是让不同任务的对比结果仍能进入同一套汇总报表的关键。
4.3 output_quality 的定位
字段说明(comparator.md)要求:
score:1–10 评分,"should match rubric overall_score"strengths:正向要点列表weaknesses:问题或短板列表
注意文档示例本身存在一处数值对不齐:B 的 output_quality.score 写的是 5,而 rubric.B.overall_score 是 5.4;A 侧则是 9 与 9.0 一致。字段说明用的是 "should match",即这是期望而非强校验。若你要写脚本校验,建议以 rubric.*.overall_score 为准,把 output_quality.score 视为整数化的展示值,并允许 floor/round 带来的 1 分以内差异。
4.4 expectation_results 的字段名陷阱
details<a href="https://link.gitcode.com/i/8755ae68d98e8edfc246cd0c6db6058e" target="_blank">] 中每项只有 text 与 passed 两个键,没有 evidence。这与 Grader 的 grading.json 不同——后者明确要求 "must use the fields text, passed, and evidence"([SKILL.md),且强调 "not name/met/details or other variants — the viewer depends on these exact field names"。
也就是说:同一套流水线里,grader 产物带证据、comparator 产物不带证据。原因是职责不同——证据链由 Analyzer 在揭盲后从 transcript 里补,Comparator 只负责给分。混用两套 schema 会导致下游解析失败,这是集成时最常见的坑。
五、Guidelines 七条:盲测质量的护栏
comparator.md 结尾的七条准则,实际是防止评审 Agent 退化的七道护栏:
| 准则 | 原文要点 | 失败模式 |
|---|---|---|
| Stay blind | 不要试图推断哪个技能产出了哪份输出 | 从文件名、代码风格反推来源,盲测失效 |
| Be specific | 讲优劣要引用具体例子 | 只写"质量更好",无法驱动改进 |
| Be decisive | 除非真正等价,否则必须选出赢家 | 大量 TIE,比较失去意义 |
| Output quality first | 断言分数次于任务完成度 | 让机械断言主导胜负 |
| Be objective | 不因风格偏好偏袒 | 把"我喜欢的写法"当成"更好的写法" |
| Explain your reasoning | reasoning 必须能说清为何选它 |
结论无法复核 |
| Handle edge cases | 都失败时选"失败得没那么惨"的;都优秀时选"边际更好"的 | 极端情况下卡住或随意取一个 |
最后一条尤其有实操价值:它承认了**评估结果不存在"双方都不合格就弃权"**这个选项。两份输出都坏,也必须给出相对更优的一份,因为下游 Analyzer 需要一个 winner 才能继续做归因分析。
六、从 comparison.json 到 analysis.json:揭盲与归因
Comparator 的产物并不是终点。按 analyzer.md 的定义,Post-hoc Analyzer 的使命是 "unblids"(原文拼写如此)结果:
After the blind comparator determines a winner, the Post-hoc Analyzer "unblids" the results by examining the skills and transcripts. The goal is to extract actionable insights: what made the winner better, and how can the loser be improved?
它的输入正是 Comparator 的输出之一:
winner:"A"或"B"(from blind comparison)comparison_result_path:盲测器输出 JSON 的路径winner_skill_path/loser_skill_path:两侧技能目录winner_transcript_path/loser_transcript_path:两侧执行 transcriptoutput_path:分析结果落盘位置
对比两边输入清单可以看清整个设计的闭环:Comparator 拿不到技能和 transcript,Analyzer 才拿到。揭盲发生在第二阶段,且第一阶段的所有判断已经固化成 JSON,无法事后调整分数。
Analyzer 的八步流程(analyzer.md)依次是:读比较结果 → 读双方技能 → 读双方 transcript → 分析指令遵循度(1–10 分)→ 归纳赢家优势 → 归纳输家短板 → 生成按影响排序的改进建议 → 写出 analysis.json。
其输出结构的关键字段:
{
"comparison_summary": {
"winner": "A",
"winner_skill": "path/to/winner/skill",
"loser_skill": "path/to/loser/skill",
"comparator_reasoning": "Brief summary of why comparator chose winner"
},
"winner_strengths": ["..."],
"loser_weaknesses": ["..."],
"instruction_following": {
"winner": { "score": 9, "issues": ["Minor: skipped optional logging step"] },
"loser": { "score": 6, "issues": ["Did not use the skill's formatting template"] }
},
"improvement_suggestions": [
{
"priority": "high",
"category": "instructions",
"suggestion": "Replace 'process the document appropriately' with explicit steps: 1) Extract text, 2) Identify sections, 3) Format per template",
"expected_impact": "Would eliminate ambiguity that caused inconsistent behavior"
}
],
"transcript_insights": {
"winner_execution_pattern": "Read skill -> Followed 5-step process -> Used validation script -> Fixed 2 issues -> Produced output",
"loser_execution_pattern": "Read skill -> Unclear on approach -> Tried 3 different methods -> No validation -> Output had errors"
}
}
改进建议被规范为六个 category:instructions、tools、examples、error_handling、structure、references;优先级只有 high / medium / low 三档,其中 high 的定义是 "Would likely change the outcome of this comparison"(analyzer.md)。这层分类让改进动作可以直接映射到技能目录结构:tools 对应新增 scripts/,examples 对应补充示例段,references 对应新增参考文件。
需要注意的是,analyzer.md 示例里的 "path/to/winner/skill" 是占位符,不是真实路径;实际使用时必须替换为具体技能目录。同理,schemas.md 中 analysis.json 也只保留了字段骨架。
七、与仓库内其他机制的关系
7.1 为什么 comparison.json 不在 eval viewer 里
generate_review.py 只读取 grading.json(在 run_dir / "grading.json" 与 run_dir.parent / "grading.json" 两处查找),viewer.html 中也不存在 comparison / winner / rubric 相关渲染逻辑。这说明盲测结果是面向 Agent 与开发者阅读的结构化文件,不走人审 UI。
这与 SKILL.md 的定位一致:viewer 服务于日常迭代的人工反馈,盲测服务于"到底哪个版本更好"的答辩式结论。两者并行而非相互替代。
7.2 仓库里另一处"屏蔽信息"的实现
盲测的精神在 skill-creator 的脚本里还有一处同构实现。在描述优化循环 run_loop.py 中,向改进模型提供历史记录前会先剥掉测试集分数:
# Strip test scores from history so improvement model can't see them
blinded_history = [
{k: v for k, v in h.items() if not k.startswith("test_")}
for h in history
]
配套的选优逻辑同样是"用留出集选,而不是用训练集选"(run_loop.py):
# Find the best iteration by TEST score (or train if no test set)
if test_set:
best = max(history, key=lambda h: h["test_passed"] or 0)
一个是把"来源标签"从输入中移除,一个是把"测试分数"从上下文中移除,目的都是防止模型针对评估信号过拟合。理解这一点,就能明白 Comparator 的"盲"并非孤立的奇技淫巧,而是该项目在评估环节反复使用的一条设计原则。
7.3 文件必须从 SKILL.md 可达
仓库的 check-skill-files.sh 会校验每个技能的支撑文件是否被其 SKILL.md 以 Markdown 链接引用,注释里写明了理由:
every supporting file is linked from its SKILL.md with a markdown link (agents resolve file references one level deep, so unlinked files are dead weight)
agents/comparator.md 正是在 SKILL.md 的参考文件列表中注册的。因此当你基于这套机制做二次开发(例如新增一个 agents/judge.md)时,必须同步在 SKILL.md 中加上链接,否则本地校验脚本会报 "not linked from ... SKILL.md"。
八、落地实操:搭建一次可复现的盲测对比
综合上述机制,一次完整的盲测对比可以按以下顺序组织。命令中的 skill-creator 路径以本仓库为准。
步骤 1:准备两份输出目录
把两个版本在相同 eval prompt 下的产物分别落到中性命名目录,避免 with_skill / without_skill 这类泄露来源的名字进入评审视野。
<workspace>/iteration-2/eval-0/
├── a/ # 版本一输出
├── b/ # 版本二输出
├── timing.json
└── grading.json
步骤 2:调用 Comparator 子 Agent
向其提示词传入四项参数,并显式指定输出路径(携带编号,便于多 eval 归档):
Read .agents/skills/skill-creator/agents/comparator.md and follow it.
- output_a_path: <workspace>/iteration-2/eval-0/a
- output_b_path: <workspace>/iteration-2/eval-0/b
- eval_prompt: <原始任务提示词>
- expectations: <来自 eval_metadata.json 的断言列表,或留空>
Save the result to: <workspace>/iteration-2/eval-0/comparison-0.json
步骤 3:人工核对比对结果的内部一致性
写一个小校验脚本,检查三件事:总分是否等于两维之和;overall_score 是否落在 1–10;无 expectations 时是否确实省略了 expectation_results。这类校验是纯算术的,适合程序化执行,比让模型自查更可靠。
步骤 4:把赢家交给 Analyzer 揭盲
Read .agents/skills/skill-creator/agents/analyzer.md and follow it.
- winner: <comparison-0.json 中的 winner 字段>
- comparison_result_path: <workspace>/iteration-2/eval-0/comparison-0.json
- winner_skill_path: <赢家版本的技能目录>
- winner_transcript_path: <赢家执行 transcript>
- loser_skill_path: <输家版本的技能目录>
- loser_transcript_path: <输家执行 transcript>
- output_path: <workspace>/iteration-2/eval-0/analysis-0.json
步骤 5:按 priority: high 的建议改进输家
analysis.json 的 improvement_suggestions 已按影响排序,直接取 high 项落地,medium / low 项留作后续迭代。
九、常见陷阱与规避方式
陷阱一:路径泄露来源。 最隐蔽的破盲方式不是提示词写错,而是目录名含有版本信息。评审 Agent 会"顺手"根据 new_skill/ 推断哪边是实验组。规避方式:输入目录一律用 a/、b/,并在每轮比较前交换 A/B 分配(同一对输出做两次,A/B 互换),若两次结论不一致,说明评审受位置偏置影响。
陷阱二:把断言当主判据。 若断言写得好,容易掩盖量表的粗糙;若写得差,又容易误杀好输出。文档明确断言是 "secondary evidence",实操中应确保 rubric 先行打分、expectation_results 后置统计,且当总分明显偏向一方而断言偏向另一方时,以总分为准并在 reasoning 中说明分歧。
陷阱三:量表不适配任务。 直接套用默认六准则去评一个数据导出任务,会出现"格式整齐但 schema 错误"仍拿 4 分的荒谬结果。按 Step 3 的示例,改为 Schema correctness、Data types、Completeness 才是正确做法;同时要记得 content_score / structure_score 的聚合逻辑不变。
陷阱四:输出目录只看主文件。 Step 1 要求遍历目录内所有相关文件。实践中应明确"哪些文件是证据"——产物、日志、清单都算,临时缓存不算。这条边界最好在 eval prompt 里一并说明,否则 A/B 两侧的评审范围可能不一致,导致对比不公平。
陷阱五:滥用 TIE。 文档要求 "ties should be rare"。若发现连续多轮都判 TIE,通常是两个原因:量表区分度不足(准则过于笼统),或任务本身不具区分度(eval prompt 太简单)。这时应回到 Step 3 调整准则,而不是接受平局。
陷阱六:混淆两套 schema。 grading.json 的 expectations<a href="https://link.gitcode.com/i/71ec7d01a0451e916d29cddc8f4d0d97" target="_blank">].evidence 与 comparison.json 的 expectation_results.A.details[].text 是两套命名空间。把 grader 的输出直接喂给 Comparator,或反之,都会导致字段读取失败。集成时务必对照 [references/schemas.md 逐字段核对。
十、小结:盲测设计的三个可迁移经验
回顾 comparator.md 全文,这套机制有三点值得迁移到其他 Agent 评测场景:
- 用接口实现约束,而非用提示词。不传
skill_path、不传transcript_path,比在提示词里写十遍 "do not guess the source" 更可靠。 - 量表分层:稳定维度 + 可定制准则。Content / Structure 两维稳定,保证跨任务可比;六个准则可按任务替换,保证评得准。聚合公式(
overall = content_score + structure_score)在全仓库唯一且可程序校验。 - 判分与归因分离。Comparator 只输出
winner+reasoning+ 分数,不碰技能源码;Analyzer 拿全部上下文做根因分析与改进建议。两阶段之间用一份comparison.json冻结结论,让评审过程可复核、可复现、可审计。
若你正在为自研 Agent 搭建版本对比流程,可以直接复用这套分工:先盲评固定结论,再揭盲解释原因,最后把改进项按 priority 写回技能目录的 scripts/ 与 references/。比起"让同一个 Agent 既评又改",这种两段式结构能有效避免评审者为自己刚写的改动找理由。