A legal AI development team in Qatar needed to build a fine-tuned Arabic language legal assistant that could understand Qatari laws and court decisions, reason through complex legal scenarios, and provide answers with precise legal citations in Modern Standard Arabic. Existing base models lacked jurisdiction-specific legal accuracy and citation handling, limiting their usability for professional legal workflows.
We designed and fine-tuned a 70B-parameter DeepSeek LLM using Low-Rank Adaptation (LoRA) techniques on a 60K Q&A dataset of Qatari legal content. The AI was trained to interpret laws, match queries with accurate legal provisions, and provide structured outputs including verbatim citations, law numbers, and multi-step reasoning. The system was benchmarked against DeepSeek R1 and achieved superior legal accuracy, coherence, and citation fidelity.
The fine-tuned model demonstrated over 85% legal accuracy on a stratified test set spanning contract, corporate, and labor law. Human validation by a panel of lawyers confirmed high-quality responses with correct legal basis. The system met a <3s inference latency requirement and is now deployable as an API, ready to be scaled across other MENA jurisdictions using the same methodology.
Stack
2 months