Benchmarking Small Language Models for Legal Retrieval-Augmented Generation: Structural Validity, Citation Compliance, and Inference Efficiency
Abstract
Retrieval-augmented generation (RAG) can condition language-model responses on external evidence, but its usefulness in legal settings depends on more than fluent text generation. This study benchmarks five small language models (SLMs) in a local legal RAG pipeline using BM25 retrieval over the FIRE 2019 Artificial Intelligence for Legal Assistance (AILA) corpus and inference through llama.cpp. For each query, the system retrieves prior case documents, constructs a constrained prompt, and evaluates the generated response for structural usability, citation behaviour, and inference efficiency. Citation-grounded response rate is defined as the proportion of queries for which a structurally usable response contains at least one citation to a retrieved document; citation precision separately measures the proportion of extracted citations that refer to retrieved documents. Neither measure verifies whether a cited case substantively supports a legal claim. Qwen2.5-1.5B achieved a structural usability rate of 1.00 but a citation-grounded response rate of 0.16. Llama-3.2-1B achieved a structural usability rate of 0.92 and the highest mean end-to-end throughput (6.21 tokens/s), while Phi-3 Mini Q4 had the highest citation-grounded response rate (0.38) but the greatest mean time to first token (69.11 s). These results show that structural usability, citation behaviour, and inference efficiency are distinct properties of local SLM-based legal RAG. The study provides a controlled comparison under a shared retrieval and generation protocol and highlights the need to evaluate citation behaviour separately from fluency and latency.
Create a lesson
Metadata
- Categories
- cs.AI, cs.CL, cs.IR, cs.LG
- Comments
- 13 pages, 4 tables, 2 figures
Related papers
Mitigating Knowledge Conflicts in Retrieval-Augmented Generation via Inference-Time Representation Editing
Shared title terminologycs.AIDahyun Jung, Jaehyung Seo, Heuiseok Lim
How to Guide Relation-Free Graphs? Coverage-Aware Graph Retrieval-Augmented Generation via Syntax-Constrained Propagation
Shared title terminologycs.AIJiyu Tian, Liming Chen
Self-Validating Heuristics: Reliable Delivery under Distribution Shift in Language-Model-Driven Online Heuristic Design
Shared title terminologycs.AITianyu Wang, Xi Vincent Wang, Lihui Wang et al.
Who Is in the Image? Benchmarking Any Identity Anonymization in Multimodal Large Language Models
Shared title terminologycs.AISimone Caldarella, Matteo Farina, Rahaf Aljundi et al.
Bayesian Graphical Memory for Active Evidence Retrieval in Large Language Models
Shared title terminologycs.AIHaowen Wan, Wenqing Zhou, Zhaoyang Li et al.
Hybridizing Large Language Models and Ontologies for the Automated Generation of XR Learning Scenarios
Shared title terminologycs.AIGabrielle Caneval, Alex Gabriel