Post-Training Large Language Models for Grounded, Safe, and Jurisdiction-Specific Legal Reasoning
Large Language Models (LLMs) demonstrate strong general-purpose reasoning and text generation capabilities, yet their direct deployment in high-stakes legal domains is constrained by hallucinations, weak jurisdictional grounding, and limited safety guarantees. Prompt engineering alone often saturates for complex, long-context legal workflows. We present a post-training framework for adapting pretrained LLMs into grounded and safe legal reasoning systems, instantiated through Legalify, an AI assistant tailored for the Indian legal system. The system integrates parameter-efficient fine-tuning using Low-Rank Adaptation (LoRA), retrieval-augmented generation (RAG) over verified Indian statutory texts, and reinforcement learning from AI feedback guided by explicit safety constraints. Legalify employs a three-layer architecture consisting of retrieval, reasoning, and drafting stages to enforce factual grounding and structured legal output. Empirical evaluation across legal drafting, procedural guidance, and safety-critical queries demonstrates substantial reductions in hallucinations and jurisdictional errors compared to prompt-based baselines, while achieving near-paralegal quality at significantly lower cost and latency. Our results highlight post-training as a necessary step for deploying reliable, domain-restricted legal AI system
Paper
The full text of this publication is not hosted on 44B due to licensing.
Read it at OpenAlex