Tool learning aims to enhance and expand large language models' (LLMs) capabilities with external tools, which has gained significant attention recently. Current methods have shown that LLMs can effectively handle a certain amount of tools through in-context learning or fine-tuning. However, in real-world scenarios, the number of tools is typically extensive and irregularly updated, emphasizing the necessity for a dedicated tool retrieval component. Tool retrieval is nontrivial due to the following challenges: 1) complex user instructions and tool descriptions; 2) misalignment between tool retrieval and tool usage models. To address the above issues, we propose to enhance tool retrieval with iterative feedback from the large language model. Specifically, we prompt the tool usage model, i.e., the LLM, to provide feedback for the tool retriever model in multi-round, which could progressively improve the tool retriever's understanding of instructions and tools and reduce the gap between the two standalone components. We build a unified and comprehensive benchmark to evaluate tool retrieval models. The extensive experiments indicate that our proposed approach achieves advanced performance in both in-domain evaluation and out-of-domain evaluation.
翻译:工具学习旨在通过外部工具增强和扩展大语言模型(LLMs)的能力,近年来受到广泛关注。现有研究表明,通过上下文学习或微调,大语言模型能够有效处理一定数量的工具。然而,在实际应用场景中,工具数量通常庞大且更新频繁,这凸显了构建专用工具检索模块的必要性。工具检索面临以下关键挑战:1)复杂的用户指令与工具描述;2)工具检索模型与工具使用模型之间的不匹配。为解决上述问题,我们提出利用大语言模型的迭代反馈来增强工具检索。具体而言,我们引导工具使用模型(即大语言模型)在多轮交互中为工具检索器提供反馈,从而逐步提升检索器对指令和工具的理解能力,并缩小两个独立模块之间的鸿沟。我们构建了统一且全面的基准测试来评估工具检索模型。大量实验表明,所提出的方法在领域内评估与跨领域评估中均取得了先进的性能。