评估方法与工具
方法矩阵
白皮书推荐组合多种方法,无单一方法覆盖所有维度:
| 方法 | 适用维度 | 描述 |
|---|---|---|
| Automated Functional Testing | 维度 2、5 | 运行构建、测试套件、linters |
| Security and Safety Evaluation | 跨维度 | 静态安全分析 + 对抗性探测 |
| LLM-as-judge / Agent-as-judge | 维度 1、5、6 | 模型评分输出 |
| Browser-based Testing | 维度 3 | Playwright 脚本交互渲染 UI |
| Trajectory Inspection | 维度 6、7 | OpenTelemetry traces 分析 |
| Human Review | 维度 1、5、安全 | 结构化标注,不扩展 |
| Online Evaluation | 所有维度 | 生产流量采样 |
详细解读
Automated Functional Testing(自动化功能测试)
工具:pytest, jest, eslint, mypy
集成:项目 CI pipeline
覆盖: - Functional Correctness (维度 2) - Code Quality rule-checkable 部分 (维度 5)
优势:最便宜的信号
Security and Safety Evaluation(安全和安全评估)
跨切面:与所有维度并行评分,非独立门禁
两部分工具:
- Static Scanners:
- Snyk、Semgrep → 发现漏洞
- git-secrets → 捕获凭证泄露
- Scripted Red-Team Suites:
- 测试 Agent 是否拒绝有害请求
LLM-as-judge & Agent-as-judge
适用:规则不能完全捕获正确答案的维度
实现:
LLM-as-judge:
Gemini 评分输出对比原始用户 prompt
Agent-as-judge:
Agent 检查 trace 的计划连贯性
覆盖: - Intent Satisfaction (维度 1) - Code Quality and Style (维度 5) - Trajectory Quality (维度 6)
Browser-based Testing(浏览器测试)
适用:UI-producing Agents
技术: - Playwright scripts → 交互渲染 UI - Screenshot comparison against reference(截图对比参考)
覆盖:Visual and Behavioural Correctness (维度 3)
Trajectory Inspection(轨迹检查)
基础:OpenTelemetry traces + span-level tool-call data
工具:trace-replay tools → 绑定每次模型调用到后续行动
覆盖: - Trajectory Quality (维度 6) - Self-Repair Behaviour (维度 7)
Human Review(人工审查)
适用: - Intent Satisfaction (维度 1):人类唯一地面真理 - Code Quality (维度 5):传统代码审查领域 - Safety and Responsible AI:需要细微判断
局限:不扩展;主要用于校准其他方法
实践:资深工程师结构化标注 → online sampling 填充审查队列
Online Evaluation(在线评估)
方法:采样生产流量 → 使用相同 rubrics offline eval 评分
覆盖:所有维度(采样率)
技巧:
Flat 1% sampling → miss long tail(错过长尾) ❌
Bias toward:
• High-cost sessions(高成本会话)
• Sessions with many corrections(多修正会话)
• Sessions user abandoned(用户放弃会话)
Standardised Benchmarks(标准化基准)
作用:从自定义企业环境噪音中隔离特定认知能力
提供:信任非确定性系统的经验基线
主要基准:
| 基准 | 评估内容 |
|---|---|
| Vibe Code Bench | Zero-to-one web app generation(从零到一 web app 生成) |
| SWE-bench Verified | Real GitHub repo code changes(真实 GitHub 仓库代码变更) |
| LiveCodeBench | Contamination-resistant signal for code generation(抗污染代码生成信号) |
Kaggle SAE(Standardized Agent Exams):
Zero-Setup Autonomous Evaluation:
Agent 自主行为:
1. 通过 SKILL.md 文件作为轻量 API 集成
2. Agent 自主注册 Kaggle
3. 获取考试问题
4. 在自己沙箱环境中执行多步逻辑
5. 即时发布分数到实时公共排行榜
效果:严格、无摩擦测试 Agent 多跳推理和对抗安全
权衡:
Overfitting Risk:
Agent hyper-optimized → Kaggle datasets top-tier scores ✓
但 exposed to messy, contradictory human intent realities → fail catastrophically ❌
示例:
SWE-bench 高分 → 证明 Agent 可导航结构化 Python repo ✓
但 → 零保证 Agent 有审美判断 vibe code 消费者应用 ❌
使用原则:
Standardized exams → cognitive calibration(认知校准)
NOT → replacement for evaluating custom intent(替代自定义意图评估)