Learning Hadith through Chatbot Using Large Language Model and Retrieval Augmented Generation
Abstract
Hadith is the concept of recorded action or sayings of Prophet Muhammad throughout his lifetime. The digitalization of Islamic knowledge has improved accessibility toward Hadith literature. However, many users often encounter problems like static keyword searching that relies on specific keyword or Arabic terms usage. They also face the process of search result skimming that is time consuming and mentally taxing when combined with the actual learning process. To resolve these issues, the development of Hadith chatbot using LLM is proposed. The objectives of this project are to: (1) identify Hadith texts and themes for Sahih Muslim, (2) design an LLM framework for these texts, and (3) develop a web-based chatbot prototype. The research methodology consists of preliminary studies, knowledge acquisition, data collection and preprocessing, system design, system development, testing and refinement, and documentation. The resulting web-based Hadith chatbot displayed the ability to retrieve relevant Hadith accurately while adhering to the context given. Users are now able to learn Hadith knowledge using their day-to-day conversational language as a medium of interaction. Identified future work includes the knowledge base expansion and multilingual support implementation into the system. In addition to the Sahih Muslim and Syarah Sahih Muslim, other major Hadith collections, Quranic verses, and their interpretations should be integrated to make the system more comprehensive for Islamic knowledge as a whole. Multilingual support could also be considered to expand the chatbot to a more diverse group of users. Overall, this project has demonstrated the effectiveness of Hadith chatbot using LLM in enhancing accessibility and understanding of Hadith knowledge by removing the process of static keyword searches and search results skimming.