Agentic search 怎么做 offline eval?
怎么确定新版本真的更好?
先弄清楚:每个概念是什么
- Trajectory
- agent 做一道题的全部步骤:每次的 query、tool call、返回结果、最终答案。
- Per-hop recall
- 多跳问题里,每一跳需要的 evidence 有没有被检索到。例:两跳问题,第一跳的 message 找到了,第二跳的 email 没找到 → 1/2。
- Fixed corpus
- 评测时把可搜的 corpus 冻结(BrowseComp-Plus 的做法),结果可复现,也能分开看 retriever 和 LLM 的贡献。
- Paired comparison
- A、B 两个版本跑同一批题,逐题比较。题目难度的差异被抵消,所以更灵敏。
- Run-to-run variance
- 同一道题跑两次结果可能不同,因为 sampling 和 tool 返回都会变。所以每题跑 k 次,报平均成功率和 k 次全对的比例,两个版本用相同的 k 和 sampling 参数。
30 秒回答
Final-answer accuracy isn't enough, because a right answer can come from a bad path. I'd evaluate three layers on a frozen corpus with gold evidence. Retrieval: per-hop recall of the gold documents. Trajectory: tool selection, argument accuracy, number of searches, and whether it stopped at the right time. Answer: correctness, groundedness, and abstention on unanswerable questions. Agents are stochastic, so I run each task several times. To compare two versions, I use a paired test on the same queries and report a confidence interval, not just two averages.
三层指标,加上 cost
| 层 | Metric | 注意 |
|---|---|---|
| Retrieval | per-hop recall、evidence recall@k | 需要标出 gold evidence |
| Trajectory | tool selection accuracy、argument accuracy、平均 search 次数 | 路径不唯一,只查关键 milestone 和最终状态(ToolSandbox 的做法) |
| Answer | correctness、groundedness、abstention rate | unanswerable 单独统计;judge 先用人工校准(见标注与 LLM judge) |
| Cost | latency、token | 和质量一起报 |
新版本真的更好吗
200 道题,A 对 140 道(70%),B 对 150 道(75%),只看这两个数判断不了。逐题配对后,B 对而 A 错的有 18 道,A 对而 B 错的有 8 道。McNemar test:
\[ \chi^2 = \frac{(18-8)^2}{18+8} \approx 3.85 \]自由度为 1 时 0.05 的临界值是 3.84,p 约等于 0.05,刚到显著线。结论是“可能更好,证据还不够”,要加题或每题多跑几次。recall 这类不是 0/1 的指标用 paired bootstrap 算 confidence interval。
必答点
- 只看最终答案不够:分 retrieval、trajectory、answer 三层
- corpus 冻结,带 gold evidence,结果才可复现
- 轨迹不唯一 → milestone 匹配
- 每题多跑几次,报方差
- 版本比较用配对检验,报 confidence interval
追问
没有 gold evidence 怎么办?
合成数据时一起生成,造题时就记下答案在哪条数据里(见合成数据质量)。
offline 变好了,online 没变好?
多半是评测集和真实 query 的分布不一致。看 online 的 reformulation 集中在哪类 query,再查评测集有没有覆盖。
来源Apple JD 200670397 · BrowseComp-Plus(固定 corpus、人工核验的 supporting documents 和 hard negatives)· ToolSandbox(Apple)(stateful tool execution、milestone 评测)· ASTRA-bench(Apple)