arXiv:2410.03212cs.IR2024-10被引 5

用强化学习提升大模型在海量工具中精准匹配查询的能力。

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

  • 通过重写查询并优化对齐,提升低资源下的工具检索精度。
  • 在三个子集上,顶10检索准确率最高提升93.28%。
  • 仅需一个标注样本即可实现78.53%性能提升,适合真实场景应用。

大型语言模型(LLMs)结合外部工具与API已成功应对复杂任务,但受限于输入长度,海量工具检索仍具挑战。为此,我们提出一种预检索策略,将问题建模为大规模工具检索(MTR)任务,并构建了MTRB基准测试,用于评估真实世界工具增强型LLM场景下的表现。该基准专为低资源设计,包含三组数据集,每组含90个测试样本和10个训练样本,工具描述经过统一优化以确保一致性和清晰性。针对低资源下的MTR任务,我们提出查询-工具对齐(QTA)框架,利用语言模型通过排序函数与直接偏好优化(DPO)方法改写用户查询,以增强查询与工具的匹配度。该方法在MTRB基准上的顶5和顶10检索任务中持续优于现有最先进模型,基于‘Sufficiency@k’指标,最高提升达93.28%。消融实验验证了框架有效性,即使仅有单个标注样本,也能实现78.53%的性能提升。此外,QTA展现出强跨数据集泛化能力,具备实际部署潜力。

原文摘要 · Abstract (English)

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.

工具检索强化学习低资源

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