Evidence Hub

LR2: A Legal RAG for Legal Reasoning over Cases

Irene Benedetto, Luca Cagliero, Francesco Tarasconi

Frontiers in artificial intelligence and applications, 2025

Abstract

This paper presents a Retrieval Augmented Generation (RAG) pipeline adapted to simulate the process of resolving legal cases. It introduces two novel approaches to enhance the RAG pipeline for legal reasoning: 1) problem generation, which automatically creates fictitious legal cases to improve retrieval performance, and 2) query rewriting, which reformulates user queries to better align with relevant passages. These methods are evaluated on a legal reasoning dataset derived from real U.S. civil procedure cases. Experiments conducted across different retrieval methods (keyword search, tensor search, and hybrid search with re-ranking) and language models (GPT-4, SAULM, Llama-3 8B) highlight the benefits of the more advanced RAG pipeline. Notably, the query rewriting approach consistently improves performance by enhancing the alignment between queries and passages.

Read the paper

Related studies

Go deeper in Evidence Hub

Evidence Hub adds a study data sheet (design, sample size, evidence level, key numbers), an AI summary and a chat grounded in the paper's text.

Open this study Sign up free