LexRAG: Benchmarking Retrieval-Augmented Generation in Multi-Turn Legal Consultation Conversation

Haitao Li, Yifan Chen, Yiran Hu, Qingyao Ai, Junjie Chen, Xiaoyu Yang, Jianhui Yang, Yueyue Wu, Zeyang Liu, Yiqun Liu · DOI

Abstract

Retrieval-augmented generation (RAG) has proven highly effective in improving large language models (LLMs) across various domains. However, there is no benchmark specifically designed to assess the effectiveness of RAG in the legal domain, which restricts progress in this area. To fill this gap, we propose LexRAG, the first benchmark to evaluate RAG systems for multi-turn legal consultations. LexRAG consists of 1,013 multi-turn dialogue samples and 17,228 candidate legal articles. Each sample is annotated by legal experts and consists of five rounds of progressive questioning. LexRAG includes two key tasks: (1) Conversational knowledge retrieval, requiring accurate retrieval of relevant legal articles based on multi-turn context. (2) Response generation, focusing on producing legally sound answers. To ensure reliable reproducibility, we develop LexiT, a legal RAG toolkit that provides a comprehensive implementation of RAG system components tailored for the legal domain. Additionally, we introduce an LLM-as-a-judge evaluation pipeline to enable detailed and effective assessment. Through experimental analysis of various LLMs and retrieval methods, we reveal the key limitations of existing RAG systems in handling legal consultation conversations. LexRAG establishes a new benchmark for the practical application of RAG systems in the legal domain.

While RAG has revolutionized how Large Language Models (LLMs) access up-to-date information, the legal domain presents unique hurdles that general-purpose benchmarks ignore. Legal consultations are rarely "one-and-done" queries; they are multi-turn conversations where users often lack legal vocabulary, use ambiguous pronouns, and shift topics abruptly.

Existing legal AI benchmarks typically focus on static tasks like judgment prediction or single-document retrieval, failing to capture the "progressive unfolding" of a legal case. LexRAG addresses this by testing two critical capabilities: conversational knowledge retrieval amidst messy histories and the synthesis of laws into legally sound, coherent answers.

Methods: The LexiT Framework and Evaluation Pipeline

The researchers introduced two major contributions to the RAG ecosystem: the LexiT toolkit and a specialized evaluation pipeline.

The LexRAG framework architecture, including the LexiT toolkit components (Processor, Retriever, Generator) and the Evaluator pipeline.
  • LexiT Toolkit: A modular RAG framework tailored for legal research. It includes components for data processing (like query rewriting), various retrieval models (lexical and dense), and a generation pipeline.
  • LLM-as-a-Judge Evaluation: Recognizing that standard metrics like ROUGE or BLEU fail to capture legal "correctness," the authors developed a fine-grained evaluation pipeline. An LLM judge (Qwen-2.5-72B-Instruct) evaluates responses across five dimensions: Factuality, User Satisfaction, Clarity, Logical Coherence, and Completeness. The judge uses Chain-of-Thought reasoning and compares model outputs against expert-written reference answers.

The LexRAG Dataset

The core of the benchmark is the LexRAG dataset, which provides a high-quality corpus for testing multi-turn legal reasoning.

Key statistics of the LexRAG dataset, highlighting the scale of conversations, queries, and legal articles.

The dataset features:

  • Conversations: 1,013 multi-turn samples (5,065 total queries), each with five rounds of progressive questioning.
  • Corpus: A candidate pool of 17,228 legal articles sourced from 222 Chinese statutes and regulations.
  • Expert Annotation: 11 legal experts annotated "gold standard" responses, relevant articles, and key legal terms.
  • Diversity: Coverage of 27 distinct legal areas, including traffic accidents, debt disputes, and intellectual property.

Key Insights and Results

Experimental analysis revealed several critical findings for legal RAG systems:

  • The "Query Rewrite" Advantage: In multi-turn settings, simply using the "last query" for retrieval is insufficient due to unresolved pronouns. Using an LLM to rewrite the conversation history into a standalone query significantly boosted retrieval performance.
  • Dense vs. Lexical Retrieval: Dense models (e.g., GTE, BGE) consistently outperformed traditional keyword-based methods like BM25. Legal relevance often hinges on semantic intent rather than specific jargon.
  • The "Noisy Context" Trap: When LLMs were provided with incomplete or irrelevant retrieved documents, performance often dropped below zero-shot baselines. This suggests that providing incorrect legal context is more damaging than providing none, as it triggers hallucinated reasoning.
  • Performance Gap: The best-performing systems only achieved a Recall@10 of 33.33%, indicating significant room for improvement. While Qwen-2.5-72B-Instruct led the generation tasks, it still trailed human expert benchmarks (scoring ~7.4 vs. the expert 8.0).

Conclusion and Future Directions

LexRAG highlights the limitations of current RAG systems in handling the complexities of statutory law and multi-turn dialogue. Future work will focus on expanding the benchmark to other languages and jurisdictions, and developing RAG techniques more resilient to retrieval noise. The researchers also plan to include more complex legal documents, such as judicial interpretations and case precedents, to further challenge AI capabilities in the legal domain.

Summary updated

BibTeX
@inproceedings{li2025lexrag,
  author = {Haitao Li and Yifan Chen and Yiran Hu and Qingyao Ai and Junjie Chen and Xiaoyu Yang and Jianhui Yang and Yueyue Wu and Zeyang Liu and Yiqun Liu},
  title = {{LexRAG: Benchmarking Retrieval-Augmented Generation in Multi-Turn Legal Consultation Conversation}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2025},
  doi = {10.1145/3726302.3730340},
}
Figure