Nanyang Technological University
Leveraging RAG and LLMs in legal domain applications
Abstract
dc:description.abstractThe increasing adoption of large language models (LLMs) in legal practice has exposed a critical reliability problem: even leading commercial legal AI tools hallucinate at rates of 17–33%, generating fabricated case citations, non-existent contractual provisions, and misapplied legal standards. Retrieval-Augmented Generation (RAG)—which grounds LLM outputs in passages retrieved from verified document corpora—has emerged as a promising architectural response, yet a systematic understanding of how RAG design choices affect performance in the legal domain is lacking. This paper addresses that gap through two complementary contributions: a structured survey of RAG architectures and their applicability to legal text, and an empirical evaluation comparing retrieval and generation strategies on LegalBench-RAG, a domain-specific benchmark built on U.S. commercial contract corpora. We examine how choices in retrieval method, chunking strategy, and reranking interact to affect both retrieval quality and downstream answer faithfulness, and we propose a legal-aware document segmentation approach that exploits the structural conventions of contract text. Our results show that RAG augmentation substantially reduces legal hallucination—improving answer faithfulness by over 25 percentage points relative to an unaugmented baseline—and that domain-informed design choices yield consistent additional gains without requiring model retraining. At the same time, a persistent accuracy gap against an oracle upper bound reveals that retrieval quality remains the primary bottleneck for current legal RAG systems. These findings carry practical implications for the deployment of AI tools in legal practice and point toward concrete directions for future research, including legal-specific embedding adaptation and multi-jurisdictional evaluation frameworks.
Degree
thesis:*- College dc:contributor.school
- School of Electrical and Electronic Engineering
- Grantor dc:publisher
- Nanyang Technological University
- Year dc:date.issued
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- He, Yang
- Advisor dc:contributor.supervisor
-
- Mao Kezhi
Subjects
dc:subject × 1Rights
- Language dc:language.iso
- en
Identifiers
dc:identifier.*- Handle dc:identifier.uri
- https://hdl.handle.net/10356/214690