Files
myWiki/concepts/cost-aware-benchmarking.md

52 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "代价感知基准评测 (Cost-Aware Benchmarking)"
created: 2026-06-15
updated: 2026-06-15
type: concept
tags: [benchmark, evaluation, cost]
sources: [raw/papers/zheng-claw-swe-bench-2026.md]
---
# 代价感知基准评测 (Cost-Aware Benchmarking)
## 定义
Cost-Aware Benchmarking 是将端到端运行代价API 费用、token 用量、wall-clock 时间、缓存命中率)作为**与准确率并列的第一等评测轴**的基准评测方法论。Claw-SWE-Bench 将其内建于 benchmark 设计,而非作为附属日志。
## 为什么需要
传统的 SWE-bench 风格评测仅报告 Resolved Rate / Pass@1。这导致:
- 奖励更长探索和更高预算的系统
- 更便宜但更脆弱的系统被误解
- 无法判断准确率差异是否值得代价差异
**准确率和代价不同步移动。** 真实编程 agent 不是单次模型调用——它反复读文件、编辑代码、运行命令、等待远程模型响应。
## 报告的代价指标
| 指标 | 含义 |
|------|------|
| Total Cost (USD) | 完整运行的 API 总费用 |
| Mean Wall-Clock Duration | 平均墙钟时间(含远程 API 延迟) |
| Input/Output Tokens | 输入/输出 token 用量 |
| Cache Hit Rate | 缓存命中率(影响实际 API 费用) |
## 实验证据:代价差异
在 OpenClaw × 9 模型扫掠中:
- GPT 5.5: 78.0% Pass@1, **$1,399**
- Claude Opus 4.7: 77.1%, **$1,082**
- DeepSeek-V4 Pro: 71.7%, **$81**
- DeepSeek-V4 Flash: 70.3%, **$8.2**
相似准确率的代价可能相差 **170 倍**GPT 5.5 vs DeepSeek-V4 Flash
## 缓存命中率 ≠ 能力指标
缓存命中率影响代价但不应视为能力指标——它取决于 provider 缓存策略、adapter 调用路径和上下文重用策略。应作为代价会计的诊断字段报告。
## 参考
- [[claw-swe-bench|Claw-SWE-Bench 论文]]
- [[pareto-frontier-evaluation|Pareto 前沿评测]]
- [[claw-swe-bench-lite|Claw-SWE-Bench Lite]]