Large Language Models are Built-in Autoregressive Search Engines

Noah Ziems, Wenhao Yu, Zhihan Zhang, Meng Jiang
5/16/2023
cs.CLcs.IR

Official code: Ziems/llm-url (36 stars, last commit 2024-06-10).

Abstract

Document retrieval is a key stage of standard Web search engines. Existing dual-encoder dense retrievers obtain representations for questions and documents independently, allowing for only shallow interactions between them. To overcome this limitation, recent autoregressive search engines replace the dual-encoder architecture by directly generating identifiers for relevant documents in the candidate pool. However, the training cost of such autoregressive search engines rises sharply as the number of candidate documents increases. In this paper, we find that large language models (LLMs) can follow human instructions to directly generate URLs for document retrieval. Surprisingly, when providing a few {Query-URL} pairs as in-context demonstrations, LLMs can generate Web URLs where nearly 90\% of the corresponding documents contain correct answers to open-domain questions. In this way, LLMs can be thought of as built-in search engines, since they have not been explicitly trained to map questions to document identifiers. Experiments demonstrate that our method can consistently achieve better retrieval performance than existing retrieval approaches by a significant margin on three open-domain question answering benchmarks, under both zero and few-shot settings. The code for this work can be found at \url{https://github.com/Ziems/llm-url}.

View on arXivView PDF

Code Implementations(1)

Ziems/llm-urlOfficial100%
365PythonMay 15, 20232 years ago

Similar Papers

Cite this paper

@article{ziems2023large,
  title  = {Large Language Models are Built-in Autoregressive Search Engines},
  author = {Noah Ziems and Wenhao Yu and Zhihan Zhang and Meng Jiang},
  year   = {2023},
  eprint = {2305.09612},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2305.09612v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2305.09612.svg)](https://codeofpaper.com/paper/2305.09612)

Discussion