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).
翻译:近期工具增强型智能体(大语言模型)的进展已能支持安全数据库交互与多智能体代码开发等复杂任务。然而,在智能体推理能力或模型限制之外扩展工具容量仍是挑战。本文通过引入Toolshed知识库应对这些挑战——该工具知识库(向量数据库)专为存储增强型工具表示并优化大规模工具增强型智能体的工具选择而设计。此外,我们提出高级RAG-工具融合技术,这是一种在预检索、检索中与后检索阶段集成工具应用型高级检索增强生成技术的新型组合方法,无需模型微调。预检索阶段通过关键信息增强工具文档并存储至Toolshed知识库;检索中阶段聚焦查询规划与转换以提升检索精度;后检索阶段则对检索所得工具文档进行精炼并实现自我反思。进一步地,通过同时调节智能体可访问工具总数(tool-M)与工具选择阈值(top-k),我们在检索精度、智能体性能与令牌成本之间实现动态权衡。该方法在ToolE单工具、ToolE多工具及Seal-Tools基准数据集上分别取得46%、56%与47%的绝对性能提升(Recall@5指标)。