TL;DR
LLM agents often struggle with "long-horizon" tasks that require chaining multiple tools together in a specific order. This paper introduces ToolGraph, a pre-compiled dependency map of a tool catalog that acts as a multi-step $Q$-function, guiding agents by estimating the downstream utility of an action rather than just its immediate relevance.
What Problem Does This Paper Address?
While modern LLMs are decent at calling a single tool, they frequently fail at tool chaining—discovering how the output of one tool (like an order_id) serves as the required input for another (like track_shipment).
Standard documentation is often too sparse for models to infer these dependencies reliably; studies show models only identify these relations with 42–70% accuracy from descriptions alone. Existing solutions usually treat this as a retrieval problem (finding the right tool) or a one-step prediction. This paper tackles the challenge of test-time scaling: how can we use external structural knowledge to help an agent "see" several steps ahead to reach a goal?
Methods
The authors propose a pipeline to move from a static catalog to a goal-conditioned agent:
- ToolGraph Construction: They build a directed, weighted graph where nodes are tools and edges represent dependencies. Edges are proposed via parameter matching (type checking) and interventional probes (using an LLM to "experiment" by running tool sequences to see if one actually enables another).
- Multi-Step Value Estimation: Instead of just ranking tools by similarity, they derive a $Q$-value—$Q(s, a, g)$—representing the expected utility of action $a$ given state $s$ and goal $g$. They test three estimators:
- $Q_{dp}$: An analytic solver using dynamic programming over a simplified "entity-set" version of the state.
- $Q_{emb}$: A GraphSAGE neural network distilled from $Q_{dp}$ for faster, inductive inference.
- $Q_{llm}$: A "state-aware" LLM scorer that receives the graph evidence and the $Q_{dp}$ value as a prior, then reconciles it with the actual conversation history.
- Natural Language Feedback: Rather than forcing the agent to follow a mathematical argmax, a "verbalizer" translates the top-scored actions and their graph-based rationales into natural language hints for the agent.
Datasets
The researchers evaluated their approach across two major tool-use benchmarks using three different model backbones (Ministral 3 8B, Gemma 4 31B, and DeepSeek V3.2 685B):
- ToolComp: A benchmark focused on multi-tool reasoning and process supervision.
- $\tau^2$-Bench: A challenging benchmark for conversational agents in complex domains like retail, airlines, and telecommunications.
Key Insights and Ideas
- The "Argument Blindness" Ceiling: Purely structural estimators (like $Q_{dp}$) have a hard limit. They can tell you that
Tool Bneeds anorder_idfromTool A, but they can't tell if the agent is currently using the correctorder_idfrom the conversation. - Composition vs. Relevance: Simply knowing a tool is "relevant" to a query (like PageRank) is often safer than a multi-step plan if that plan is based on a flawed understanding of the current state.
- State-Awareness is Non-Negotiable: Multi-step value composition only pays off when the estimator can read the concrete state. The $Q_{llm}$ approach succeeded because it combined the "global" map of the ToolGraph with the "local" context of the specific user request.
- One-Time Cost: Graph construction is a significant upfront investment (millions of tokens for large catalogs), but it is a one-time cost that can be amortized over thousands of user requests.
Key Results
- Consistent Gains: The $Q_{llm}$ estimator outperformed personalized PageRank (a strong retrieval baseline) in every single benchmark-backbone combination, providing an average boost of 8.3 points.
- Beating Reflection: ToolGraph-guided agents outperformed "Reflexion" (a popular self-correction baseline) by 6.7 points on average, suggesting that external structural guidance is more effective than internal self-reasoning for complex tool use.
- Efficiency Knobs: The authors identified a "knee" in the evidence budget—providing the agent with a subgraph radius of $h=1$ and specific node annotations (N1) provided the best balance of success versus token cost.
Limitations and Future Work
- Delete-Free Assumption: The current $Q$-estimators use a "delete-free relaxation," meaning they assume resources (like money or inventory) aren't consumed by actions. This makes the math easier but fails in "resource-depletion" scenarios.
- Static Probing: The interventional probes are currently conducted against a static catalog. Probing stateful or irreversible APIs (like those that actually charge a credit card) remains a challenge.
- Future Direction: The authors suggest that the next major leap will come from lifting the "entity-set" abstraction to a full "argument-level" state representation, allowing the graph to reason about specific data values rather than just data types.
Summary updated