aifollow.news
Back Rohan Paul
Rohan Paul· @rohanpaul_ai · X· · Original publication time AI score54

UC Berkeley and Microsoft paper proposes external controller to cut coding-agent token costsMachine translation

AI introduction

The paper proposes TokenEconomizer, which adjusts prompts and tool settings outside the agent. It learns from past runs which facts to inject, which unused tools to remove, and when to stop a failing loop. Across 277 SWE-Bench tasks using Claude Code, Codex, and GitHub Copilot CLI, mean per-task cost fell by 18.4% to 30.9%, while Pass@1 improved in four of five agent-model settings.

Original post · AI translation

@rohanpaul_ai
Translation · refer to the original

加州大学伯克利分校和微软的一篇新论文提出一种从以往运行中学习的外部控制器,可将编程智能体的 token 成本降低 18.4% 至 30.9%。

其方法是注入学到的事实、剔除未使用的工具,并及早停止失败的循环。

编程智能体按 token 计费,而每一轮都会重新发送不断增长的历史记录,因此长期项目的费用会越来越高。token 效率通常以单个任务衡量,忽略了同一代码库中一系列任务累积起来的成本。

TokenEconomizer 作为黑盒运行在智能体之外,只更改提示词和工具设置。它从以往的运行中学习该注入哪些事实、移除哪些未使用的工具,以及何时停止失败的循环。

在 Claude Code、Codex 和 GitHub Copilot CLI 上开展的 277 项 SWE-Bench 任务测试中,它将每项任务的平均成本降低了 18.4% 至 30.9%。在 5 种智能体与模型组合中,有 4 种的 Pass@1 得到提升,而且每个代码仓库都实现了成本节省。

应衡量整个项目的智能体成本,而非单项任务的成本,并使用能够适应各个代码仓库的外部控制器,而非固定插件。

Source: Rohan Paul · x.com

Research
Found an error? Send a correction