让AI智能判断任务难易,减少无谓的代码检查。
Do AI Agents Know When a Task Is Simple? Toward Complexity-Aware Reasoning and Execution

- 提出E3策略:先估难度,再最小化执行路径
- 在基准测试中成功率达100%,成本降低85%
- 适合需要高效执行的工程类AI应用
大型语言模型代理在自动化多步骤工程与信息工作流时,常缺乏对任务所需努力程度的感知。它们通常采用最大上下文优先策略,重复读取已知文件和依赖项,将一行修改演变为小规模代码库审计。本文指出缺失的能力是任务感知的执行范围估计:判断任务难度、真实所需信息及最短可靠路径。为此,提出最小充分执行与代理认知冗余比(ACRR)的形式化定义,并设计E3(估算、执行、扩展)策略:代理先估算初始操作点,执行最小可行路径,仅在验证失败时才扩大范围。在MSE-Bench(一个121个编辑的确定性基准)上,E3达到与最强基线相同的100%成功率,同时成本降低85%、令牌消耗减少91%、检查文件数下降92%,并优于强适应检索基线16%;该优势在未见指令表述和几乎所有成本权重下仍成立。配套真实模型实验(LLM-Case)使用gpt-4o代理编辑真实开源库,所有候选补丁通过实际运行项目测试套件验证:过度读取现象虽减轻但仍存在,而E3在相近成功率下表现最轻量、最快,唯一短板为服务商速率限制而非错误编辑。本研究将其视为对执行冗余的受控探测,而非部署代理的度量,并将任务感知执行定位为面向工程现实的AI(EGAI)的关键一步。框架与基准已开源。
原文摘要 · Abstract (English)
Large language model (LLM) agents increasingly automate multi-step engineering and informatics workflows, yet they rarely ask how much effort a task actually requires. They often follow a maximum-context-first strategy--re-reading files and dependencies they have already seen--turning a one-line edit into a small code-base audit. We argue the missing capability is task-aware execution-scope estimation: judging a task's difficulty, the information it truly needs, and the shortest reliable path before committing budget. We formalize minimum-sufficient execution and the Agent Cognitive Redundancy Ratio (ACRR), and propose E3 (Estimate, Execute, Expand): the agent estimates an initial operating point, executes a minimum viable path, and expands scope only when verification fails. On MSE-Bench--a deterministic benchmark of 121 edits in a capability-controlled simulator--E3 matches the strongest baseline's 100% success while cutting cost by 85%, tokens by 91%, and inspected files by 92%, and further beats a strong adaptive retrieval baseline by 16%; the gains survive held-out instruction wording and essentially every cost weighting. A companion real-model harness (LLM-Case) corroborates the effect on a live gpt-4o agent editing a real open-source library, with every candidate patch graded by actually running the project's real pytest suite against a measured oracle: the over-reading is milder but real, and E3 is the leanest and fastest policy at comparable task success--its one shortfall a provider rate-limit, not a wrong edit. We frame this as a controlled probe of execution redundancy, not a measurement of any deployed agent, and position task-aware execution as a step toward engineering-grounded AI (EGAI)--agents whose effort is anchored in the engineering reality of the task. We release the framework and benchmark.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。