SkillTrace: Traversing a Query-Skill Graph for Composable LLM Agents

Yue Yao, Shengyuan Wang, Xin Chen, Minke Zhang, Jia He, Bingjun Luo, Tom GedeonarXiv 2026

TL;DR

When large language model (LLM) agents tackle complex tasks, they must combine multiple reusable skills from a library. Traditional retrieval methods treat these skills independently, often missing critical prerequisites and execution dependencies. SkillTrace solves this by modeling skill retrieval as a structured search over a three-level Query-Skill Graph, significantly improving task success rates across diverse technical and embodied domains.

What Problem Does This Paper Address?

Standard retrieval-augmented generation (RAG) and tool-selection methods typically score candidate skills or APIs independently, returning a simple top-$k$ ranked list. However, complex tasks usually require a composition of skills that must be executed in a specific order.

For example, if a user asks an agent to "create a PPT from a research paper," a standard vector search might only retrieve a "Slide Generation" skill. It completely misses the necessary prerequisites like "Paper Analysis" and "Content Planning," or downstream steps like "Quality Verification."

Figure 1: Motivation. We argue that independent skill re- trieval may overlook skill dependencies, while SkillTrace connects atomic queries and skills through a query–skill graph, enabling dependency-aware traversal to retrieve a composable skill set.

To build truly composable LLM agents, retrieval mechanisms must address three core challenges:

  1. Decomposing a complex user query into atomic sub-queries while preserving their relationships.
  2. Matching these sub-queries to functionally compatible skills in a library.
  3. Capturing the implicit dependencies between skills (e.g., inputs and outputs) even when they aren't explicitly mentioned in the user prompt.

Methods

The authors introduce SkillTrace, a framework that unifies query decomposition, skill matching, and dependency propagation into a single Query-Skill Graph ($G_{x,S}$). The process operates in three sequential stages:

  1. Hierarchical Query Tree ($T_x$): An LLM decomposes the complex user query into a hierarchical semantic tree. The internal nodes represent high-level actions, while the leaf nodes represent self-contained, atomic skill queries specifying distinct input/output transformations.
  2. Query-Skill Bipartite Graph ($B_{x,S}$): SkillTrace computes semantic similarity scores between the atomic queries and the skill library. It then applies the Hungarian algorithm (maximum-weight bipartite matching) to enforce a strict one-to-one constraint. This ensures each atomic requirement is mapped to exactly one distinct "primary skill," preventing redundant selections.
  3. Skill Dependency Subgraph ($D_S$): The skill library is structured as a directed graph where edges represent input/output schema overlaps between skills. Using the primary skills as seeds, SkillTrace runs a Reverse Personalized PageRank (ReversePPR) algorithm to traverse the graph backward, pulling in the necessary prerequisite and supporting skills required for successful execution.
Overview of the SkillTrace framework

Datasets

The framework was evaluated on two distinct public benchmarks:

  • SkillsBench: A benchmark containing technical, expertise-intensive tasks across eight domains (e.g., Software Engineering, Cybersecurity, Finance). Tasks are categorized into Core, Extended, and Extreme subsets based on complexity.
  • ALFWorld: A text-based embodied environment requiring sequential planning and multi-step household interactions (e.g., object search, manipulation). Tasks are stratified into Easy, Medium, and Hard based on the number of atomic skills required.

Key Insights and Ideas

  • Dependencies Matter Most: Ablation studies revealed that removing the Skill Dependency Subgraph (SDS) caused the largest performance drop (-12.95 percentage points). This highlights that an agent cannot succeed on semantic relevance alone; it absolutely needs its prerequisite tools.
  • One-to-One Matching Prevents Redundancy: Using global bipartite matching instead of independent top-$k$ selection prevents multiple sub-queries from clustering around the same popular skill, ensuring broader coverage of the task's actual requirements.
  • Efficiency without Exhaustive Search: By constructing the skill dependency graph offline and using localized PageRank propagation online, SkillTrace maintains an execution complexity that scales approximately linearly with the size of the skill library, avoiding exponential combinatorial explosions.

Key Results

SkillTrace achieved state-of-the-art performance across both evaluated benchmarks:

  • SkillsBench: Reached an overall success rate of 53.17%, outperforming the strongest graph-based baseline (GoS) by 6.68% and standard vector retrieval by 11.05%.
  • ALFWorld: Achieved a 91.43% success rate, outperforming all flat and graph-based baselines.
Figure 3: Success rate comparison between GoS and Skill- Trace across five backbone language models on SkillsBench.

The authors also demonstrated strong cross-model generalization. When testing SkillTrace across five different backbone LLMs (including GPT-5.6, DeepSeek-v3.2, Kimi-K2.5, Qwen3.5, and Gemini 3.1), SkillTrace consistently outperformed alternative retrieval methods regardless of the underlying model's baseline capability.

Limitations and Future Work

While SkillTrace provides a highly effective retrieval mechanism, the absolute success rate still heavily depends on the backbone LLM's capacity to accurately understand and execute the retrieved skills. For instance, while GPT-5.6 achieved 53.17% on SkillsBench, smaller or open-source models hovered between 15% and 26%, indicating that retrieval is only half the battle.

Additionally, the current dependency graph construction relies primarily on static input/output schema matching. Future work could explore learning more dynamic, data-driven skill relationships directly from agent execution traces.

Summary updated

BibTeX
@misc{yao2026skilltrace,
  author = {Yue Yao and Shengyuan Wang and Xin Chen and Minke Zhang and Jia He and Bingjun Luo and Tom Gedeon},
  title = {{SkillTrace: Traversing a Query-Skill Graph for Composable LLM Agents}},
  year = {2026},
  eprint = {2608.02356},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.02356},
}
Figure