[论文解读] ToolNet: Connecting Large Language Models with Massive Tools via Tool Graph
ToolNet 提出了一种即插即用的框架,将数千种工具组织成带权转移的有向图,使大型语言模型(LLMs)能够以逐步方式高效地导航和选择工具。通过根据工具性能动态更新转移权重,ToolNet 提升了推理效率和鲁棒性,在多跳工具学习基准测试中,相比少样本提示基线方法,实现了高达 2.6 倍的令牌效率提升和更优性能。
While achieving remarkable progress in a broad range of tasks, large language models (LLMs) remain significantly limited in properly using massive external tools. Existing in-context learning approaches simply format tools into a list of plain text descriptions and input them to LLMs, from which, LLMs generate a sequence of tool calls to solve problems step by step. Such a paradigm ignores the intrinsic dependency between tools and offloads all reasoning loads to LLMs, making them restricted to a limited number of specifically designed tools. It thus remains challenging for LLMs to operate on a library of massive tools, casting a great limitation when confronted with real-world scenarios. This paper proposes ToolNet, a plug-and-play framework that scales up the number of tools to thousands with a moderate increase in token consumption. ToolNet organizes tools into a directed graph. Each node represents a tool, and weighted edges denote tool transition. Starting from an initial tool node, an LLM navigates in the graph by iteratively choosing the next one from its successors until the task is resolved. Extensive experiments show that ToolNet can achieve impressive results in challenging multi-hop tool learning datasets and is resilient to tool failures.
研究动机与目标
- 解决现有少样本提示方法在面对大规模工具库时因高令牌消耗和工具选择能力差而导致的可扩展性局限。
- 通过有向图结构建模工具依赖关系,使 LLM 能够高效地在数千种工具中导航和推理。
- 通过在工具图中引入基于反馈的自适应转移权重,提升工具选择的准确性和对低质量工具的鲁棒性。
- 在减少对昂贵微调依赖的同时,保持在多样化、动态演化的工具仓库中的强泛化能力。
- 通过轻量级、即插即用的机制,实现新工具的快速集成和对更新工具的适应,无需重新训练。
提出的方法
- ToolNet 构建一个有向工具图,其中每个节点代表一个工具,加权边表示基于观察到的使用模式的潜在工具间转移。
- 该框架使用少样本提示引导 LLM 从当前节点的出边中选择后续工具,通过避免完整工具列表提示来减少令牌消耗。
- 评估模块会探测每个工具调用,评估其有效性,并更新图中的转移权重,以优先选择高性能工具并抑制低质量工具。
- 转移权重以结构化格式(如整数或缩放值)编码,以提高 LLM 对性能差异的敏感度,×10 缩放时观察到最佳性能。
- 系统支持动态适应:当新增工具或更新现有工具时,图可无需重新训练 LLM 即可逐步修改。
- 该方法在 APIBank 和 ToolBench 上进行了评估,表现出对工具故障的鲁棒性,并可扩展至数千种工具。
实验结果
研究问题
- RQ1LLM 如何在不产生高昂令牌成本的前提下,高效地从大规模工具库中导航和选择工具?
- RQ2能否将工具转移模式建模为稀疏有向图,以提升推理效率和可扩展性?
- RQ3LLM 如何根据工具性能反馈调整其工具选择策略?
- RQ4不同权重表示格式(如整数与小数)对 LLM 性能和令牌效率有何影响?
- RQ5即插即用框架能否在无需重新训练的情况下,动态集成新工具并适应演化的工具仓库?
主要发现
- 在多跳工具学习基准测试中,ToolNet 相比标准少样本提示基线方法,令牌效率最高提升 2.6 倍。
- 在转移权重缩放 ×10 时性能趋于饱和,表明在此水平下对性能差异的敏感度达到最优。
- 将权重移除或降为小数格式会显著降低性能,凸显了正确权重格式对 LLM 推理的重要性。
- 该框架对工具故障表现出鲁棒性,通过基于反馈的权重更新可抑制低质量工具,从而提升性能。
- 随着转移权重的提升,令牌消耗减少,表明这可能是工具学习系统的一种潜在优化路径。
- 该方法在复杂多任务数据集 ToolBench 上保持了强劲性能,相比现有提示方法和微调方法,在可扩展性和适应性方面表现更优。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。