Improving Tool Retrieval by Leveraging Large Language Models for Query Generation
Not on the map. Why?
Abstract (arXiv)
Using tools by Large Language Models (LLMs) is a promising avenue to extend their reach beyond language or conversational settings. The number of tools can scale to thousands as they enable accessing sensory information, fetching updated factual knowledge, or taking actions in the real world. In such settings, in-context learning by providing a short list of relevant tools in the prompt is a viable approach. To retrieve relevant tools, various approaches have been suggested, ranging from simple frequency-based matching to dense embedding-based semantic retrieval. However, such approaches lack the contextual and common-sense understanding required to retrieve the right tools for complex user requests. Rather than increasing the complexity of the retrieval component itself, we propose leveraging LLM understanding to generate a retrieval query. Then, the generated query is embedded and used to find the most relevant tools via a nearest-neighbor search. We investigate three approaches for query generation: zero-shot prompting, supervised fine-tuning on tool descriptions, and alignment learning by iteratively optimizing a reward metric measuring retrieval performance. By conducting extensive experiments on a dataset covering complex and multi-tool scenarios, we show that leveraging LLMs for query generation improves the retrieval for in-domain (seen tools) and out-of-domain (unseen tools) settings.
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). Builds on 14 of its 19 references that are in the map. First posted on arXiv 17 Nov 2024.
Builds on
14 of 19 references.
References · 14
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
- 2022Constitutional AI: Harmlessness from AI Feedbackcited by 2,950
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2017Billion-scale similarity search with GPUscited by 2,477
- 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,880
- 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
- 2021Unsupervised Dense Information Retrieval with Contrastive Learningcited by 1,203
- 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
- 2020Pretrained Transformers for Text Ranking: BERT and Beyondcited by 266
- 2023Unified Demonstration Retriever for In-Context Learningcited by 141
- 2023Are LLMs All You Need for Task-Oriented Dialogue?cited by 52
Built on by
Citing papers per year: 2025: 5; 2026: 6.
11 papers.
- 2026ToolOmni: Enabling Open-World Tool Use via Agentic learning with Proactive Retrieval and Grounded Executioncited by 7
- 2025MassTool: A Multi-Task Search-Based Tool Retrieval Framework for Large Language Modelscited by 3
- 2025Discrepancy Detection at the Data Level: Toward Consistent Multilingual Question Answeringcited by 2
- 2025ScaleCall -- Agentic Tool Calling at Scale for Fintech: Challenges, Methods, and Deployment Insightscited by 2
- 2026FinTrace: Holistic Trajectory-Level Evaluation of LLM Tool Calling for Long-Horizon Financial Taskscited by 2
- 2025From Large to Super-Tiny: End-to-End Optimization for Cost-Efficient LLMscited by 1
- 2026Bidirectional Semantic Complementary Tool Retrieval for Remote Sensing Agentscited by 1
- 2025JSPLIT: A Taxonomy-based Solution for Prompt Bloating in Model Context Protocolcited by 0
- 2026Toollery: Scaling LLM Agents to Thousands of Skills and Toolscited by 0
- 2026ParaAgent: Reinforcing Parallel Acting in Open-World Tool Environmentscited by 0
- 2026Self-Evolving Agents via Likelihood-Guided Tool-Space Optimizationcited by 0
- 2026Self-Evolving Agents via Likelihood-Guided Tool-Space Optimization28 Sep 2026
- 2026ParaAgent: Reinforcing Parallel Acting in Open-World Tool Environments27 Sep 2026
- 2026Toollery: Scaling LLM Agents to Thousands of Skills and Tools2 Sep 2026
- 2026Bidirectional Semantic Complementary Tool Retrieval for Remote Sensing Agents29 Apr 2026
- 2026ToolOmni: Enabling Open-World Tool Use via Agentic learning with Proactive Retrieval and Grounded Execution15 Apr 2026
- 2026FinTrace: Holistic Trajectory-Level Evaluation of LLM Tool Calling for Long-Horizon Financial Tasks11 Apr 2026
- 2025ScaleCall -- Agentic Tool Calling at Scale for Fintech: Challenges, Methods, and Deployment Insights29 Oct 2025
- 2025JSPLIT: A Taxonomy-based Solution for Prompt Bloating in Model Context Protocol16 Oct 2025
- 2025Discrepancy Detection at the Data Level: Toward Consistent Multilingual Question Answering13 Oct 2025
- 2025MassTool: A Multi-Task Search-Based Tool Retrieval Framework for Large Language Models1 Jul 2025
- 2025From Large to Super-Tiny: End-to-End Optimization for Cost-Efficient LLMs18 Apr 2025