Results demonstrate that integrating a rule-based virtual legal assistant with contrastive retrieval and preference optimization provides an effective and computationally efficient strategy for aligning the legal reasoning capabilities of small language models, offering a scalable solution for legal question answering in specialized low-resource environments.
Abstract
Deploying pre-trained language models for question answering in specialized low-resource legal domains remains challenging due to the scarcity of expert-annotated data, the complexity of legal reasoning, and limited computational resources. Existing retrieval-augmented generation approaches improve factual grounding but often fail to preserve logically consistent legal reasoning when retrieved evidence is noisy, while reinforcement learning-based alignment methods incur substantial computational costs. This study proposes an automated end-to-end framework that integrates contrastive retrieval with context-aware preference alignment to enhance the legal reasoning performance of small language models. The framework employs an evolutionary instruction-tuning methodology to systematically mutate seed statutes, generating a diverse synthetic corpus conditioned on structural legal reasoning to address data scarcity. We introduce a multi-objective rule-based reward model that functions as a virtual legal assistant by jointly evaluating logical entailment and statutory faithfulness. The resulting reward scores are used to automatically construct preference pairs for Context Direct Preference Optimization, enabling efficient policy alignment while substantially reducing the need for costly human annotation. The proposed framework is evaluated on a comprehensive benchmark comprising expert-validated queries derived from the Vietnamese Civil Code. Experimental results demonstrate consistent improvements across all evaluated baselines, achieving a 13.5% relative improvement in citation error rates over the strongest standard DPO baseline, while also demonstrating a 66% reduction compared to zero-shot prompting. The proposed framework further achieves superior performance in logical faithfulness (0.79), answer relevance (0.85), semantic similarity (0.855), and expert human evaluation (4.5/5). These findings demonstrate that integrating a rule-based virtual legal assistant with contrastive retrieval and preference optimization provides an effective and computationally efficient strategy for aligning the legal reasoning capabilities of small language models, offering a scalable solution for legal question answering in specialized low-resource environments.
This work proposes NeSy-RAG, a modular neuro-symbolic RAG framework that synthesizes attributable Prolog modules from retrieved text chunks that introduces a symbolic knowledge-gap detection mechanism that identifies missing user facts whose truth values affect the query outcome and automatically triggers follow-up int...
This framework proposes a context-editing framework that performs selective abstraction over entities that appear in both the context and the question, establishing symbolic abstraction as a highly cost-efficient solution for ensuring context fidelity in LLMs.
Rounak Sharma, Debabrata Mahapatra, S. Saini· Annual International ACM SIG...· 0 citations
Experimental results on CAIL2018 demonstrate that legal-oriented adaptation based on DRAGIN improves retrieval-augmented reasoning in this Chinese legal judgment prediction setting while maintaining low retrieval overhead.
This work develops an approach that transfers reliable numerical reasoning from a large teacher model to a compact student using execution-verified Python programs instead of free-form textual rationales, and introduces an iterative recovery stage that revisits teacher-failed examples, enabling the student to recover a...
This work compares Proximal Policy Optimization (PPO), Direct Preference Optimization (DPO), and Odds Ratio Preference Optimization (ORPO) using a novel reward modeling approach based on execution and semantic principles, revealing that while standard PPO suffers from reward sparsity and catastrophic collapse on 7B mod...
Noah Hampp, Katya Mirylenka, Michael R. Glass· Swiss Text Analytics Confere...· 1 citation
The results show that the quality of small ``base'' models can be greatly enhanced, and that reinforcement learning with verifiable rewards can be applied to NMT in the legal domain and surpasses the translation quality of supervised fine-tuning.
Aixiu An, Michael Jungo, Eloi Eynard et al.· arXiv.org· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.