MorAI at QIAS 2025: Collaborative LLM via Voting and Retrieval-Augmented Generation for Solving Complex Inheritance Problems
Paper · 2025 · Jihad R'baiti, Chouaib El Hachimi, Youssef Hmamouche et al.
Summary
This paper targets the first subtask of QIAS 2025, a shared-task competition in which systems must answer Arabic multiple-choice questions on Islamic inheritance law. Each heir's share follows from fixed legal rules plus exact arithmetic, and a small change in family composition can change the whole outcome. The authors pair retrieval with a multi-model ensemble. About 3,065 solved inheritance fatwas from IslamWeb, stored as JSON, are indexed with TF-IDF. For each question, the three closest cases by cosine similarity are added to the prompt. Three models then each choose one letter from A–F:
- a LoRA-fine-tuned ALLaM-7B-Instruct-preview,
- Gemini-2.5-Flash,
- Deepseek-reasoner.
The majority answer wins, and Gemini decides when all three disagree. The ensemble reached 88.00% accuracy, above its strongest member (Gemini-2.5-Flash with RAG, 83.50%), and ranked 5th in the subtask. The results suggest that for rule-heavy legal reasoning, plain lexical retrieval and voting across diverse models can outperform single models and neural retrieval.
Key points
- The task data has roughly 20,000 training, 1,000 validation and 1,000 test MCQs, derived from IslamWeb fatwas and reviewed by four experts. Each question has six options and three difficulty levels (beginner, intermediate, advanced).
- Accuracy of the submitted runs:
- Fanar-1-9B: 36.10%
- base ALLaM-7B-Instruct-preview: 26.50%
- fine-tuned ALLaM: 79.50%
- Deepseek-chat: 50.90%
- Qwen3-1.7B with RAG: 26.10%
- Gemini-2.5-Flash: 78.10% (83.50% with RAG)
- Deepseek-reasoner with RAG: 71.80%
- collaborative voting: 88.00%
- Retrieval settings were compared over k ∈ {3, 5, 7} and TF-IDF vs. neural embeddings. TF-IDF with k=3 was chosen as the best trade-off of accuracy, prompt length and compute.
- ALLaM was fine-tuned with LoRA (r=8, alpha=16, dropout 0.05) for 300 steps at learning rate 5e-5. Output was capped at 20 new tokens.
- The prompt forces a single English letter with no explanation. When the three voters disagree, the system falls back to Gemini, which the authors admit makes the ensemble less neutral. They propose accuracy-weighted voting as future work.
Interesting ideas
- I1. Fetching a few already-solved cases by simple keyword overlap beat semantic embeddings on rule-governed problems, likely because exact terms (heir types, kinship words) carry the decisive signal.
- I2. Voting across heterogeneous models with a designated tie-breaker makes the ensemble robust, but the authors note the tie-breaker biases it and suggest weighting each voter by measured accuracy.
- I3. Forcing the model to emit exactly one letter from a stated set, with a tiny token budget, makes scoring trivial and removes parsing noise from evaluation.
- I4. Reporting every submission separately (base model, fine-tuned, zero-shot, with RAG, ensemble) shows how much each component adds.
For Mova
How these ideas could serve Mova, our small open language model — its files, stages and tests:
- I1 (answer): A maths word-problem solver could retrieve previously solved problems that share exact quantity and relation words, and use their worked frame structures as templates rather than fuzzy look-alikes.
- I2 (learn): Silver-data agreement among witness parsers could weight each parser's vote by its held-out LAS, and flag three-way splits as low-confidence instead of silently trusting one parser.
- I3 (learn): When an LLM teacher tier labels test items, a strict closed answer set and short output keep teacher labels machine-checkable and cheap to compare against Mova's own answers.
- I4 (learn): Evaluations could present a similar ladder (e.g., bare parser, plus repair rules, plus witness agreement) so each stage's contribution is visible next to negative controls.
Institutions
Fields, topics and concepts
📚 Shelves 6The field of science this work belongs to (OpenAlex fields).Computer Science · 16,667 worksArtificial Intelligence · 16,194 worksArts and Humanities · 16,039 worksLanguage and Linguistics · 15,891 worksSocial Sciences · 1,772 worksPolitical Science and International Relations · 182 works
🧭 Topics 3Research subjects and languages the work is about.Language models & pretraining · 3,320 worksSemitic languages · 2,908 worksInformation retrieval & search · 473 works
Cite
Cite as Jihad R'baiti, Chouaib El Hachimi, Youssef Hmamouche and Amal El Fallah Seghrouchni. 2025. MorAI at QIAS 2025: Collaborative LLM via Voting and Retrieval-Augmented Generation for Solving Complex Inheritance Problems. Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks.
@inproceedings{rbaiti2025morai,
title = {{MorAI at QIAS 2025: Collaborative LLM via Voting and Retrieval-Augmented Generation for Solving Complex Inheritance Problems}},
author = {Jihad R'baiti, Chouaib {El Hachimi}, Youssef Hmamouche and Amal {El Fallah Seghrouchni}},
booktitle = {Proceedings of The Third Arabic Natural Language Processing Conference: Shared Tasks},
year = {2025},
doi = {10.18653/v1/2025.arabicnlp-sharedtasks.131},
url = {https://doi.org/10.18653/v1/2025.arabicnlp-sharedtasks.131}
}References
- Josh Achiam, Steven Adler, Sandhini Agarwal, Lama Ahmad, Ilge Akkaya, Florencia Leoni Aleman, Diogo Almeida, Janko Altenschmidt, Sam Altman, Shyamal Anadkat, and 1 others. 2023. Gpt-4 technical report. arXiv preprint arXiv:2303.08774. ↗
- Alaa N Akkila and Samy S Abu Naser. 2016. Proposed expert system for calculating inheritance in islam. find
- Abdessalam Bouchekif, Samer Rashwani, Mohammed Ghaly, Mutaz Al-Khatib, Emad Mohamed, Wajdi Zaghouani, Heba Sbahi, Shahd Gaben, and Aiman Erbad. 2025a. Qias 2025: Overview of the shared task on islamic inheritance reasoning and knowledge assessment. In Proceedings of The Third Arabic Natural Language Processing Conference, ArabicNLP 2025, Suzhou, China, November 5–9, 2025. Association for Computational Linguistics.
- Abdessalam Bouchekif, Samer Rashwani, Heba Sbahi, Shahd Gaben, Mutaz Al-Khatib, and Mohammed Ghaly. 2025b. Assessing large language models on islamic legal reasoning: Evidence from inheritance law evaluation. In Proceedings of The Third Arabic Natural Language Processing Conference (Arabic-NLP 2025), Suzhou, China. Association for Computational Linguistics.
- Gheorghe Comanici, Eric Bieber, Mike Schaekermann, Ice Pasupat, Noveen Sachdeva, Inderjit Dhillon, Marcel Blistein, Ori Ram, Dan Zhang, Evan Rosen, and 1 others. 2025. Gemini 2.5: Pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities. arXiv preprint arXiv:2507.06261. ↗
- Anastasiia Demidova, Hanin Atwany, Nour Rabih, and Sanad Sha’ban. 2024. Arabic train at nadi 2024 shared task: Llms’ ability to translate arabic dialects into modern standard arabic. In Proceedings of The Second Arabic Natural Language Processing Conference, pages 729–734.
- Md Saef Ullah Miah, Md Mohsin Kabir, Talha Bin Sarwar, Mejdl Safran, Sultan Alfarhood, and MF Mridha. 2024. A multimodal approach to cross-lingual sentiment analysis with ensemble of transformer and llm. Scientific Reports, 14(1):9603. ↗
- Marryam Yahya Mohammed, Sama Ayman Ali, Salma Khaled Ali, Ayad Abdul Majeed, and Ensaf Hussein Mohamed. 2025. Aftina: enhancing stability and preventing hallucination in ai-based islamic fatwa generation using llms and rag. Neural Computing and Applications, pages 1–26. ↗
- Karan Singhal, Tao Tu, Juraj Gottweis, Rory Sayres, Ellery Wulczyn, Mohamed Amin, Le Hou, Kevin Clark, Stephen R Pfohl, Heather Cole-Lewis, and 1 others. 2025. Toward expert-level medical question answering with large language models. Nature Medicine, 31(3):943–950. find
- Fanar Team, Ummar Abbas, Mohammad Shahmeer Ahmad, Firoj Alam, Enes Altinisik, Ehsannedin Asgari, Yazan Boshmaf, Sabri Boughorbel, Sanjay Chawla, Shammur Chowdhury, and 1 others. 2025. Fanar: An arabic-centric multimodal generative ai platform. arXiv preprint arXiv:2501.13944. ↗
Updated
This page in Markdown → https://md.research.elamur.ai/free/en/papers/baiti-2025-morai-qias-2025-collaborative-llm/