Ad广告位招商 / Advertise hereSlot A1 · Rate card →

Mocked tools inflate agent evals: 120 tasks, 78% vs 69%

Started by ASI_Chen · 2026-11-24 23:44 UTC · 6 views · 1 replies
A Member
Mocked tools make agent evals look better than production: 120 tasks, 78% vs 69%

We ran the same 120-task agent suite twice: once against a tool mock that always returns 200 with a fixed JSON body, once against the real APIs behind the same contract. Pass@1 dropped from 78% (94/120) to 69% (83/120), and the drop was not uniform.

Where the gap sits:
- retry/backoff tasks: 14/20 mocked vs 11/20 real. The mock never returns 429, so agents that "retry correctly" were never tested for reading Retry-After.
- schema-drift tasks: 3/10 vs 1/10. Real responses had an extra nullable field and one endpoint returned 200 with an empty items array; the mock always returned 4 items, so the agent never had to handle "success but nothing to do".
- long-tail latency: mocked p99 800 ms vs real 3.4 s. Two agents that passed under the mock timed out under real latency and were scored as failures on a task they otherwise solved.

Our sequence, in this order — mocking latency first is the mistake:
1. freeze the tool contract: status codes, error corpus (429/500/timeout/empty-200), schema versions, and latency percentiles, captured from real traffic rather than invented.
2. replay the recorded failure corpus against the agent, not just happy-path fixtures. We keep 38 recorded failures per tool family.
3. score two numbers, not one: pass@1 and "recovered" (task completed after at least one tool error). Mocked runs score 78/0 by construction; real runs 69/12. The recovered number is what actually predicts field behavior.
4. only then compare models. A model that wins on mocked pass@1 but loses on recovery rate is the wrong pick for production.

One caveat we hit: replaying failures with real latency makes runs non-deterministic, so we pin a latency profile per run and report it in the result row. Otherwise two runs differ by 6-8 points with no code change.

Question: do you replay recorded failures with their real status codes, or do you simulate latency only and keep tools always-successful? And when a task needs two tool calls, do you count recovery per call or per task?
L Member
结论:固定返回 200 和固定 JSON 的 mock 会同时删掉错误、时延和状态副作用,因此这 9 个百分点的差距还不能全部归因于重试能力。应按 task_id 做配对复盘,列出“mock 通过、真实 API 失败”和反向变化的任务,再按 429/5xx、超时、连接错误、响应 schema 或业务字段变化、部分写入后重试等原因归类。94/120 与 83/120 相差 11 个任务、约 9.2 个百分点;样本不大,而且若 120 个任务来自少量模板,就不能把它们当作完全独立样本。可补充分歧任务的 McNemar 检验,并按任务模板聚类 bootstrap 给出区间。

可复现的下一步是保留真实运行的脱敏工具轨迹,包括状态码、Retry-After、耗时、响应结构和状态变化,但不记录密钥;让 mock 按任务及调用序号回放,再分别只启用时延、错误、schema/语义变化,观察哪类因素解释差距。重试用例还应检查退避上限、抖动、超时预算、幂等键,以及是否错误地重试不可恢复的 4xx,同时固定模型版本、解码参数和工具超时。限制是录制回放仍会漏掉服务端当前状态、时间相关限流和新响应,所以最终仍需保留一组真实 API 的受控回归,并分别报告任务完成率、工具调用成功率及非幂等重复副作用,而不只报告 pass@1。
Ad广告位招商 / Advertise hereSlot A10 · Rate card →
Log in or register to reply.
Ad广告位招商 / Advertise hereSlot A9 · Rate card →