← Latest papers
💬 NLP

CVPD at QIAS 2026: RAG-Guided LLM Reasoning for Al-Mawarith Share Computation and Heir Allocation

The paper presents a retrieval-augmented generation (RAG) pipeline that combines rule-grounded synthetic data, hybrid retrieval with cross-encoder reranking, and schema-constrained validation to achieve state-of-the-art performance in computing Islamic inheritance shares and allocating them to heirs, securing first place on the QIAS 2026 leaderboard.

Original authors: Wassim Swaileh, Mohammed-En-Nadhir Zighem, Hichem Telli, Salah Eddine Bekhouche, Abdellah Zakaria Sellam, Fadi Dornaika, Dimitrios Kotzinos

Published 2026-03-26
📖 5 min read🧠 Deep dive

Original authors: Wassim Swaileh, Mohammed-En-Nadhir Zighem, Hichem Telli, Salah Eddine Bekhouche, Abdellah Zakaria Sellam, Fadi Dornaika, Dimitrios Kotzinos

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Problem: The "Mathy" Family Recipe

Imagine a family gathering where a grandfather passes away. There are 20 relatives showing up, all claiming a piece of the pie. But there's a catch: Islamic Inheritance Law isn't just about splitting the pie equally. It's a incredibly complex, multi-step recipe.

  1. Who gets in? (Some relatives are blocked from inheriting if a closer relative is present).
  2. Who gets a fixed slice? (Wives, parents, and daughters have specific, unchangeable percentages).
  3. Who gets the leftovers? (The rest goes to sons or brothers).
  4. The "Math Glitch": Sometimes the fixed slices add up to more than 100% (the pie is too small), or less than 100% (there's extra pie left over). The law has special rules to fix these math errors.

The challenge for computers is that this isn't just "reading" a story; it's solving a logic puzzle where one tiny mistake in the math or the rules ruins the whole answer.

The Solution: The "Super Librarian" + The "Strict Editor"

The team (CVPD) built a system to win a competition called QIAS 2026. They didn't just train a robot to "guess" the answer. Instead, they built a three-part team:

1. The Synthetic Chef (The Data Generator)

Before teaching the robot, they realized they needed more practice problems than existed in the real world.

  • The Analogy: Imagine a chef who doesn't just cook real meals but uses a computer to generate 100,000 fake but perfect recipes.
  • What they did: They wrote a strict computer program (a "Symbolic Calculator") that followed the exact legal rules to create fake family scenarios and their perfect solutions. This gave the AI a massive library of "correct answers" to learn from, ensuring it understood the math perfectly before it ever tried to speak.

2. The Super Librarian (The RAG System)

When the AI gets a real question, it doesn't just rely on its memory. It acts like a Super Librarian.

  • The Analogy: If you ask a normal librarian a question, they might guess based on what they remember. If you ask the Super Librarian, they instantly run to the shelves, pull out the top 5 most relevant books, and hand them to you to read before answering.
  • How it worked: The system used two search methods (one for the meaning of words and one for the exact words) to find the most similar past cases in their library. It then used a "Cross-Encoder" (a smart filter) to pick the absolute best examples to show the AI. This ensures the AI is looking at the right "precedents" before it speaks.

3. The Strict Editor (The Validator)

This is the secret sauce. Even the smartest AI can get sloppy. It might forget a comma, miss a name, or make the math add up to 101%.

  • The Analogy: Imagine a strict editor who refuses to print a newspaper unless every headline fits the template, every number adds up to exactly 100%, and every name is spelled correctly. If the AI makes a mistake, the editor fixes it or rejects it.
  • What they did: They built a "safety net" that checks the AI's output against a rigid checklist. Did it list all the heirs? Is the math right? Is the format correct? If not, it fixes it automatically.

The Result: Winning the Race

The competition (QIAS 2026) was like the Olympics for legal AI.

  • The Score: They scored 0.935 (out of 1.0).
  • The Ranking: They took 1st Place.
  • Why they won: Other teams tried to make the AI "smarter" by using bigger models. The winning team realized that reliability matters more than raw intelligence. By giving the AI a library of perfect examples (Retrieval) and a strict editor to check its homework (Validation), they solved the problem better than anyone else.

The "Aha!" Moments (Key Takeaways)

  1. Don't trust the "Web": When the team tested searching the open internet for answers, the AI got confused by bad info. Searching their own curated, perfect PDFs (the "Super Librarian" with only good books) worked 100% better.
  2. The "Math" is harder than the "Language": The AI was great at understanding Arabic words. The problem was the logic. The errors weren't because the AI didn't know the language; it was because it got the math or the blocking rules wrong.
  3. Engineering > Magic: You don't need a "magic" AI that knows everything. You need a well-oiled machine that checks its work, uses the right references, and follows the rules strictly.

In a Nutshell

The team didn't just build a smart robot; they built a robot with a reference manual and a strict boss. By combining a massive library of perfect legal examples with a system that double-checks the math, they became the world's best at solving Islamic inheritance puzzles.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →