Skip to content

Benchmarking Small Language Models for Legal Retrieval-Augmented Generation: Structural Validity, Citation Compliance, and Inference Efficiency

Bhavya Yajush Awasthi Amit Khaparde
Dec 2026
Artificial Intelligence Machine Learning Natural 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.

View source

Similar papers

#artificial intelligence Preprint Jul 2024

The Llama 3 Herd of Models

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.

Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri et al. · 21,082 citations · ⚡3,832
#artificial intelligence Conference Open access Jun 2018

Gibson Env: Real-World Perception for Embodied Agents

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. · 1,069 citations · ⚡112
#computer vision Review Sep 2017

Agile Software Development Methods: Review and Analysis

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. · 727 citations · ⚡54
#machine learning Review Open access Oct 2014

Software development in startup companies: A systematic mapping study

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. · 394 citations · ⚡54

Diffusion models as plug-and-play priors

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. · 316 citations · ⚡15

Trajectory Balance: Improved Credit Assignment in GFlowNets

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. · 302 citations · ⚡60

Related blog posts

MIT News · Artificial Intelligence Dec 1, 2026

A new form of memory helps robots learn complex skills

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.

MIT News · Artificial Intelligence Nov 17, 2026

Learning the language of machine learning

By studying the computational foundations of language learning, Associate Professor Jacob Andreas builds intelligent systems that can communicate effectively with humans.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.