论文精选

UC Berkeley 与 Microsoft 论文:TokenEconomizer 将编码智能体 token 成本降低 18.4%–30.9%

精选理由

做编码智能体的开发者都会遇到 token 账单越滚越大的问题,这篇论文给出黑盒外挂方案:学事实注入、剪工具、砍死循环。在 Claude Code、Codex、Copilot CLI 上实测省两到三成成本,准确率还不掉。自己搭 agent 工作流的人值得照着复现。

UC Berkeley 与 Microsoft 的研究者发布 TokenEconomizer,一个位于编码智能体之外的外部控制器,在 277 个 SWE-Bench 任务上将平均单任务 token 成本降低 18.4% 到 30.9%。编码智能体按 token 计费,每轮对话都会重发不断增长的历史记录,同一代码库中跨任务的累计成本往往被忽视。

正文

TokenEconomizer 以黑盒方式工作,只修改提示词和工具设置:从过去的运行记录中学习应注入哪些事实、剪枝哪些未使用的工具,以及在失败循环中何时提前停止。它不改动智能体内部实现。

实验覆盖 Claude Code、Codex 和 GitHub Copilot CLI 三种智能体,在 5 个智能体-模型组合中的 4 个里 Pass@1 不降反升,且成本节省在每个代码库中都成立。论文建议按整个项目而非单任务度量智能体成本,并使用能适配各代码库的外部控制器,而非固定插件。

原文 · rohanpaul_ai

New UC Berkeley and Microsoft paper cuts coding-agent token costs by 18.4% to 30.9% using an external controller that learns from past runs.

by injecting learned facts, pruning unused tools, and stopping failed loops early.

Coding agents are billed by the token, and each turn resends the growing history, so long projects get expensive. Token efficiency is usually measured on isolated tasks, missing the cost that builds up across a sequence of tasks in the same codebase.

TokenEconomizer sits outside the agent as a black box, changing only prompts and tool settings. From past runs it learns which facts to inject, which unused tools to drop, and when to stop a failing loop.

Across Claude Code, Codex, and GitHub Copilot CLI on 277 SWE-Bench tasks, it cut mean per-task cost 18.4% to 30.9%. It improved Pass@1 in 4 of 5 agent-model settings, and savings held in every repository.

Measure agent cost across a whole project, not per task, and use an external controller that adapts to each repo, not fixed plugins.

产业坐标与信源核验

本条情报归属 AITOP「论文」核心栏目,重点聚焦北美前沿实验室与硅谷科技巨头。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」「中美大模型技术代差与商业化对照」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:TokenEconomizer、Claude Code、Codex、SWE-Bench,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。

信源核验说明:本文原始线索采编自「rohanpaul_ai」(@rohanpaul_ai),经 AITOP 多维评分管线结构化提炼。