mlsanityData to 7 Oct 2026

Improving Tool Retrieval by Leveraging Large Language Models for Query Generation

arXiv 2412.03573 ↗First posted 17 Nov 2024cs.IR cs.AI cs.CLcited by 11

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

  1. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  2. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
  3. 2022Constitutional AI: Harmlessness from AI Feedbackcited by 2,950
  4. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
  5. 2017Billion-scale similarity search with GPUscited by 2,477
  6. 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,880
  7. 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
  8. 2021Unsupervised Dense Information Retrieval with Contrastive Learningcited by 1,203
  9. 2021Learning To Retrieve Prompts for In-Context Learningcited by 641
  10. 2020Pretrained Transformers for Text Ranking: BERT and Beyondcited by 266
  11. 2023Unified Demonstration Retriever for In-Context Learningcited by 141
  12. 2023Are LLMs All You Need for Task-Oriented Dialogue?cited by 52
2 more
  1. 2022Novelty Controlled Paraphrase Generation with Retrieval Augmented Conditional Prompt Tuningcited by 25
  2. 2022Scalable and Robust Self-Learning for Skill Routing in Large-Scale Conversational AI Systemscited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 5; 2026: 6.

11 papers.