计划还是抢先?工具发现架构的尺度研究
作者:张明非,阿米特·苏拉纳,齐亚乌丁·马吉德,陈希旺,迈克尔·许
2026年10月出版的内容类型论文
工具化的LLM agents在计划执行前从大型登记册中发现相关的API,然而有限的上下文windows禁止将所有工具定义注入一个单一的提示。 我们称之为Retrieve-when-Plan(RtP)的主导方法嵌入了用户查询,并通过近似近邻搜索检索类似的工具。 我们研究了另一种Plan-when-Retrieve(PtR)范式,其中LLM首先生成抽象工具Stubs(描述所需能力的假函数签名),然后作为针对登记册的检索查询。 在Tool Bench(46,984个独特的API端点,50个类别)上评价跨单工具(G1),类内多工具(G2)和跨类多工具(G3)查询子集,我们发现一个清晰的依赖复杂性的交叉:RtP在单工具查询上超越PtR,而PtR在多工具查询上超越RtP. 这种交叉在每一个检索预算(k=1至20)中都存在,在1k至47k的API的登记规模之间是强有力的,在模范家庭之间是一致的(Gemini 2.5 Flash和gpt-oss-120b)。 我们描述一种吸气失败模式(LLM发明了合理但不存在的API名称),它起到一种作用。 s 双刃剑:在简单的查询上,PtR的根节抽取了RtP直接匹配的正名信号,然而在复杂查询上,同一机制将多面意图分解为功能的子需要。 我们进一步分析象征性的间接费用,并显示PtR的额外发现大约称为翻倍推论成本,这在多工具的查询上有所回报
ProTIP:渐进工具检索改进规划
2023年12月20日研究区知识库与搜索,研究区语音与自然语言处理
大语言模型(LLMs)越来越多地用于复杂的多步骤规划任务,其中工具检索(TR)步骤对于取得成功结果至关重要。 TR的两种普遍方法是单步检索,利用完整的查询,以及使用任务分解(TD)进行顺序检索,将完整的查询分解为独立的原子子任务。 虽然单步检索缺乏处理的灵活性。..
检索增强生成的背景
2023年12月18日研究区知识库与搜索,研究区演讲与自然语言处理工作室 EACL
这份文件在EACL 2024的UncertaiNLP研讨会上被接受。
大型语言模型(LLMs)具有显著的能力,仅以几个例子解决新任务,但它们需要访问合适的工具。 检索增强生成(RAG)通过检索特定任务的相关工具列表来解决这个问题。 然而,RAG的工具检索步骤要求在查询中明确显示所有所需的信息。 这是。..
本文由 AI宝盒自动抓取并翻译,版权归原作者所有;如需查看原文请点下方链接。
Plan or Retrieve First? A Scale Study of Tool Discovery Architectures
AuthorsMingfei Zhang, Amit Surana, Ziauddin Majid, Chenxi Wang, Michael Xu
content type paperpublished October 2026
Tool-augmented LLM agents discover relevant APIs from large registries before planning execution, yet finite context windows prohibit injecting all tool definitions into a single prompt. The dominant approach, which we term Retrieve-then-Plan (RtP), embeds the user query and retrieves similar tools via approximate nearest-neighbor search. We study an alternative Plan-then-Retrieve (PtR) paradigm in which the LLM first generates Abstract Tool Stubs (hypothesized function signatures describing needed capabilities) which then serve as retrieval queries against the registry. Evaluating on ToolBench (46,984 unique API endpoints, 50 categories) across single-tool (G1), intra-category multi-tool (G2), and cross-category multi-tool (G3) query subsets, we find a clear complexity-dependent crossover: RtP outperforms PtR on single-tool queries while PtR outperforms RtP on multi-tool queries. This crossover holds at every retrieval budget (k=1 to 20), is robust across registry sizes from 1k to 47k APIs, and is consistent across model families (Gemini 2.5 Flash and gpt-oss-120b). We characterize a stub-hallucination failure mode (the LLM invents plausible but non-existent API names) that acts as a double-edged sword: on simple queries PtR’s stubs abstract away proper-noun signals that RtP matches directly, yet on complex queries the same mechanism decomposes multi-faceted intent into functional sub-needs. We further analyze token overhead and show that PtR’s extra discovery call roughly doubles inference cost, which pays off on multi-tool queries but hurts on single-tool ones, motivating complexity-adaptive routing as a practical direction—one that can be driven by a zero-cost signal already present in the pipeline (RtP’s top-1 retrieval score).
ProTIP: Progressive Tool Retrieval Improves Planning
December 20, 2023research area Knowledge Bases and Search, research area Speech and Natural Language Processing
Large Language Models (LLMs) are increasingly employed for complex multi-step planning tasks, where the Tool Retrieval (TR) step is crucial for achieving successful outcomes. Two prevalent approaches for TR are single-step retrieval, which utilizes the complete query, and sequential retrieval using Task Decomposition (TD), where a full query is segmented into discrete atomic subtasks. While single-step retrieval lacks the flexibility to handle…
Context Tuning for Retrieval Augmented Generation
December 18, 2023research area Knowledge Bases and Search, research area Speech and Natural Language ProcessingWorkshop at EACL
This paper was accepted at the UncertaiNLP workshop at EACL 2024.
Large language models (LLMs) have the remarkable ability to solve new tasks with just a few examples, but they need access to the right tools. Retrieval Augmented Generation (RAG) addresses this problem by retrieving a list of relevant tools for a given task. However, RAG’s tool retrieval step requires all the required information to be explicitly present in the query. This is a…
Auto-fetched and translated by AI Gem Box. All rights belong to the original author.