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}.
翻译:文档检索是标准网络搜索引擎的关键阶段。现有的双编码器密集检索器独立获取问题和文档的表示,仅允许它们之间进行浅层交互。为克服这一限制,近期自回归搜索引擎通过直接生成候选池中相关文档的标识符来替代双编码器架构。然而,此类自回归搜索引擎的训练成本随着候选文档数量的增加而急剧上升。本文发现,大语言模型(LLMs)能遵循人类指令直接生成用于文档检索的URL。令人惊讶的是,当提供少量{查询-URL}对作为上下文示例时,LLMs生成的网页URL中,近90%的对应文档包含开放领域问题的正确答案。如此一来,LLMs可被视为内置搜索引擎,因为它们并未经过显式训练来将问题映射到文档标识符。实验表明,在三个开放领域问答基准测试的零样本和少样本设置下,我们的方法始终能显著优于现有检索方法。本工作代码见\url{https://github.com/Ziems/llm-url}。