From RAG to Agentic RAG for Faithful Islamic Question Answering

Gagan Bhatia, Hamdy Mubarak, Mustafa Jarrar, George Mikros, Fadi Zaraket, Mahmoud Alhirthani, Mutaz Al-Khatib, Logan Cochrane, Kareem Darwish, Rashid Yahiaoui, Firoj Alam

TL;DR

Large Language Models (LLMs) often struggle with factual accuracy and hallucination in high-stakes domains like Islamic question answering, where incorrect answers can carry serious religious consequences. This paper introduces ISLAMICFAITHQA, a new generative bilingual benchmark designed to strictly measure hallucination and abstention, alongside an Agentic RAG framework that uses iterative tool calls to search and verify Quranic evidence. The proposed agentic approach significantly improves correctness, reduces hallucinations, and closes the performance gap between Arabic and English queries.

What Problem Does This Paper Address?

Islamic question answering (QA) is deeply rooted in jurisprudential reasoning (fiqh), school-of-thought conventions, and canonical texts. When LLMs generate ungrounded or hallucinated answers in this domain, the real-world consequences can be severe.

Existing evaluations rely heavily on Multiple Choice Questions (MCQ) or Machine Reading Comprehension (MRC) formats. These formats allow models to guess correctly by exploiting superficial cues without true text-grounded understanding. Crucially, they fail to evaluate whether a model can safely abstain from answering when evidence is insufficient. Furthermore, current multilingual LLMs exhibit a significant performance disparity between Arabic and English queries, failing to maintain robust cross-lingual consistency when handling sacred texts.

Methods

The authors propose an end-to-end pipeline to build and evaluate faithful Islamic QA models:

  1. Supervised Fine-Tuning (SFT): The authors fine-tune baseline models on text-grounded reasoning pairs to improve multi-step logical coherence and domain-specific knowledge.
  2. Reward-Guided Alignment (RL): Using Group Relative Policy Optimization (GRPO) loss with an LLM-as-a-judge reward signal, the models are optimized to favor concise, accurate answers and penalize ungrounded or overly verbose claims.
  3. Agentic RAG: While standard RAG performs a single, static retrieval step before generation, the proposed Agentic RAG framework turns retrieval into an active, multi-turn decision process. The model is equipped with a Quranic toolset supporting semantic search, surah metadata lookup, and direct verse reading. It can plan, invoke tools to inspect candidate verses, resolve ambiguities, and refine its answer iteratively before producing the final cited output.
Figure 4: End-to-end development and evaluation work- flow.

Datasets

The authors introduce a unified data suite for grounded Islamic modeling:

  • ISLAMICFAITHQA: A newly curated generative evaluation benchmark containing 3,810 bilingual (Arabic/English) questions. It features atomic, single-gold answers to enable the direct measurement of hallucination and abstention rates.
  • SFT Reasoning Dataset: 25,000 Arabic text-grounded instruction-response pairs centered on theological reasoning.
  • RL Preference Dataset: 5,000 bilingual preference samples used for reward-guided alignment.
  • Quran RAG Corpus: A retrieval index consisting of 6,236 atomic verses (ayat) embedded using mE5-base, complete with standardized metadata for precise citation mapping.
Statistical analysis of ISLAMICFAITHQA showing difficulty and category distributions.

Key Insights and Ideas

  • "Thinking More" Isn't Enough: Evidence from test-time scaling shows that longer reasoning traces alone do not reliably improve grounding and can actually increase overconfident, hallucinated errors. External canonical grounding is indispensable.
  • Retrieval as a Dialogue: Standard single-shot RAG often fails when queries require multi-step verification or context lookup. Forcing the model to act as an agent that iteratively queries and inspects specific verses yields massive reliability gains.
  • Linguistic Equalizer: Agentic RAG acts as a powerful tool for cross-lingual robustness. By anchoring the generation process to the same canonical Arabic retrieval base, it significantly narrows the performance gap between Arabic and English queries.

Key Results

  • Baseline Deficiency: Off-the-shelf multilingual LLMs perform poorly on the benchmark, with most scoring below 30% accuracy under strict LLM-as-a-judge grading.
  • Agentic RAG Dominance: Agentic RAG provided the most substantial performance boost across the board. For example, a relatively small model like Qwen3-4B improved from a base accuracy of 21.85% to 38.85% with standard RAG, and jumped to 48.90% using Agentic RAG.
  • State-of-the-Art Performance: Combining a strong in-domain model with agentic grounding achieved the best overall results, with Fanar-2-27B + Agentic RAG reaching a state-of-the-art average accuracy of 57.30%.
  • Disparity Reduction: Under Agentic RAG, Qwen3-4B achieved a highly balanced performance profile (49.60% in Arabic vs. 48.20% in English), mitigating the severe language imbalance present in its base form.

Limitations and Future Work

  • Single-Gold Answer Constraint: To ensure reliable evaluation, the benchmark focuses on atomic questions with a single clear answer. This under-represents complex jurisprudential scenarios where multiple interpretive traditions (madhahib) offer valid, differing answers.
  • Quran-Centric Grounding: The current retrieval suite is primarily focused on the Quran. Questions that rely heavily on authenticated hadith, fiqh sources, or broader scholarly consensus are currently disadvantaged.
  • Inference Overhead: Agentic RAG introduces a clear trade-off: it significantly increases computational cost, raising average token usage by ~3x and latency by over 6x due to multiple sequential tool calls.
  • Future Directions: The authors plan to expand the grounding corpus to include authenticated hadith with verified provenance, incorporate school-of-thought disagreements, and harden tool-augmented systems against adversarial prompting.

Summary updated

BibTeX
@inproceedings{bhatia2026from,
  author = {Gagan Bhatia and Hamdy Mubarak and Mustafa Jarrar and George Mikros and Fadi Zaraket and Mahmoud Alhirthani and Mutaz Al-Khatib and Logan Cochrane and Kareem Darwish and Rashid Yahiaoui and Firoj Alam},
  title = {{From RAG to Agentic RAG for Faithful Islamic Question Answering}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2026},
  doi = {10.18653/v1/2026.findings-acl.1317},
}
Figure