USING AI FOR ISLAMIC JURISPRUDENCE QUESTIONS: COMPARATIVE ANALYSIS OF DOMAIN SPECIFIC RETRIEVAL AUGMENTED GENERATION (RAG) VS. GENERIC LLM
Keywords:
Artificial Intelligence, AI, Natural Language Processing, NLP, Large Language Model, LLM, Religious Text, Islamic Jurisprudence, Fiqh, Fatawa RAG.Abstract
The rapid growth of large language models such as ChatGPT, Claude and Llama have unlocked a range of opportunities in the text generation. However, these models are trained on vast unfiltered data from Internet which is useful in many generic applications and can cause fabricated or distorted information on a complex query in a specific domain. In a highly regulated and sensitive domain of Islamic Jurisprudence this deficiency can have serious consequences. To address this issue, this research explored the application of AI on Islamic jurisprudence text using domain-specific AI capabilities which surpasses the capabilities general-purpose Large Language Models (LLMs) like ChatGPT. A POC experiment has been conducted to show how a domain specific AI can outperform generic Large Language Models (LLMs) such as ChatGPT. The results of the experiment demonstrated that a retrieval‑augmented generation (RAG) system, fine‑tuned on a curated corpus of Islamic jurisprudence, consistently outperformed and provided accurate answers compared to generic ChatGPT. The superior performance is due to data access from verified texts and its ability to retrieve contextual passages for indexing and querying; thereby reducing hallucinations. In addition, future research should also focus on developing and training AI models for various schools of Islamic Jurisprudence which can enable a collaborative “multi‑school AI council” that can address the challenges of the contemporary and future jurisprudential issues. Educational institutions must embed AI literacy into their curricula so that emerging scholars understand both the capabilities and the limitations of these systems and can anticipate the societal impacts of their deployment.