Legal AI in Low-Resource Languages: Building and Evaluating QA Systems for the Kazakh Legislation
The research focuses on the development and evaluation of a legal question–answer system for the Kazakh language, a low-resource and morphologically complex language. Four datasets were compiled from open legal sources—Adilet, Zqai, Gov, and a manually created synthetic set—containing question–аnswer pairs extracted from official legislative documents and government portals. Seven large language models (GPT-4o mini, GEMMA, KazLLM, LLaMA, Phi, Qwen, and Mistral) were fine-tuned using structured prompt templates, quantization methods, and domain-specific training to enhance contextual understanding and efficiency. The evaluation employed both automatic metrics (ROUGE and METEOR) and expert-based manual assessment. GPT-4o mini achieved the highest overall performance, with ROUGE-1: 0.309, ROUGE-2: 0.175, ROUGE-L: 0.263, and METEOR: 0.320, and received an expert score of 3.96, indicating strong legal reasoning capabilities and adaptability to Kazakh legal contexts. The results highlight GPT-4o mini’s superiority over other tested models in both quantitative and qualitative evaluations. This work demonstrates the feasibility and importance of developing localized legal AI solutions for low-resource languages, contributing to improved legal accessibility, transparency, and digital governance in Kazakhstan.
Authors
- Vladislav Karyukin (ORCID: https://orcid.org/0000-0002-8768-0349)
- R.R. Aliyev (ORCID: https://orcid.org/0009-0003-5432-0480)
- A. Sarsenbayeva
- Diana Rakhimova (ORCID: https://orcid.org/0000-0003-1427-198X)
- Assem Turarbek
Institutions
- Al-Farabi Kazakh National University (KZ)
- Institute of Information and Computational Technologies (KZ)
Publication Details
- Journal
- Computers
- Published
- 2025-08-27
- DOI
- https://doi.org/10.3390/computers14090354
- Primary Topic
- Artificial Intelligence in Law
- Type
- article
- Field-Weighted Citation Impact
- 0.00