arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.29561cs.AIcs.SE
收藏

ParaTool: 将工具表示从上下文转移到参数中

ParaTool: Shifting Tool Representations from Context to Parameters

Beijing University of Posts and Telecommunications(北京邮电大学)

Zekai Yu, Qi Meng, Qizhi Chu, Yu Hao, Chuan Shi, Cheng Yang

AI总结:

提出ParaTool框架,通过将每个工具投影为可加载的参数集,结合参数化工具预训练、软工具选择和参数化工具微调三个阶段,使大语言模型无需上下文文档即可进行工具调用,在Stable ToolBench和BFCL上显著优于基于ICL的基线方法。

摘要:

工具调用通过使大语言模型(LLM)能够与外部可执行接口进行基于环境的交互,从而扩展了其能力。然而,主流的上下文学习(ICL)方法通常将详细的工具文档和使用示例直接纳入上下文中,这导致随着上下文长度的增长,推理开销显著增加,并且幻觉风险升高。相反,基于微调的方法虽然提高了通用工具调用能力,但往往无法有效内化先前见过的工具的特定细节,从而仍然依赖于上下文文档。为了解决这些限制,我们提出了ParaTool,一个将每个工具投影到专用的、可加载的参数集中的框架。通过配备这些参数化工具的动态集成,LLM可以在不依赖上下文文档或示例的情况下执行工具调用。具体来说,我们的方法包括三个阶段:(1)参数化工具预训练将不同工具的知识封装到独立的参数模块中;(2)软工具选择使用门控网络动态加权和聚合相关工具参数;(3)参数化工具微调联合更新工具参数以对齐训练和推理过程。在Stable ToolBench和BFCL上的实验表明,ParaTool显著优于基于ICL的强基线方法,在降低计算复杂度的同时实现了优越的性能。

英文摘要:

Tool calling extends large language models (LLMs) by enabling grounded interaction with external executable interfaces, thereby supporting environment-coupled problem solving. However, mainstream in-context learning (ICL) approaches typically incorporate detailed tool documentation and usage examples directly into the context. This results in substantial inference overhead and heightened risks of hallucination as the context length grows. Conversely, while tuning-based methods improve general tool-calling capabilities, they often fail to effectively internalize the specific details of previously seen tools, thereby retaining a dependency on in-context documentation. To address these limitations, we propose ParaTool, a framework that projects each tool into a dedicated, loadable set of parameters. By equipping a dynamic integration of these parameterized tools, the LLM can perform tool calling without relying on in-context documents or examples. Specifically, our approach consists of three stages: (1) parametric tool pre-training encapsulates the knowledge of different tools into independent parameter modules; (2) soft tool selection employs a gating network to dynamically weigh and aggregate relevant tool parameters; and (3) parametric tool fine-tuning jointly updates tool parameters to align the training and inference processes. Experiments on Stable ToolBench and BFCL demonstrate that ParaTool significantly outperforms strong ICL-based baselines, achieving superior performance while reducing computational complexity.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑