Compositional Skill Routing for LLM Agents: Decompose, Retrieve, and Compose
Summary
SkillWeaver, a novel framework, addresses the Compositional Skill Routing problem for LLM agents, which involves decomposing complex user queries into atomic sub-tasks, retrieving appropriate skills, and composing an executable plan from a large skill library. The framework combines an LLM task decomposer, a bi-encoder skill retriever utilizing FAISS indexing, and a dependency-aware DAG planner. To facilitate evaluation, the CompSkillBench benchmark was introduced, comprising 300 compositional queries over 2,209 real MCP server skills across 24 functional categories. Experiments revealed that task decomposition quality is the primary bottleneck, achieving only 34.2% category recall at the step level. To mitigate this, Iterative Skill-Aware Decomposition (SAD) was proposed, improving decomposition accuracy from 51.0% to 67.7% (+32.7%, Wilcoxon p < 10^-6) in a single iteration. SkillWeaver also reduces context window consumption by over 99% and demonstrates generalization with a +35.6% relative DA gain.
Key takeaway
For AI Engineers developing LLM agents for complex, multi-step tasks, prioritizing robust task decomposition is critical. Your agent's ability to accurately break down queries into atomic sub-tasks directly impacts skill retrieval and overall plan execution. Implement iterative, skill-aware decomposition techniques to align task breakdown with available tools, significantly improving accuracy and reducing context window consumption by over 99%. This approach is essential for building efficient and generalizable LLM agents.
Key insights
Compositional skill routing for LLM agents requires decomposition, retrieval, and plan composition.
Principles
- Task decomposition quality is the primary bottleneck for LLM agent performance.
- Aligning decomposition with available skills improves accuracy.
- Correct granularity is a prerequisite for effective skill retrieval.
Method
SkillWeaver uses an LLM task decomposer, a bi-encoder skill retriever with FAISS, and a dependency-aware DAG planner to handle complex queries.
In practice
- Implement iterative skill-aware decomposition for better task alignment.
- Utilize bi-encoder skill retrieval with FAISS for large skill libraries.
- Employ DAG planning for dependency-aware skill composition.
Topics
- LLM Agents
- Skill Routing
- Task Decomposition
- Skill Retrieval
- CompSkillBench
- FAISS Indexing
Best for: Research Scientist, AI Architect, NLP Engineer, AI Scientist, Machine Learning Engineer, AI Engineer
Related on AIssential
Editorial summary, takeaway, and curation by AIssential. Original article published by Computation and Language.