ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval

Kelong Mao, Chenlong Deng, Haonan Chen, Fengran Mo, Zheng Liu, Tetsuya Sakai, Zhicheng Dou

Introduction

In the evolution of search engines and virtual assistants, the ability to understand multi-turn dialogues is paramount. Unlike standard ad-hoc retrieval, where a single query contains all necessary intent, conversational search involves context that is often fragmented across multiple exchanges. For instance, a user asking "How does it freeze?" after a discussion about the ocean requires a system that can resolve the pronoun "it" to "ocean water" by looking back at the conversation history.

Historically, researchers have addressed this using two primary methods: Conversational Query Rewriting (CQR) and Conversational Dense Retrieval (CDR). CQR uses a model to rewrite the dialogue into a standalone query, which is accurate but suffers from high latency. CDR, conversely, maps the entire session into a single vector for fast retrieval but has traditionally struggled with the noise and length of conversational histories.

ChatRetriever introduces a paradigm shift by adapting Large Language Models (LLMs) into high-performance, end-to-end conversational dense retrievers. By leveraging the inherent reasoning capabilities of a 7B-parameter model, ChatRetriever matches the accuracy of slow rewriters while maintaining the efficiency of dense retrieval.

Methodology: Contrastive Session-Masked Instruction Tuning

The core innovation of ChatRetriever is a dual-learning framework called Contrastive Session-Masked Instruction Tuning (CSIT). This approach adapts a generative LLM (specifically Qwen-7B) for retrieval tasks using three distinct strategies:

1. Contrastive Instruction Tuning

This follows the standard retrieval training protocol. The model is trained to minimize the distance in vector space between a conversational session and a relevant document, while simultaneously maximizing the distance from irrelevant "negative" passages. This aligns the LLM's internal representations with the goal of document ranking.

2. Session-Masked Instruction Tuning (SIT)

SIT is the "secret sauce" that differentiates ChatRetriever from standard encoders. During training, the model is tasked with a generative objective: producing a response based on the session. However, a custom attention mask is applied so the model cannot directly see the original session text when generating the response. Instead, it must rely entirely on a few "special tokens" at the end of the session. This forces the model to compress all vital contextual information into a dense bottleneck, ensuring the resulting embedding is rich with user intent.

3. Representational Chain-of-Thought (R-CoT)

To further enhance the representation, the authors introduce R-CoT. Rather than using a single token to represent the entire session, they append multiple tokens (e.g., three [EMB] tokens). The hypothesis is that these tokens act as a computational buffer, allowing the model to "think" and organize the representation more effectively before the final embedding is produced for retrieval.

Experimental Setup and Results

Training and Evaluation

The model was trained on a combination of UltraChat (for multi-turn dialogue capabilities) and MSMARCO (for general passage ranking). To test its generalization and robustness, the researchers evaluated ChatRetriever on five major benchmarks: QReCC, TopiOCQA, and the TREC CAsT series (2019, 2020, and 2021).

Performance Breakthroughs

ChatRetriever established new state-of-the-art (SOTA) benchmarks for conversational dense retrieval, demonstrating massive gains over previous best-in-class models:

  • CAsT-20: Achieved an absolute NDCG@3 improvement of 6.8%.
  • CAsT-21: Achieved a staggering 12.2% improvement in NDCG@3.

Crucially, ChatRetriever performed on par with—and often better than—computationally expensive LLM-based rewriters like LLM4CS. By operating end-to-end, it avoids the latency of generating a text rewrite, making it a viable candidate for real-time, production-level conversational AI.

Key Insights

  • Generative Tasks Improve Retrieval: The study proves that forcing an LLM to generate a summary or response based on an embedding (via SIT) significantly improves that embedding's quality for retrieval. It ensures the model captures nuanced intent rather than just surface-level keyword overlaps.
  • LLMs as Superior Encoders: While most retrievers use small models (e.g., BERT-base at 110M parameters), the 7B-parameter ChatRetriever demonstrates that larger models bring superior generalization, particularly for complex or "long-tail" user intents that smaller models often miss.
  • Robustness: ChatRetriever showed significantly higher stability than traditional retrievers when conversation histories were modified or when simulating "online" response generation, suggesting it is less sensitive to dialogue noise.

Limitations and Future Directions

Despite its performance, ChatRetriever’s 7B-parameter size presents challenges for deployment, specifically regarding storage costs for document indexes and inference latency compared to smaller encoders. The authors suggest model distillation—transferring the knowledge of the 7B model into a smaller, more efficient architecture—as a critical next step.

Additionally, the authors noted that more sophisticated "hard negative mining" during training could further sharpen the model's ability to distinguish between highly similar relevant and irrelevant passages. Future work may also see this retrieval-tuned LLM approach applied to specialized domains such as legal research or technical product support.

Summary updated

BibTeX
@inproceedings{mao2024chatretriever,
  author = {Kelong Mao and Chenlong Deng and Haonan Chen and Fengran Mo and Zheng Liu and Tetsuya Sakai and Zhicheng Dou},
  title = {{ChatRetriever: Adapting Large Language Models for Generalized and Robust Conversational Dense Retrieval}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.71},
}
Figure