Built independently by an author, for readers. Read the story and support ChapterPal

keyword

PromptReps

PromptReps is a zero-shot document retrieval method that uses prompting to generate both dense and sparse text representations from large language models without requiring fine-tuning or contrastive training. The approach instructs a language model to represent an input text using a single word. It then extracts the hidden state of the final input token to serve as a dense vector embedding and takes the vocabulary prediction logits for the next token to form a sparse bag-of-words representation. By integrating these two representation types into a hybrid retrieval framework, PromptReps enables efficient, full-corpus information retrieval while avoiding the computational overhead of prompt-based re-rankers and the heavy data demands of training dedicated neural retrievers.

1 item

PromptReps: Prompting Large Language Models to Generate Dense and Sparse Representations for Zero-Shot Document Retrieval

PromptReps: Prompting Large Language Models to Generate Dense and Sparse Representations for Zero-Shot Document Retrieval

Shengyao Zhuang, Xueguang Ma, Bevan Koopman, Jimmy Lin, Guido Zuccon

OrganizationsCommonwealth Scientific and Industrial Research OrganisationUniversity of QueenslandUniversity of Waterloo

Why you should read this

Introduces a prompt-based approach that simultaneously extracts dense embeddings and sparse bag-of-words representations from large language models in a single forward pass, enabling zero-shot full-corpus document retrieval without expensive contrastive fine-tuning.

Utilizing large language models (LLMs) for zero-shot document ranking is done in one of two ways: (1) prompt-based re-ranking methods, which require no further training but are only feasible for re-ranking a handful of candidate documents due to 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 with 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 MSMARCO, TREC deep learning and 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.

Added

2026-09-26