arXiv:2507.00487cs.IRcs.CL2025-07被引 2

提升大模型工具检索精度,通过多任务联合学习精准理解用户意图。

MassTool: A Multi-Task Search-Based Tool Retrieval Framework for Large Language Models

  • 采用双塔架构,分别处理工具调用判断与查询-工具匹配。
  • 在多个数据集上实现超过90%的召回率,优于现有方法。
  • 适合需要高精度工具调用的智能助手和自动化系统开发。

工具检索是大语言模型(LLMs)有效调用外部工具的关键环节,旨在将海量工具精炼为少量候选集。然而,现有方法多聚焦于优化工具表示,忽视了查询理解的重要性。为此,我们提出MassTool,一种基于多任务搜索的工具检索框架,以同时提升查询表征与检索精度。该框架采用双塔结构:工具使用检测塔用于预测函数调用需求,工具检索塔则利用查询中心图卷积网络(QC-GCN)实现高效查询-工具匹配。此外,引入基于搜索的用户意图建模(SUIM)以应对多样且分布外的查询,并设计自适应知识迁移模块(AdaKT)实现高效的多任务学习。通过联合优化工具使用检测损失、列表级检索损失及对比正则化损失,构建出鲁棒的两步序列决策流程,显著提升查询理解精度。大量实验表明,该方法在多个基准数据集上均取得领先性能。代码已开源:https://github.com/wxydada/MassTool。

原文摘要 · Abstract (English)

Tool retrieval is a critical component in enabling large language models (LLMs) to interact effectively with external tools. It aims to precisely filter the massive tools into a small set of candidates for the downstream tool-augmented LLMs. However, most existing approaches primarily focus on optimizing tool representations, often neglecting the importance of precise query comprehension. To address this gap, we introduce MassTool, a multi-task search-based framework designed to enhance both query representation and tool retrieval accuracy. MassTool employs a two-tower architecture: a tool usage detection tower that predicts the need for function calls, and a tool retrieval tower that leverages a query-centric graph convolution network (QC-GCN) for effective query-tool matching. It also incorporates search-based user intent modeling (SUIM) to handle diverse and out-of-distribution queries, alongside an adaptive knowledge transfer (AdaKT) module for efficient multi-task learning. By jointly optimizing tool usage detection loss, list-wise retrieval loss, and contrastive regularization loss, MassTool establishes a robust dual-step sequential decision-making pipeline for precise query understanding. Extensive experiments demonstrate its effectiveness in improving retrieval accuracy. Our code is available at https://github.com/wxydada/MassTool.

工具检索多任务学习大模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。