arXiv:2410.14594cs.CL2024-10被引 26

构建工具知识库与融合检索技术,显著提升大模型工具调用能力。

Toolshed: Scale Tool-Equipped Agents with Advanced RAG-Tool Fusion and Tool Knowledge Bases

  • 构建工具知识库并融合三阶段检索增强技术,无需微调模型。
  • 在多个基准上实现46%至56%的召回率提升,性能超越现有方法。
  • 适合需要大规模工具调用的复杂任务场景,如代码开发与数据库操作。

近期工具增强型智能体(LLMs)已能完成安全数据库交互和多智能体代码开发等复杂任务。然而,当工具数量超过模型推理或容量限制时,扩展能力仍面临挑战。本文提出工具知识库(Toolshed Knowledge Bases),一个用于存储增强工具表示的向量数据库,并优化大规模工具智能体的工具选择。同时,我们设计了先进的RAG-工具融合机制,涵盖预检索、检索中和后检索三个阶段,无需模型微调。预检索阶段将关键信息注入工具文档并存入知识库;检索中阶段通过查询规划与转换提升检索精度;后检索阶段对结果进行精炼并支持自我反思。通过调整工具总数(tool-M)与选择阈值(top-k),平衡了检索准确率、智能体表现与令牌开销。实验显示,在ToolE单工具、多工具及Seal-Tools基准上,召回率@5分别提升46%、56%和47%。

原文摘要 · Abstract (English)

Recent advancements in tool-equipped Agents (LLMs) have enabled complex tasks like secure database interactions and multi-agent code development. However, scaling tool capacity beyond agent reasoning or model limits remains a challenge. In this paper, we address these challenges by introducing Toolshed Knowledge Bases, a tool knowledge base (vector database) designed to store enhanced tool representations and optimize tool selection for large-scale tool-equipped Agents. Additionally, we propose Advanced RAG-Tool Fusion, a novel ensemble of tool-applied advanced retrieval-augmented generation (RAG) techniques across the pre-retrieval, intra-retrieval, and post-retrieval phases, without requiring model fine-tuning. During pre-retrieval, tool documents are enhanced with key information and stored in the Toolshed Knowledge Base. Intra-retrieval focuses on query planning and transformation to increase retrieval accuracy. Post-retrieval refines the retrieved tool documents and enables self-reflection. Furthermore, by varying both the total number of tools (tool-M) an Agent has access to and the tool selection threshold (top-k), we address trade-offs between retrieval accuracy, agent performance, and token cost. Our approach achieves 46%, 56%, and 47% absolute improvements on the ToolE single-tool, ToolE multi-tool and Seal-Tools benchmark datasets, respectively (Recall@5).

智能体工具调用RAG知识库

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