Benchmarking Small Language Models for Legal Retrieval-Augmented Generation: Structural Validity, Citation Compliance, and Inference Efficiency
Bhavya Yajush AwasthiAmit Khaparde
Dec 2026
Artificial IntelligenceMachine LearningNatural Language Processing
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.
It is found that Llama 3 delivers comparable quality to leading language models such as GPT-4 on a plethora of tasks, and performs competitively with the state-of-the-art on image, video, and speech recognition tasks.
This paper investigates developing real-world perception for active agents, proposes Gibson Environment for this purpose, and showcases a set of perceptual tasks learned therein.
F. Xia, Amir Zamir, Zhi-Yang He et al.· 2018 IEEE/CVF Conference on...· 1,069 citations· ⚡112
This publication proposes a definition and a classification of agile software development approaches and analyses ten software development methods that can be characterized as being "agile" against the defined criterion.
P. Abrahamsson, O. Salo, Jussi Ronkainen et al.· arXiv.org· 727 citations· ⚡54
The results indicate that software engineering work practices are chosen opportunistically, adapted and configured to provide value under the constrains imposed by the startup context.
Nicolò Paternoster, Carmine Giardino, M. Unterkalmsteiner et al.· Information and Software Tec...· 394 citations· ⚡54
The possibility of inferring high-dimensional data inference in a model that consists of a prior and an auxiliary differentiable constraint given some additional information is considered, thereby allowing a range of potential applications in adapting models to new domains and tasks.
Alexandros Graikos, Esmeralda S. Whitammer, N. Jojic et al.· Neural Information Processin...· 316 citations· ⚡15
It is proved that any global minimizer of the trajectory balance objective can define a policy that samples exactly from the target distribution, and empirically demonstrate the benefits of the trajectories balance objective for GFlowNet convergence, diversity of generated samples, and robustness to long action sequenc...
Esmeralda S. Whitammer, Moksh Jain, Emmanuel Bengio et al.· Neural Information Processin...· 302 citations· ⚡60
Related blog posts
MIT News · Artificial Intelligence· news.mit.eduDec 1, 2026
The method uses large vision-language models to teach smaller models how to remember key details about a robot’s surroundings, making the machines more reactive and resourceful.
By studying the computational foundations of language learning, Associate Professor Jacob Andreas builds intelligent systems that can communicate effectively with humans.