π€ AI Summary
This work addresses the mismatch between user queries and document styles in retrieval-augmented generation (RAG) by proposing the HyPE framework, which shifts the generation of hypothetical answers from runtime to the indexing phase. Specifically, HyPE precomputes multiple hypothetical prompts for each document chunk and embeds them in advance, transforming retrieval into a question-to-question semantic matching task. This approach pioneers the offline preprocessing of hypothetical prompt embeddings, enhancing alignment quality without introducing additional inference latency. Moreover, HyPE seamlessly integrates with existing RAG techniques such as re-ranking and multi-vector retrieval. Experimental results across six standard benchmarks demonstrate that HyPE improves the precision and recall of retrieved contexts by up to 42 and 45 percentage points, respectively.
π 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, query decomposition, and other RAG advancements