让大模型智能拆解任务、找工具并组合成执行计划,提升复杂任务处理能力。
Compositional Skill Routing for LLM Agents: Decompose, Retrieve, and Compose
- 分步拆解任务,用检索匹配工具,再按依赖关系生成可执行流程图。
- 新方法使任务分解准确率从51%提升至67.7%,工具召回率提高7个百分点。
- 适用于需要多步工具协作的智能体系统,尤其适合工具库丰富的场景。
大型语言模型(LLM)智能体越来越依赖外部技能——可复用的工具规范。但真实任务常需组合多个技能,而非仅选择一个。本文将此问题形式化为组合技能路由:给定复杂用户查询和庞大的技能库,需将查询分解为原子子任务,为每个子任务检索合适技能,并组合成可执行计划。提出SkillWeaver框架,包含基于LLM的任务分解器、使用FAISS索引的双编码器技能检索器及依赖感知的有向无环图(DAG)规划器。为支持评估,构建CompSkillBench基准,涵盖300个组合查询,覆盖2,209个来自公共MCP生态的真实技能,涉及24个功能类别。实验表明,任务分解质量是主要瓶颈:标准LLM分解在步骤级仅达34.2%类别召回率。为此提出迭代式技能感知分解(SAD),通过检索增强的反馈循环,逐步对齐分解与可用技能。单轮迭代后,分解准确率从51.0%提升至67.7%(+32.7%,威尔科xon检验p < 10^-6);DA条件分析确认正确粒度是有效检索前提(当DA=1时,类别召回率@1从34%升至41%)。SkillWeaver减少超过99%的上下文窗口消耗,迁移实验验证其泛化能力(目标类别不在检索池中时仍获35.6%相对提升)。
原文摘要 · Abstract (English)
LLM agents increasingly rely on external skills -- reusable tool specifications -- but real-world tasks often require composing multiple skills, not just selecting one. We formalize this as the Compositional Skill Routing problem: given a complex user query and a large skill library, decompose the query into atomic sub-tasks, retrieve the appropriate skill for each sub-task, and compose an executable plan. We present SkillWeaver, a decompose-retrieve-compose framework combining an LLM task decomposer, a bi-encoder skill retriever with FAISS indexing, and a dependency-aware DAG planner. To support evaluation, we introduce CompSkillBench, a benchmark of 300 compositional queries over 2,209 real MCP server skills spanning 24 functional categories, sourced from the public MCP ecosystem. Our experiments reveal that task decomposition quality is the primary bottleneck: standard LLM decomposition reaches only 34.2% category recall at the step level. To address this, we propose Iterative Skill-Aware Decomposition (SAD), a retrieval-augmented feedback loop that iteratively aligns decomposition with available skills. SAD improves decomposition accuracy from 51.0% to 67.7% (+32.7%, Wilcoxon p < 10^-6) in a single iteration; DA-conditioned analysis confirms that correct granularity is the prerequisite for effective retrieval (CatR@1 rises from 34% to 41% when DA=1). SkillWeaver reduces context window consumption by over 99%, and transfer experiments confirm generalization (+35.6% relative DA gain even when target categories are absent from the retrieval pool).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。