Large language models (LLMs) can answer religious knowledge queries fluently, yet they often hallucinate and misattribute sources, which is especially consequential in Islamic settings where users expect grounding in canonical texts (Qur'an and Hadith) and jurisprudential (fiqh) nuance. Retrieval-augmented generation (RAG) improves grounding, however, a single retrieve-then-generate pipeline is insufficient for diverse Islamic queries, including verbatim scripture, citation-grounded guidance, and rule-constrained computations such as zakat and inheritance. To address these challenges, we present Fanar-Sadiq, a bilingual Arabic-English Islamic QA system built on a multi-agent, tool-augmented architecture. It is a core component of the Fanar AI platform. Fanar-Sadiq routes Islamic queries to specialized modules within an agentic tool architecture. It supports intent-aware routing, retrieval-grounded fiqh answers with normalized citations and verification traces, exact verse lookup with quotation validation, and deterministic Sunni zakat and inheritance calculators with madhhab-sensitive branching. We evaluate the end-to-end system on public Islamic QA benchmarks and show strong effectiveness and efficiency. It is publicly accessible through an API and Web application and has received over 1.9M accesses in less than a year (https://api.fanar.qa/docs).
Figure 2: Our multi-agent architecture . A hybrid query classifier selects among (i) tool calls, (ii) deterministic calculation, (iii) document-grounded retrieval QA, and (iv) Quranic retrieval routes, before assembling the final response with references.
Work
Calc.
Quran
NL2SQL
Evidence
Tools
Ours (Fig. 2 )
✓
✓
✓
✓
✓
Karpas et al. (2022) (MRKL)
✗
✗
✗
✓
✓
Yao et al. (2023) (ReAct)
✗
✗
✗
✓
✓
Schick et al. (2023) (Toolformer)
✗
✗
✗
✓
✓
Asai et al. (2024) (Self-RAG)
✗
✗
✗
✓
✗
Yan et al. (2024) (CRAG)
✗
✗
✗
✓
✗
Table 1: Comparison against widely-recognized tool/agent/RAG architectures. Calc. refers to explicit rule engines. Quran denotes verse-anchored retrieval distinct from generic document search.
Dataset (Ref.)
Format
Lang
Size
Metric(s)
PalmX ( Alwajih et al., 2025 )
MCQ
ar
1,000
Acc
QIAS (T1) ( Bouchekif et al., 2025 )
MCQ
ar
1,000
Acc
IslamTrust ( Lahmar et al., 2025 )
MCQ
ar+en
406
Acc
IslamicFaithQA ( Bhatia et al., 2026b )
GenQA
ar+en
3,810
Acc (LLM-J)
FatwaQA ( SahmBenchmark, 2025 )
GenQA
ar
2,000
Acc (LLM-J)
Table 2: Evaluation datasets used in this work. Lang: ar =Arabic, en =English. GenQA: generative question answering. LLM-J: LLM-judge.
Dataset
GPT-4.1
GPT-5
G3-F
G3-P
ALLaM
Fanar
Ours
PalmX
52.9
82.3
81.2
84.4
45.5
72.5
85.5
QIAS T1
89.2
93.0
91.5
94.5
52.4
63.5
72.2
IslamTrust
94.7
95.2
94.8
95.6
57.4
83.2
94.2
IslamicFaithQA
41.4
51.2
53.4
56.6
42.7
48.2
65.4
FatwaQA
32.3
63.6
54.6
67.0
31.5
44.5
65.1
Average
62.1
77.1
75.1
79.6
45.9
62.4
76.5
Table 3: Accuracy (%) across benchmarks. G3-F: Gemini-3-Flash, G3-P: Gemini-3-Pro.
Table 6: Prayer time calculation methods and their angular parameters. The Fajr angle determines when morning twilight begins, while the Isha angle marks when evening twilight ends.
Figure 3: Inheritance calculation workflow. Disputed cases return parallel outcomes instead of collapsing to a single ruling.
Heir
Conditions
Share
Husband
No children
1/2
Husband
Has children
1/4
Wife
No children
1/4
Wife
Has children
1/8
Father
Has children/grandchildren
1/6
Mother
Has children/grandchildren
1/6
Appendix
Table 7: Representative fixed share (Fard) allocations from Quranic specifications.
Fanar
NL2SQL
Task
N
Correct
Wrong
Total
Acc
Correct
Wrong
Total
Acc
Analytical/Retrieval
0
39
23
62
62.90
62
0
62
100.00
Analytical/Retrieval
1
50
12
62
80.65
62
0
62
100.00
Analytical/Retrieval
5
59
3
62
95.16
62
0
62
100.00
Counting
0
38
36
74
51.35
57
17
74
77.03
Counting
1
59
15
74
79.73
66
8
74
89.19
Appendix
Table 8: Execution-based benchmark accuracy (%) comparing Fanar (with thinking) vs. the specialized NL2SQL model on queries sampled from Fanar usage logs. Totals: analytical/retrieval n=62 , counting n=74 .
Question answering studies how AI systems interpret questions and produce accurate, evidence-grounded answers across text, dialogue, and multimodal data.