AI Papers Reader

Personalized digests of latest AI research

View on GitHub

Beyond Hallucinations: New AI Architecture Delivers Precision to Islamic Knowledge

Large language models (LLMs) are famously fluent, but they have a “truth” problem. When asked about complex topics, they often “hallucinate”—confidently stating facts that are entirely fabricated. In many fields, this is a nuisance; in the context of religious scholarship, where a single misquoted verse or a miscalculated inheritance share can have profound legal and spiritual implications, it is a crisis of reliability.

Researchers at the Qatar Computing Research Institute (QCRI) have developed a solution: Fanar-Sadiq, a bilingual (Arabic and English) multi-agent architecture designed to provide grounded, verified answers to Islamic queries. Rather than relying on a single AI to “guess” an answer based on its training data, Fanar-Sadiq acts as a sophisticated switchboard, routing questions to specialized “agents” and deterministic tools.

The Power of Specialized Agents

The core innovation of Fanar-Sadiq is its move away from a “one-size-fits-all” approach. When a user asks a question, a hybrid query classifier identifies the “intent” behind the prompt. Is the user asking for a spiritual reflection, a specific Quranic verse, or a mathematical calculation for alms?

To understand how this works, consider three distinct scenarios:

  1. The “Math” Problem (Zakat and Inheritance): If a user asks, “I have $10,000 in cash and $2,000 in debt; how much Zakat do I owe?”, a standard AI might struggle with the arithmetic or the specific thresholds (nisab). Fanar-Sadiq routes this to a deterministic calculator. This agent follows hard-coded Shariah-mandated formulas and current precious-metal prices to provide a mathematically perfect answer, complete with a breakdown of the logic used.
  2. The “Search” Problem (Quranic Retrieval): If a user asks, “How many verses in the Quran mention patience?”, a typical LLM might give an approximate or incorrect number. Fanar-Sadiq uses a tool called NL2SQL, which translates the natural language question into a database query. It searches a verified, structured database of the Quran to return an exact count and a list of specific, verbatim verses, eliminating the risk of “paraphrase drift.”
  3. The “Legal” Problem (Fiqh Rulings): For questions about Islamic jurisprudence, such as rulings on modern finance, the system uses Retrieval-Augmented Generation (RAG). It searches a curated library of over 500,000 authoritative documents. Crucially, the system attaches “traceable citations” to every claim, allowing the user to click through to the original source text for verification.

Performance and Real-World Impact

The researchers evaluated Fanar-Sadiq against some of the world’s most powerful AI models, including GPT-5 and Gemini-3-Pro. In specialized benchmarks like IslamicFaithQA and PalmX, Fanar-Sadiq consistently outperformed these general-purpose models. It achieved an average accuracy of 76.5% across five major benchmarks, showing particular strength in “faithfulness”—the ability to stay true to source texts without faking information.

The system is more than just a lab experiment. It is currently a core component of the Fanar AI platform, where it has already handled approximately 1.9 million queries in less than a year.

By deconstructing the “black box” of AI and replacing it with a transparent team of specialists, Fanar-Sadiq provides a blueprint for how technology can respect the integrity of sensitive, high-stakes knowledge. It suggests that the future of reliable AI lies not in making models bigger, but in making them more disciplined.