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

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Lin, Jianghao, Wang, Xinyuan, Dai, Xinyi, Zhu, Menghui, Chen, Bo, Tang, Ruiming, Yu, Yong, Zhang, Weinan
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908429849722880
author Lin, Jianghao
Wang, Xinyuan
Dai, Xinyi
Zhu, Menghui
Chen, Bo
Tang, Ruiming
Yu, Yong
Zhang, Weinan
author_facet Lin, Jianghao
Wang, Xinyuan
Dai, Xinyi
Zhu, Menghui
Chen, Bo
Tang, Ruiming
Yu, Yong
Zhang, Weinan
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2507_00487
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MassTool: A Multi-Task Search-Based Tool Retrieval Framework for Large Language Models
Lin, Jianghao
Wang, Xinyuan
Dai, Xinyi
Zhu, Menghui
Chen, Bo
Tang, Ruiming
Yu, Yong
Zhang, Weinan
Information Retrieval
Computation and Language
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.
title MassTool: A Multi-Task Search-Based Tool Retrieval Framework for Large Language Models
topic Information Retrieval
Computation and Language
url https://arxiv.org/abs/2507.00487