PromptReps: Prompting Large Language Models to Generate Dense and Sparse Representations for Zero-Shot Document Retrieval
Authors:
Preprint
Abstract
The current use of large language models (LLMs) for zero-shot document ranking follows one of two ways: 1) prompt-based re-ranking methods, which require no further training but are feasible for only re-ranking a handful of candidate documents due to the associated computational costs; and 2) unsupervised contrastive trained dense retrieval methods, which can retrieve relevant documents from the entire corpus but require a large amount of paired text data for contrastive training. In this paper, we propose PromptReps, which combines the advantages of both categories: no need for training and the ability to retrieve from the whole corpus. Our method only requires prompts to guide an LLM to generate query and document representations for effective document retrieval. Specifically, we prompt the LLMs to represent a given text using a single word, and then use the last token's hidden states and the corresponding logits associated to the prediction of the next token to construct a hybrid document retrieval system. The retrieval system harnesses both dense text embedding and sparse bag-of-words representations given by the LLM. Our experimental evaluation on the BEIR zero-shot document retrieval datasets illustrates that this simple prompt-based LLM retrieval method can achieve a similar or higher retrieval effectiveness than state-of-the-art LLM embedding methods that are trained with large amounts of unsupervised data, especially when using a larger LLM.Keywords
All Related Versions
This publication has 25 references indexed in Scilit:
- The Faiss LibraryIEEE Transactions on Big Data, 2025
- Simple Techniques for Enhancing Sentence Embeddings in Generative Language Models2024
- Summary of ChatGPT-Related research and perspective towards the future of large language modelsMeta-Radiology, 2023
- ranx.fuse: A Python Library for Metasearch2022
- BERT-based Dense Retrievers Require Interpolation with BM25 for Effective Passage Retrieval2021
- TILDE: Term Independent Likelihood moDEl for Passage Re-ranking2021
- Learning Passage Impacts for Inverted Indexes2021
- Pyserini: A Python Toolkit for Reproducible Information Retrieval Research with Sparse and Dense Representations2021
- SPLADE: Sparse Lexical and Expansion Model for First Stage Ranking2021
- ColBERT2020