Bridging the Question-Answer Gap in Retrieval-Augmented Generation: Hypothetical Prompt Embeddings

15 Pages Posted: 15 Feb 2025

See all articles by Domen Vake

Domen Vake

University of Primorska

Jernej Vičič

Slovenian Academy of Sciences and Arts

Aleksandar Tošić

University of Primorska

Abstract

Retrieval-Augmented Generation (RAG) systems synergize retrieval mechanisms with generative language models to enhance the accuracy and relevance of responses. However, bridging the style gap between user queries and relevant information in document text remains a persistent challenge in retrieval-augmented systems, often addressed by runtime solutions (e.g., Hypothetical Document Embeddings (HyDE)) that attempt to improve alignment but introduce extra computational overhead at query time. To address these challenges, we propose Hypothetical Prompt Embeddings (HyPE), a framework that shifts the generation of hypothetical content from query time to the indexing phase. By precomputing multiple hypothetical prompts for each data chunk and embedding the chunk in place of the prompt, HyPE transforms retrieval into a question-question matching task, bypassing the need for runtime synthetic answer generation. This approach does not introduce latency but also strengthens the alignment between queries and relevant context. Our experimental results on six common datasets show that HyPE can improve retrieval context precision by up to 42 percentage points and claim recall by up to 45 percentage points, compared to standard approaches, while remaining compatible with re-ranking, multi-vector retrieval, and other RAG advancements.

Keywords: Retrieval-Augmented Generation, Large Language Models, Hypothetical prompt embedding, Dense Retrieval

Suggested Citation

Vake, Domen and Vičič, Jernej and Tošić, Aleksandar, Bridging the Question-Answer Gap in Retrieval-Augmented Generation: Hypothetical Prompt Embeddings. Available at SSRN: https://ssrn.com/abstract=5139335 or http://dx.doi.org/10.2139/ssrn.5139335

Domen Vake (Contact Author)

University of Primorska ( email )

Jernej Vičič

Slovenian Academy of Sciences and Arts

Aleksandar Tošić

University of Primorska ( email )

Do you have a job opening that you would like to promote on SSRN?

Paper statistics

Downloads
174
Abstract Views
518
Rank
370,631
PlumX Metrics