VietLegalLM: Progressive Legal Expertise Through Synthetic Comprehension and Reinforcement Learning
Legal AI systems require accuracy and verifiable reasoning, yet under-resourced languages lack the specialized models needed to meet these standards. This challenge is particularly acute for statute-based civil law systems like Vietnam’s, where the core task is interpreting and applying codified statutes rather than matching legal precedents. We address this gap by introducing a comprehensive framework for developing reliable legal AI under resource constraints. First, we present vilaw-bench, a novel evaluation benchmark tailored for Vietnamese statute-based legal reasoning that assesses cognitive abilities from basic knowledge retrieval to complex legal interpretation. Second, we propose a multi-stage training framework that progressively builds legal expertise through four phases: focused foundational learning on core legal texts, intensive comprehension practice using large-scale synthetic question-answer data, targeted skill acquisition through supervised fine-tuning, and response quality refinement using Group Relative Policy Optimization (GRPO). We implement this framework to develop VietLegalLM, training on Qwen3-1.7B-Base and Qwen3-4B-Base models. Our systematic evaluation reveals that synthetic comprehension practice produces the largest single-phase improvements in legal reasoning capabilities, while GRPO efficiently refines reasoning structure with minimal training steps. The complete sequential training approach achieves significant performance gains on vilaw-bench compared with baseline models. Our ablation studies demonstrate that practitioners can make informed tradeoffs between comprehensive training and computational efficiency: direct GRPO after pre-training offers a viable alternative to full instruction tuning when resources are limited. We release vilaw-bench, VietLegalLM, and our training framework as open-source resources, providing a reproducible roadmap for developing legal AI in other under-resourced, statute-based legal systems.