[Paper] Fanar-Sadiq: A Multi-Agent Architecture for Grounded Islamic QA
Source: arXiv - 2603.08501v1
Overview
The paper introduces Fanar‑Sadiq, a bilingual (Arabic/English) multi‑agent system that answers Islamic questions with solid grounding in the Qur’an, Hadith, and fiqh rulings. By combining intent‑aware routing, retrieval‑augmented generation, and deterministic calculators, the platform delivers citations, verse quotations, and legally‑correct computations for tasks like zakat and inheritance—addressing the hallucination problem that plagues generic LLMs.
Key Contributions
- Multi‑agent architecture that dispatches queries to specialized modules (verse lookup, fiqh reasoning, arithmetic calculators) instead of a single “retrieve‑then‑generate” pipeline.
- Intent‑aware routing that automatically detects the user’s request type (e.g., citation‑based answer, exact verse, zakat calculation) and selects the appropriate agent.
- Deterministic citation normalization & verification: every generated answer is accompanied by a traceable reference to canonical sources, with automated checks for quote fidelity.
- Madhhab‑sensitive calculators for Sunni zakat and inheritance, implementing rule‑based branching to respect the four major schools of thought.
- Bilingual support (Arabic & English) with seamless cross‑language retrieval, enabling developers to build multilingual Islamic assistants.
- Open‑access API & web UI that have already handled ~1.9 M requests in under a year, demonstrating real‑world scalability.
Methodology
- Query Classification – A lightweight classifier (fine‑tuned on a curated Islamic QA dataset) predicts the user’s intent: verse lookup, fiqh answer, numeric computation, or general knowledge.
- Agent Dispatch – Based on the intent, the system routes the request to one of several agents:
- Retriever‑Generator Agent: pulls relevant passages from a curated Qur’an/Hadith/fiqh corpus, then uses a constrained LLM to synthesize a grounded answer.
- Exact‑Verse Agent: performs deterministic keyword/semantic search to fetch the exact verse, validates the retrieved text against a canonical database, and returns it verbatim.
- Calculator Agent: executes rule‑based arithmetic (e.g., zakat rates, inheritance shares) using a deterministic engine that branches according to the selected madhhab.
- Citation Normalization – Retrieved references are canonicalized (e.g., “Surah 2:255”) and cross‑checked with a verification module that flags mismatches before the final response is sent.
- Response Assembly – The selected agent’s output is packaged with a human‑readable explanation, citation list, and, when applicable, a computation trace.
- Evaluation – The end‑to‑end pipeline is benchmarked on public Islamic QA datasets (e.g., Qur’anQA, HadithQA) and measured for accuracy, citation correctness, and latency.
Results & Findings
| Metric | Retrieval‑Grounded QA | Exact‑Verse Lookup | Zakat/Inheritance Calculator |
|---|---|---|---|
| Exact Match Accuracy | 84.2 % (↑ 12 % vs. vanilla RAG) | 99.6 % (near‑perfect) | 98.9 % (legal‑rule compliance) |
| Citation Correctness | 92 % of answers include verifiable sources | 100 % (validated against canonical DB) | N/A |
| Latency (avg.) | 1.8 s per query | 0.6 s | 0.9 s |
| User Satisfaction (pilot study) | 4.5 / 5 | 4.8 / 5 | 4.6 / 5 |
The multi‑agent design outperformed a monolithic RAG baseline across all dimensions, especially in citation reliability and arithmetic precision—critical for religious compliance.
Practical Implications
- Developer‑ready Islamic Assistant: The public API lets developers embed a trustworthy Islamic Q&A component into chatbots, educational apps, or voice assistants without building the complex retrieval and legal‑logic pipelines themselves.
- Reduced Legal Risk: By guaranteeing source attribution and mathematically correct zakat/inheritance calculations, organizations (e.g., fintech platforms serving Muslim markets) can avoid costly mis‑guidance.
- Multilingual Content Creation: Content teams can generate bilingual explanations for sermons, study guides, or social media posts, leveraging the system’s cross‑language grounding.
- Scalable Knowledge Bases: The architecture demonstrates how to combine LLM fluency with rule‑based determinism, a pattern that can be replicated for other domains requiring strict compliance (e.g., medical guidelines, financial regulations).
- Community Trust: Transparent citation trails and deterministic outputs foster user confidence—essential for religious contexts where misinformation can have serious social repercussions.
Limitations & Future Work
- Scope to Sunni Schools: The current calculators only cover the four major Sunni madhhabs; Shia jurisprudence and other sects are not yet supported.
- Corpus Coverage: While the curated corpus is extensive, rare or esoteric texts (e.g., classical tafsir) may be missing, limiting answer depth for scholarly queries.
- Dynamic Updates: Adding new fatwas or legal opinions requires manual curation; future work aims to integrate semi‑automated ingestion pipelines.
- Explainability: Although citations are provided, the internal reasoning of the LLM‑based fiqh agent remains a black box; plans include integrating chain‑of‑thought prompting to surface intermediate logic.
By addressing these gaps, the authors hope to evolve Fanar‑Sadiq into a truly universal, legally‑sound Islamic AI assistant.
Authors
- Ummar Abbas
- Mourad Ouzzani
- Mohamed Y. Eltabakh
- Omar Sinan
- Gagan Bhatia
- Hamdy Mubarak
- Majd Hawasly
- Mohammed Qusay Hashim
- Kareem Darwish
- Firoj Alam
Paper Information
- arXiv ID: 2603.08501v1
- Categories: cs.CL
- Published: March 9, 2026
- PDF: Download PDF