Recently, the integration of external tools with Large Language Models (LLMs) has emerged as a promising approach to overcome the inherent constraints of their pre-training data. However, realworld applications often involve a diverse range of tools, making it infeasible to incorporate all tools directly into LLMs due to constraints on input length and response time. Therefore, to fully exploit the potential of tool-augmented LLMs, it is crucial to develop an effective tool retrieval system. Existing tool retrieval methods techniques mainly rely on semantic matching between user queries and tool descriptions, which often results in the selection of redundant tools. As a result, these methods fail to provide a complete set of diverse tools necessary for addressing the multifaceted problems encountered by LLMs. In this paper, we propose a novel modelagnostic COllaborative Learning-based Tool Retrieval approach, COLT, which captures not only the semantic similarities between user queries and tool descriptions but also takes into account the collaborative information of tools. Specifically, we first fine-tune the PLM-based retrieval models to capture the semantic relationships between queries and tools in the semantic learning stage. Subsequently, we construct three bipartite graphs among queries, scenes, and tools and introduce a dual-view graph collaborative learning framework to capture the intricate collaborative relationships among tools during the collaborative learning stage. Extensive experiments on both the open benchmark and the newly introduced ToolLens dataset show that COLT achieves superior performance. Notably, the performance of BERT-mini (11M) with our proposed model framework outperforms BERT-large (340M), which has 30 times more parameters. Additionally, we plan to publicly release the ToolLens dataset to support further research in tool retrieval.
翻译:近年来,将外部工具与大语言模型(LLMs)相结合已成为克服其预训练数据固有局限性的有效途径。然而,现实应用通常涉及多样化的工具,由于输入长度和响应时间的限制,将所有工具直接整合到LLMs中并不可行。因此,为了充分发挥工具增强型LLMs的潜力,开发一个高效的工具检索系统至关重要。现有的工具检索方法主要依赖于用户查询与工具描述之间的语义匹配,这往往导致冗余工具的选择。因此,这些方法无法为LLMs所面临的多方面问题提供一套完整且多样化的必要工具集。本文提出了一种新颖的、与模型无关的基于协同学习的工具检索方法——COLT,它不仅捕捉用户查询与工具描述之间的语义相似性,还考虑了工具的协同信息。具体而言,我们首先在语义学习阶段微调基于预训练语言模型(PLM)的检索模型,以捕捉查询与工具之间的语义关系。随后,我们构建了查询、场景和工具之间的三个二分图,并在协同学习阶段引入了一个双视图图协同学习框架,以捕捉工具之间复杂的协同关系。在开放基准和新引入的ToolLens数据集上进行的大量实验表明,COLT取得了卓越的性能。值得注意的是,采用我们提出的模型框架的BERT-mini(11M参数)的性能超越了参数数量多30倍的BERT-large(340M参数)。此外,我们计划公开ToolLens数据集,以支持工具检索领域的进一步研究。