ToolDreamer: Instilling LLM Reasoning Into Tool Retrievers
Authors:
- Bingqing WangBWBingqing Wang
- Zhe FengZFZhe Feng
Preprint
Abstract
Tool calling has become increasingly popular for Large Language Models (LLMs). However, for large tool sets, the resulting tokens would exceed the LLM's context window limit, making it impossible to include every tool. Hence, an external retriever is used to provide LLMs with the most relevant tools for a query. Existing retrieval models rank tools based on the similarity between a user query and a tool description (TD). This leads to suboptimal retrieval as user requests are often poorly aligned with the language of TD. To remedy the issue, we propose ToolDreamer, a framework to condition retriever models to fetch tools based on hypothetical (synthetic) TD generated using an LLM, i.e., description of tools that the LLM feels will be potentially useful for the query. The framework enables a more natural alignment between queries and tools within the language space of TD's. We apply ToolDreamer on the ToolRet dataset and show that our method improves the performance of sparse and dense retrievers with and without training, thus showcasing its flexibility. Through our proposed framework, our aim is to offload a portion of the reasoning burden to the retriever so that the LLM may effectively handle a large collection of tools without inundating its context window.Keywords
All Related Versions
This publication has 27 references indexed in Scilit:
- Control Illusion: The Failure of Instruction Hierarchies in Large Language ModelsProceedings of the AAAI Conference on Artificial Intelligence, 2026
- Exploiting Query Reformulation and Reciprocal Rank Fusion in Math-Aware Search Engines2025
- MMMORRF: Multimodal Multilingual MOdularized Reciprocal Rank Fusion2025
- LLM4Rerank: LLM-based Auto-Reranking Framework for Recommendations2025
- A Survey on Hallucination in Large Language Models: Principles, Taxonomy, Challenges, and Open QuestionsACM Transactions on Information Systems, 2025
- Tool learning with large language models: a surveyFrontiers of Computer Science, 2025
- Towards Completeness-Oriented Tool Retrieval for Large Language Models2024
- Lost in the Middle: How Language Models Use Long ContextsTransactions of the Association for Computational Linguistics, 2024
- Dense Passage Retrieval for Open-Domain Question Answering2020
- The Hungarian method for the assignment problemNaval Research Logistics Quarterly, 1955