跳转至

你的AI Agent能更省钱吗?探究任务规范对智能体编码任务中Token消耗的影响

文章背景与核心概要

随着智能体(Agentic)编码工作流在实际系统中的日益普及,如何管理 Token 消耗对于控制成本和提升效率至关重要。这篇由 Jakub Smékal 撰写并于 2026 年 8 月 26 日提交至 arXiv 的论文,深入研究了任务规范(Task Specifications)如何影响智能体在编码任务中的 Token 消耗。

通过使用 Kimi K3 模型在三种思考努力程度(thinking-effort)下进行 2,700 次实验运行,研究表明:将一份完整的任务规范精简为单一的精简用户故事(bare user story),会导致 Token 消耗增加 29.7%。此外,提示词敏感度(Prompt-sensitivity)高度取决于具体任务(范围从 13% 到 115%),但运行间的方差(run-to-run variance)不受提示词更改的影响。作者引入了一种预测方法,能够通过对未见任务进行单次低成本探测,在 36% 的准确率范围内为任务规范和思考努力配置的全部分布进行定价,为评估 AI 工作流成本提供了一个强有力的工具。


摘要与参考信息


英文摘要

Agentic coding workflows are now widely deployed in real-world systems. With long-horizon reasoning and tool use, token usage has become an important consideration for both cost and efficiency. Two engineers using AI will solve the same problem differently. How the specification of a task shapes an agent's token spend, and whether that spend can be predicted in advance, are open questions.

Here, we study the effects of different task specifications on agentic token spend with the Kimi K3 model at three thinking efforts. Across \(2,700\) runs, we show that reducing a full task specification to a bare user story raises token spend by \(29.7\%\), while run-to-run variance remains unaffected by any prompt changes. We show that prompt-sensitivity is task-dependent, running from \(13\%\) to \(115\%\). We fit a simple predictor that can price a full distribution of task specifications and thinking effort configurations from a single cheap probe on an unseen task within \(36\%\), improving over prior work in predicting token spend. Our work provides initial results quantifying the effects of task specification on agentic token spend and introduces a method that can be used to systematically evaluate the cost of AI coding workflows.

智能体编码工作流现已广泛部署于真实世界的系统中。凭借长周期推理和工具调用能力,Token 的使用已成为考量成本与效率的重要因素。两名使用 AI 的工程师会以不同的方式解决同一个问题。任务的规范如何塑造智能体的 Token 消耗,以及这种消耗是否可以提前预测,仍是尚未完全解决的问题。

在本文中,我们使用 Kimi K3 模型在三种思考努力程度下,研究了不同任务规范对智能体 Token 消耗的影响。通过 \(2,700\) 次实验运行,我们发现将完整的任务规范精简为单一的用户故事会使 Token 消耗增加 \(29.7\%\),而运行间的方差不受任何提示词更改的影响。我们表明,提示词敏感度取决于具体任务,其范围从 \(13\%\)\(115\%\) 不等。我们拟合了一个简单的预测器,能够通过对未见任务进行单次低成本探测,在 \(36\%\) 的误差范围内对任务规范和思考努力配置的全部分布进行定价,这改进了以往预测 Token 消耗的工作。我们的工作提供了量化任务规范对智能体 Token 消耗影响的初步结果,并引入了一种可用于系统评估 AI 编码工作流成本的方法。


访问与资源