Improving Tool Retrieval by Leveraging Large Language Models for Query Generation

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Kachuee, Mohammad, Ahuja, Sarthak, Kumar, Vaibhav, Xu, Puyang, Liu, Xiaohu
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866917857907965952
author Kachuee, Mohammad
Ahuja, Sarthak
Kumar, Vaibhav
Xu, Puyang
Liu, Xiaohu
author_facet Kachuee, Mohammad
Ahuja, Sarthak
Kumar, Vaibhav
Xu, Puyang
Liu, Xiaohu
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2412_03573
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Improving Tool Retrieval by Leveraging Large Language Models for Query Generation
Kachuee, Mohammad
Ahuja, Sarthak
Kumar, Vaibhav
Xu, Puyang
Liu, Xiaohu
Information Retrieval
Artificial Intelligence
Computation and Language
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.
title Improving Tool Retrieval by Leveraging Large Language Models for Query Generation
topic Information Retrieval
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2412.03573