arXiv:2605.11706cs.LG2026-05

让大模型用图结构内化工具依赖,避免规划错误累积。

GRAFT: Graph-Tokenized LLMs for Tool Planning

论文配图:GRAFT: Graph-Tokenized LLMs for Tool Planning
图 1 · 摘自论文原文
  • 将每个工具映射为特殊标记,把工具图嵌入模型表示空间。
  • 在复杂任务中实现92.3%的精确序列匹配和98.7%的依赖合法性。
  • 适合需要多步工具协作的自动化系统设计者使用。

大型语言模型(LLMs)正被用于通过跨多步骤选择和协调外部工具来完成复杂任务。这要求工具选择与子任务意图对齐,并满足工具间的定向执行依赖。现有方法将这些依赖建模为工具图,并通过检索、序列化或提示注入等方式将其与LLM结合。然而,这些外部图使用策略均采用匹配范式,常导致工具选择与底层子任务结构不一致,产生语义上合理但违反图约束的计划。这一问题因错误累积而加剧:早期工具选择错误会使计划进入无效图状态,导致后续预测偏离有效执行路径。为此,我们提出GRAFT,一种依赖感知的工具规划图-标记化语言模型框架。GRAFT通过将每个工具节点映射为专用特殊标记,并在表示空间中学习有向工具依赖关系,实现工具图的内化。此外,引入基于策略的工具上下文蒸馏,在模型自身采样轨迹上训练并蒸馏逐步规划信号。实验表明,GRAFT在精确序列匹配和依赖合法性方面达到当前最优性能,支持更可靠的复杂工作流中大模型工具规划。

原文摘要 · Abstract (English)

Large language models (LLMs) are increasingly used to complete complex tasks by selecting and coordinating external tools across multiple steps. This requires aligning tool choices with subtask intent while satisfying directional execution dependencies among tools. To do this, existing methods model these dependencies as tool graphs and incorporate the graphs with LLMs through retrieval, serialization, or prompt-level injection. However, these external graph-use strategies all follow a matching paradigm, which often fails to align tool choices with the underlying subtask structure, producing semantically plausible plans that violate graph constraints. This issue is further exacerbated by error accumulation, where an early incorrect tool selection shifts the plan into an invalid graph state and causes subsequent predictions to drift away from the valid execution path. To address these challenges, we propose GRAFT, a graph-tokenized language model framework for dependency-aware tool planning. GRAFT internalizes the tool graph by mapping each tool node to a dedicated special token and learning directed tool dependencies within the representation space. It further introduces on-policy tool context distillation, training the model on its own sampled trajectories while distilling stepwise planning signals. Experiments show that GRAFT achieves state-of-the-art performance in exact sequence matching and dependency legality, supporting more reliable LLM tool planning in complex workflows.

工具规划图神经网络大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。