GRAFT:基于图-令牌的大型语言模型用于工具规划
GRAFT: Graph-Tokenized LLMs for Tool Planning
AI总结:
GRAFT通过内部化工具图和在线策略工具上下文蒸馏,提升工具规划的依赖意识和准确性,实现更可靠的复杂工作流中的LLM工具规划。
摘要:
大型语言模型(LLMs)越来越多地被用于通过选择和协调多个步骤中的外部工具来完成复杂任务。这需要将工具选择与子任务意图对齐,同时满足工具间的方向执行依赖。现有方法将这些依赖建模为工具图,并通过检索、序列化或提示级注入将图与LLMs结合。然而,这些外部图使用策略都遵循匹配范式,往往无法将工具选择与底层子任务结构对齐,产生语义上合理的计划但违反图约束。此问题进一步加剧于误差积累,早期错误的工具选择会使计划进入无效图状态,导致后续预测偏离有效执行路径。为解决这些问题,我们提出了GRAFT,一种用于依赖意识工具规划的图-令牌语言模型框架。GRAFT通过将每个工具节点映射到专用特殊令牌并学习表示空间内的方向工具依赖性来内部化工具图。它进一步引入了在线策略工具上下文蒸馏,通过训练模型在自身采样的轨迹上进行蒸馏,以蒸馏逐步规划信号。实验表明,GRAFT在精确序列匹配和依赖合法性方面实现了最先进的性能,支持在复杂工作流中更可靠的LLM工具规划。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。