arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.03212cs.IR
收藏

数据高效的大规模工具检索:一种基于强化学习的大语言模型查询-工具对齐方法

Data-Efficient Massive Tool Retrieval: A Reinforcement Learning Approach for Query-Tool Alignment with Language Models

Yuxiang Zhang, Xin Fan, Junjie Wang, Chongxian Chen, Fan Mo, Tetsuya Sakai, Hayato Yamana

AI总结:

针对大语言模型工具检索受输入长度限制、低资源下性能不足的问题,提出查询-工具对齐框架,结合排序函数与DPO方法重写查询,在MTRB基准上实现显著性能提升且跨数据集泛化性强。

摘要:

大语言模型(LLM)结合外部工具与API的最新进展,通过上下文学习或微调已成功解决复杂任务。尽管取得了这些进展,由于严格的输入长度限制,大规模工具检索仍然极具挑战性。针对这一问题,我们提出一种从海量工具库中进行预检索的策略,将该问题正式定义为大规模工具检索(MTR)任务。我们构建了MTRB(大规模工具检索基准),用于评估工具数量庞大的真实工具增强LLM场景。该基准面向低资源场景设计,包含多样化的工具集合,且工具描述经过优化以保证一致性和清晰度。它由3个子集构成,每个子集包含90个测试样本和10个训练样本。为解决低资源MTR任务,我们提出了全新的查询-工具对齐(QTA)框架,该框架利用LLM,通过排序函数和直接偏好优化(DPO)方法重写用户查询,从而增强查询-工具对齐效果。在MTRB基准的top-5和top-10检索任务中,该方法的表现始终优于现有最先进模型,在衡量前k个检索结果中工具召回充分性的指标Sufficiency@k上,提升幅度最高可达93.28%。此外,消融实验验证了该框架的有效性,证明其即使在标注样本有限的情况下也能优化性能。具体而言,仅使用1个标注样本时,该框架的Sufficiency@k性能提升最高可达78.53%。同时,QTA展现出极强的跨数据集泛化能力,凸显了其在实际场景中的应用潜力。

英文摘要:

Recent advancements in large language models (LLMs) integrated with external tools and APIs have successfully addressed complex tasks by using in-context learning or fine-tuning. Despite this progress, the vast scale of tool retrieval remains challenging due to stringent input length constraints. In response, we propose a pre-retrieval strategy from an extensive repository, effectively framing the problem as the massive tool retrieval (MTR) task. We introduce the MTRB (massive tool retrieval benchmark) to evaluate real-world tool-augmented LLM scenarios with a large number of tools. This benchmark is designed for low-resource scenarios and includes a diverse collection of tools with descriptions refined for consistency and clarity. It consists of three subsets, each containing 90 test samples and 10 training samples. To handle the low-resource MTR task, we raise a new query-tool alignment (QTA) framework leverages LLMs to enhance query-tool alignment by rewriting user queries through ranking functions and the direct preference optimization (DPO) method. This approach consistently outperforms existing state-of-the-art models in top-5 and top-10 retrieval tasks across the MTRB benchmark, with improvements up to 93.28% based on the metric Sufficiency@k, which measures the adequacy of tool retrieval within the first k results. Furthermore, ablation studies validate the efficacy of our framework, highlighting its capacity to optimize performance even with limited annotated samples. Specifically, our framework achieves up to 78.53% performance improvement in Sufficiency@k with just a single annotated sample. Additionally, QTA exhibits strong cross-dataset generalizability, emphasizing its potential for real-world applications.

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

↑