[논문 리뷰] LegalBench-RAG: A Benchmark for Retrieval-Augmented Generation in the Legal Domain
LegalBench-RAG는 법률 도메인에서 RAG 시스템의 검색 단계를 평가하는 최초의 벤치마크로, 원문 소스에 고정된 정밀한 스니펫 수준 검색 및 실험 속도를 위한 미니 버전을 사용합니다.
Retrieval-Augmented Generation (RAG) systems are showing promising potential, and are becoming increasingly relevant in AI-powered legal applications. Existing benchmarks, such as LegalBench, assess the generative capabilities of Large Language Models (LLMs) in the legal domain, but there is a critical gap in evaluating the retrieval component of RAG systems. To address this, we introduce LegalBench-RAG, the first benchmark specifically designed to evaluate the retrieval step of RAG pipelines within the legal space. LegalBench-RAG emphasizes precise retrieval by focusing on extracting minimal, highly relevant text segments from legal documents. These highly relevant snippets are preferred over retrieving document IDs, or large sequences of imprecise chunks, both of which can exceed context window limitations. Long context windows cost more to process, induce higher latency, and lead LLMs to forget or hallucinate information. Additionally, precise results allow LLMs to generate citations for the end user. The LegalBench-RAG benchmark is constructed by retracing the context used in LegalBench queries back to their original locations within the legal corpus, resulting in a dataset of 6,858 query-answer pairs over a corpus of over 79M characters, entirely human-annotated by legal experts. We also introduce LegalBench-RAG-mini, a lightweight version for rapid iteration and experimentation. By providing a dedicated benchmark for legal retrieval, LegalBench-RAG serves as a critical tool for companies and researchers focused on enhancing the accuracy and performance of RAG systems in the legal domain. The LegalBench-RAG dataset is publicly available at https://github.com/zeroentropy-cc/legalbenchrag.
연구 동기 및 목표
- 큰 규모의 법률 코퍼스에서 정확하고 최소한의 텍스트 스니펫을 찾아 법률 RAG 파이프라인의 검색 정확도를 평가합니다.
- 법률 맥락에서 검색 알고리즘을 비교하기 위한 공개적으로 이용 가능하고 전문가가 주석을 단 데이터셋을 제공합니다.
- 큰 불확실한 청크를 피하고 정확한 인용을 가능하게 하여 컨텍스트 윈도우의 효율성을 유지합니다.
제안 방법
- 네 가지 법률 데이터셋(PrivacyQA, CUAD, MAUD, ContractNLI)에서 원래 위치로 추적하여 LegalBench-RAG를 구성합니다.
- 문서 설명과 질의어의 조합으로 쿼리를 만들어 ground-truth 스팬(시작/종료 문자 인덱스)을 산출합니다.
- 각 질의에 정확히 대답하기 위해 (filename, index range) 스팬 배열로 QA 쌍에 주석을 답니다.
- 고정 크기 500자 청크와 Recursive Text Character Splitter를 사용한 청크라이징 전략 및 후처리( reranker 없음 vs Cohere reranker)로 검색을 평가합니다.
- 임베딩에 OpenAI text-embedding-3-large를 사용하고 저장에 SQLite Vec를 사용하며 실험 구성에서 선택된 설정에 Cohere reranker를 사용합니다.

실험 결과
연구 질문
- RQ1법률 질의에 대해 큰 코퍼스 내에서 정확하고 최소한의 텍스트 스팬을 찾아내는 법률 검색 시스템의 성능은 어느 정도인가?
- RQ2법률 텍스트에서 어떤 청크화 및 재랭킹 전략이 가장 높은 검색 정밀도와 재현율을 제공하는가?
- RQ3LegalBench-RAG 내 서로 다른 데이터셋은 검색 난이도와 성능에서 어떻게 비교되는가?
- RQ4전용 법률 텍스트에서 일반 용도 재랭커의 한계는 무엇인가?
주요 결과
- RTCS (Recursive Text Character Splitter)가 재랭커 없이 모든 데이터셋에서 최상의 전체 검색 성능을 달성했습니다.
- Cohere의 재랭커는 이 법률 검색 벤치마크에서 재랭커 없는 경우에 비해 성능이 떨어졌습니다.
- PrivacyQA가 가장 쉬운 데이터셋으로 나타났고, MAUD가 검색 측면에서 가장 도전적이었다.
- PrivacyQA에서 RTCS, 재랭커 없음에서 Precision@1은 14.38%에 도달했고 Recall@64는 84.19%에 도달했다.
- MAUD는 낮은 성능을 보였으며, Precision@1은 약 2.65%, Recall@64는 약 28.28%였다.
- LegalBench-RAG-mini는 빠른 실험을 위한 경량의 776-쿼리 서브셋(4개 데이터셋에 걸쳐)을 제공합니다.

이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.