Exploring Reasoning-Infused Text Embedding with Large Language Models for Zero-Shot Dense Retrieval

Yuxiang Liu, Tian Wang, Gourab Kundu, Tianyu Cao, Guang Cheng, Zhen Ge, Jianshu Chen, Qingjun Cui, Trishul Chilimbi

Introduction

Dense retrieval has become a cornerstone of modern Information Retrieval (IR), utilizing high-dimensional embeddings to match queries with relevant documents. While effective, traditional encoder-only models (e.g., BERT, E5) often rely on surface-level lexical similarity. This limitation becomes apparent with complex queries requiring logical inference or domain-specific knowledge. Even recent Large Language Model (LLM) based embedders typically leverage hidden states without fully exploiting the model's inherent reasoning capabilities.

To bridge this gap, we introduce Reasoning-Infused Text Embedding (RITE). RITE enhances zero-shot dense retrieval by prompting LLMs to generate intermediate reasoning steps in the token space before extracting embeddings. This "thinking" phase allows the model to capture deeper semantic relationships that standard embedding methods often miss.

The RITE Framework

RITE integrates generative reasoning directly into the embedding pipeline through a three-step process:

  1. Reasoning Elicitation: Instead of immediate embedding, the LLM is prompted to generate an "inferentially enriched" reasoning text. For instance, the model might be asked to "think step by step" to identify the core concepts and relevant information required for a query.
  2. Embedding Extraction: The generated reasoning is prepended to the original query. RITE then utilizes established embedding strategies, such as RITE-Echo (capturing bidirectional context) or RITE-PR (compressing the query into a representative word).
  3. Document Retrieval: Standard cosine similarity matches the reasoning-infused query embedding against document embeddings. Notably, documents are processed without the reasoning step to maintain computational efficiency.
The RITE framework architecture, illustrating the flow from query/document to embedding via the LLM decoder and the integration of reasoning steps.

Experimental Evaluation

The performance of RITE was evaluated using the BRIGHT benchmark, a challenging collection of 12 datasets designed to test reasoning-heavy retrieval across diverse domains, including Biology, Robotics, Economics, and Mathematics (TheoremQA).

Key Results

RITE demonstrated substantial improvements over standard Echo and PromptReps (PR) baselines using Mistral 7B and LLaMA 3 8B backbones.

  • Domain-Specific Gains: Using Mistral 7B, RITE-PR achieved a +236% improvement in Biology and a +166% boost in Psychology compared to the baseline PR model.
  • Theoretical Performance: On LLaMA 3 8B, RITE-PR improved ranking quality (nDCG@10) on the TheoremQA dataset by +353%.
  • Qualitative Advantage: The reasoning step acts as a sophisticated form of internal query expansion. By verbalizing the "essential problem," the LLM creates a richer semantic target.
A qualitative comparison showing how RITE-generated reasoning significantly improves retrieval performance (nDCG@10) compared to a standard query and human-crafted "Oracle" reasoning for a complex question about animal handedness.

As shown in the example above, while a standard query might struggle with the nuances of "paw-ness," RITE identifies the underlying biological concept of "lateralized behavior," leading to a significantly higher nDCG@10 score (0.8503) compared to the human-crafted Oracle (0.2372).

Discussion and Future Work

RITE proves that the latent reasoning capabilities of off-the-shelf LLMs can be unlocked for retrieval without task-specific fine-tuning. However, the approach introduces computational overhead due to the token generation phase. Furthermore, while RITE performs comparably to human "Oracle" reasoning in many domains, a gap remains in highly rigorous fields like formal mathematics (e.g., AoPS).

Future research will focus on optimizing the "reasoning-then-embedding" loop to reduce latency and integrating external knowledge bases to ground the model's reasoning, preventing potential hallucinations during the elicitation phase.

Summary updated

BibTeX
@inproceedings{liu2025exploring,
  author = {Yuxiang Liu and Tian Wang and Gourab Kundu and Tianyu Cao and Guang Cheng and Zhen Ge and Jianshu Chen and Qingjun Cui and Trishul Chilimbi},
  title = {{Exploring Reasoning-Infused Text Embedding with Large Language Models for Zero-Shot Dense Retrieval}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2025},
}
Figure