Implementing a Sharia Chatbot as a Consultation Medium for Questions About Islam

1 st Wisnu Uriawan, 2 nd Aria Octavian Hamza, 3 rd Ade Ripaldi Nuralim, 4 th Adi Purnama, 5 th Ahmad Juaeni Yunus, 6 th Anissya Auliani Supriadi Putri · 2025

Read Implementing a Sharia Chatbot as a Consultation Medium for Questions About Islam by 1 st Wisnu Uriawan, 2 nd Aria Octavian Hamza, 3 rd Ade Ripaldi Nuralim, 4 th Adi Purnama, 5 th Ahmad Juaeni Yunus, 6 th Anissya Auliani Supriadi Putri (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2512-16644.txt.

Introduction

Wisnu Uriawan and five coauthors built a Sharia-compliant chatbot that answers questions about Islam. The system joins Q-learning, a trial-and-reward learning method, with sentence transformers that map text by meaning, so replies stay on topic and grounded.

The team trained it on a curated set of 25,000 question and answer pairs drawn from the Qur'an, Hadith, and scholar rulings, stored in JSON form. A Flask back end and a Flutter phone app serve the bot. In tests it reached 87 percent accuracy on meaning across topics such as law, belief, worship, and daily dealings. The authors note limits from fixed learning and data reliance, and point to live updates as next steps.

Catalog record

CREATOR1 st Wisnu Uriawan, 2 nd Aria Octavian Hamza, 3 rd Ade Ripaldi Nuralim, 4 th Adi Purnama, 5 th Ahmad Juaeni Yunus, 6 th Anissya Auliani Supriadi Putri
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE55 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2512-16644

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Implementing a Sharia Chatbot as a Consultation Medium for Questions About Islam 1 st Wisnu Uriawan, 2 nd Aria Octavian Hamza, 3 rd Ade Ripaldi Nuralim, 4 th Adi Purnama, 5 th Ahmad Juaeni Yunus, 6 th Anissya Auliani Supriadi Putri Abstract This research presents the implementation of a Sharia -compliant chatbot as an interactive medium for consulting Islamic questions, leveraging Reinforcement Learning (Q-Learning) integrated with Sentence-Transformers for semantic embedding to ensure contextual and accurate responses. Utilizing the CRISP-DM methodology, the system processes a curated Islam QA dataset of 25,000 question-answer pairs from authentic sources like the Qur’an , Hadith , and scholarly fatwas , formatted in JSON for flexibility and scalability. The chatbot prototype, developed with a Flask API backend and Flutter-based mobile frontend, achieves 87% semantic accuracy in functional testing across diverse topics including fiqh , aqidah , ibadah , and muamalah , demonstrating its potential to enhance religious literacy, digital da’wah, and access to verified Islamic knowledge in the Industry 4.0 era. While effective for closed-domain queries, limitations such as static learning and dataset dependency highlight opportunities for future enhancements like continuous adaptation and multi-turn conversation support, positioning this innovation as a bridge between traditional Islamic scholarship and modern AI-driven consultation. I Introduction The rapid development of digital technology over the last two decades has brought significant changes to various aspects of human life, including the way people interact, learn, and obtain information. One crucial breakthrough in the Industry 4.0 era is the advancement in the fields of Artificial Intelligence (AI) and Natural Language Processing (NLP). These two fields enable machines to understand, interpret, and respond to human language in a smart and contextual manner. This innovation has given birth to various human-computer interaction applications, one of which is the chatbot. A chatbot is an AI-based system designed to simulate human-like conversations through text or voice. The chatbot functions as a virtual assistant that can automatically provide responses to user questions. This technology is now widely implemented across various sectors, ranging from customer service, education, health, finance, to public services. The use of chatbots has been proven to increase service efficiency, accelerate access to information, and minimize the limitations of human time and effort [ 28 ] . In the context of education and religious guidance, particularly Islam, the development of information technology presents both opportunities and new challenges. Muslims in the digital age face a massive flood of information, not all of which has validity and adherence to the principles of Islamic Sharia . Many people, especially the younger generation, seek quick answers about Islamic laws, worship procedures, and social religious issues through the internet. However, the limitations of trustworthy sources and the variation in interpretations often lead to confusion and the potential for the spread of inaccurate information [ 1 ] . Therefore, there is a need for an AI-based digital consultation system that can answer questions about Islam quickly, accurately, and in accordance with Sharia principles. One promising approach to address this need is the implementation of a Sharia chatbot, which is an NLP-based system specifically trained using a dataset containing Islamic material such as verses from the Qur’an , Hadith , scholarly fatwas, and interpretive and Fiqh (Islamic jurisprudence) literature. This chatbot can act as an interactive religious consultation medium, helping users understand Islamic teachings easily, structurally, and contextually [ 14 ] . In its development, the Sharia chatbot system requires effective NLP modeling to recognize the intent of user questions (intent detection) and provide relevant answers (response generation). To achieve this, a high-quality, systematically compiled dataset is needed. The JSON (JavaScript Object Notation) format is an ideal choice due to its light weight, flexibility, and easy integration with machine learning algorithms. Each entry in the JSON dataset contains a question-answer pair, which can be expanded with additional information such as references to verses, Hadith , or classical book sources, thereby increasing the system’s credibility and scholarly context [ 24 ] . Furthermore, utilizing JSON as the dataset format facilitates developers in updating content, adding new topics, or expanding the scope of the knowledge domain in line with the dynamics of issues faced by the Muslim community. By employing (machine learning) or deep learning approaches, the chatbot can continuously adapt and improve its response accuracy based on user interactions [ 3 ] . Beyond the technical aspects, the presence of the Sharia chatbot also holds significant social and digital da’wa (preaching/invitation to Islam) dimensions. In the era of social media and the digitalization of da’wa, Muslims require a medium that is not only informative but also interactive and educational. An Islamic Chatbot can function as a modern means of da’wa, integrating Sharia values with advancements in information technology. This system has the potential to become an intermediary between scholars and the community, especially for those who struggle to access conventional sources of knowledge [ 16 ] . Empirically, various previous studies have shown that the application of NLP-based chatbots in education and consultation can increase the effectiveness of information delivery, strengthen user engagement, and foster self-learning interest. In the context of Islam, this aligns with the spirit of Iqra’ the first command in the Qur’an which encourages the community to continuously learn and seek knowledge in a wise and civilized manner [ 29 ] . Thus, the implementation of a Sharia chatbot as a consultation medium for questions about Islam does not only represent the integration between technology and religion, but also constitutes a strategic innovation in supporting digital transformation in the fields of education and da’wa. This chatbot is expected to become a smart religious assistant that bridges the gap between the community’s need for information and the limited access to authentic sources of knowledge [ 10 ] . By leveraging the power of NLP and JSON-based datasets, this system has the potential for sustainable development, both locally and globally, to support the vision of Islamic Digital Transformation. Moving forward, the development of the Sharia chatbot can also be directed towards supporting service personalization, voice integration (speech recognition), and more in-depth semantic analysis to make the interaction between users and the system increasingly natural, humanistic, and educationally valuable. II Related Work The development of information technology has driven a significant transformation in the application of chatbots, particularly within the context of Islamic religion. Initially, developed chatbot systems were closed-domain, meaning they could only answer specific questions based on a static knowledge base. For instance, a study developed a chatbot to answer questions about salat (prayer) and zakat using the Fuzzy String-Matching algorithm [ 22 ] . While effective for limited scenarios, this system had limitations in understanding the variations of natural language and more complex question contexts. At a global level, a hybrid architecture was used to enhance the chatbot’s ability to handle Arabic-language Islamic legal questions [ 17 ] . With the advancement of technology, more sophisticated approaches using deep learning, especially Convolutional Neural Networks (CNN), were introduced. Research implemented a CNN-based chatbot for an Islamic question-and-answer system, capable of providing automatic answers based on user commands in natural language [ 27 ] . This approach, which utilized transfer learning and word embeddings techniques, proved to increase the system’s ability to

Read the complete text