编码智能体的自适应技能粒度:运行时路由与宏到微的恢复
Adaptive Skill Granularity for Coding Agents: Runtime Routing and Macro-to-Micro Recovery
AI总结:
该研究提出Adaptive Skill Granularity框架,通过运行时路由与宏到微的恢复解决编码智能体的技能粒度控制问题,提升了执行鲁棒性与失败恢复能力。
摘要:
可复用技能允许大语言模型智能体将特定任务流程、工具功能和执行指导打包为模块化单元。现有研究大多关注智能体在执行前如何检索、组合或合成技能。然而在编码智能体中,执行会带来额外的运行时控制问题:同一任务可通过原始工具调用、宏技能,或从宏技能开始并回退到微观级恢复的混合执行来解决。我们提出自适应技能粒度(Adaptive Skill Granularity)框架,该框架将技能粒度视为基于任务结构、执行状态和宏技能失败的动作抽象策略。系统结合基于特征的粒度控制器和有限状态恢复执行器。我们使用确定性编码智能体协议评估该框架,采用验证器定义的成功、总成本,以及宏采用、失败恢复、路由匹配和转换正确性等流程指标。结果表明,固定宏执行在适用时高效,但在不匹配时脆弱;而运行时路由和显式宏到微的恢复可提升鲁棒性,并恢复固定粒度执行未解决的可控宏失败。我们的发现表明,编码智能体的技能库不仅应被视为可检索资源,还应作为可控、可验证和可恢复的执行抽象。
英文摘要:
Reusable skills allow large language model agents to package task-specific procedures, tool affordances, and execution guidance into modular units. Prior work has largely studied how agents retrieve, compose, or synthesize skills before execution. In coding agents, however, execution poses an additional runtime control problem: the same task may be solved through primitive tool calls, macro skills, or hybrid execution that starts with a macro and falls back to micro-level recovery. We introduce Adaptive Skill Granularity, a framework that treats skill granularity as an action-abstraction policy conditioned on task structure, execution state, and macro-skill failures. The system combines a feature-based granularity controller and a finite-state recovery executor. We evaluate the framework with a deterministic coding-agent protocol using verifier-defined success, total cost, and process metrics such as macro adoption, failure recovery, route match, and transition correctness. Results show that fixed macro execution is efficient when applicable but brittle under mismatch, while runtime routing and explicit macro-to-micro recovery improve robustness and recover controlled macro failures that fixed-granularity execution leaves unresolved. Our findings suggest that skill libraries for coding agents should be treated not only as retrievable resources, but also as controllable, verifiable, and recoverable execution abstractions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。