AUTOMATING SHARIAH COMPLIANCE CHECKS IN ISLAMIC BANKING USING LARGE LANGUAGE MODELS AND RAG PIPELINES

Authors

  • Dr. Faisal Ahmed Sarfaraz
  • Muhammad Farhan Memon
  • Salman Mahmood

Abstract

The Islamic banking and finance industry, currently managing assets exceeding USD 4 trillion globally, operates under a rigorous framework of Shariah law that mandates exhaustive compliance review of every financial instrument and contractual agreement. Conventional Shariah audit processes are predominantly manual, reliant upon a limited pool of certified scholars, and unable to scale proportionally with the exponential growth of Islamic financial products. This paper proposes a novel, end-to-end computational framework that integrates Large Language Models (LLMs) with Retrieval-Augmented Generation (RAG) pipelines to automate first-pass Shariah compliance checks for Islamic financial contracts. The framework ingests a curated corpus comprising Accounting and Auditing Organization for Islamic Financial Institutions (AAOIFI) standards, classical fiqh rulings, historical fatwas, and standardized Islamic contract templates. A multi-stage RAG pipeline—encompassing dense vector embedding, semantic retrieval from a high-dimensional knowledge base, and contextually grounded LLM reasoning—is employed to evaluate contractual clauses against established Shariah principles. Critically, the architecture incorporates a Dynamic Knowledge Caching layer that stores frequently queried compliance outcomes, thereby reducing query latency by an estimated 67% and computational overhead by up to 45% at production scale. A simulated case study evaluating a Mudaraba (profit-sharing) contract demonstrates the system's capacity to flag non-compliant clauses—such as fixed-return guarantees—and generate Shariah-aligned revisions. The framework maintains a mandatory Human-in-the-Loop (Shariah scholar) verification stage, ensuring auditability and religious legitimacy. Results indicate substantial efficiency gains, with contract review time reduced from an average of 8–12 hours to under 3 minutes, while achieving a clause-level retrieval precision of 91.4% against AAOIFI benchmarks. This work establishes a scalable, explainable, and institutionally viable pathway toward AI-augmented Shariah governance.

Downloads

Published

2025-12-26

How to Cite

Dr. Faisal Ahmed Sarfaraz, Muhammad Farhan Memon, & Salman Mahmood. (2025). AUTOMATING SHARIAH COMPLIANCE CHECKS IN ISLAMIC BANKING USING LARGE LANGUAGE MODELS AND RAG PIPELINES. Spectrum of Engineering Sciences, 3(12), 1972–1982. Retrieved from https://thesesjournal.com/index.php/1/article/view/2619