Legal Aligner: Transforming Generic LLMs into Domain Experts for Enhanced Accuracy
Discuss this preprint
Start a discussion What are Sciety discussions?Listed in
This article is not in any list yet, why not save it to one of your lists.Abstract
Large Language Models (LLMs) demonstrate strong general-purpose capabilities but often underperform in specialized domains such as law, where jurisdiction-specific and long-tail knowledge is critical. Existing domain adaptation methods, particularly supervised fine-tuning, are computationally expensive, vulnerable to catastrophic forgetting, and infeasible for proprietary black-box models. We propose \textbf{Legal Aligner}, a lightweight, parameter-agnostic post-hoc refinement framework that enhances legal factuality without modifying upstream model weights. Acting as a plug-and-play correction layer, Legal Aligner identifies and rectifies unsupported doctrinal claims, jurisdictional inconsistencies, and citation errors in generated legal responses. We evaluate Legal Aligner on a curated Hong Kong legal consultation dataset across eight upstream LLMs, including both open-source and proprietary models. Results show consistent improvements in factual reliability, with gains of up to 14.9 percentage points in Factuality Coverage Score and a 58.9 Our findings demonstrate that output-level alignment offers a scalable and maintainable alternative to parameter-level adaptation for high-stakes legal AI systems, particularly in jurisdictions underrepresented in large-scale pretraining corpora.