Penerapan Langchain Retriever dengan Model Chat Openai dalam Pengembangan Sistem Chatbot Hadis Berbasis Telegram
Abstract
In Islamic studies, the Hadiths of Prophet Muhammad (SAW) hold significant value as guides for behavior and faith. However, access to understanding Hadiths often presents challenges, espe-cially for those who are not Hadith experts. The digitalization of Hadiths is still limited, making it time-consuming to find answers by sifting through the vast amount of available information. This research aims to create an efficient chatbot that provides answers related to Hadiths, including the original sources, quickly. The proposed solution is a technology-based approach through the development of a Hadith chatbot on Telegram, integrated with the LangChain Retriever and the GPT-4-1106-preview chat model from OpenAI. Using LangChain Retriever helps the chatbot find accurate answers by matching user questions with relevant Hadith databases, enhancing the ac-curacy of the chatbot's responses. The GPT-4-1106-preview chat model enables the chatbot to generate natural and context-appropriate responses, improving user interaction. The Rapid Ap-plication Development (RAD) method is applied in system development, through stages of Re-quirement Planning, User Design, Construction, and Cut-Over, including data analysis of Hadiths from the Nine Imam Hadith Books, totaling 62,169 Hadiths. The chatbot's performance evaluation uses the Scoring Evaluator framework with an average evaluation score of 0.97 and quality answer evaluation testing by five Hadith experts with an accuracy percentage of 90%. The Scoring Eval-uator test results indicate that the responses are highly accurate and aligned with Hadith refer-ences, and the quality answer evaluation test on a Likert scale shows respondents strongly agree with the system's answers. This research contributes to laypersons wanting to learn Hadiths by utilizing the chatbot as an interactive and innovative learning medium. Further research can expand the focus to complex interpretations of Musykil al-Hadith and asbab al-wurud to address deeper questions about Hadith interpretation.
Downloads
References
N. Yuslem, A. Ardiansyah, J. Juriono, U. K. Rambe, and I. F. A. Nasution, “Perkembangan Studi Hadis: Telaah dan Pemetaan Kajian Hadis Pada UIN Sumatera Utara,” AL QUDS : Jurnal Studi Alquran dan Hadis, vol. 6, no. 3, Dec. 2022, doi: 10.29240/alquds.v6i3.3865.
A. Zubir Rosdi, S. Najihuddin Syed Hassan, N. Asiah Fasehah Muhamad, N. Izzatul Huda Mohamad Zainuzi, M. Shiham Mahfuz, and F. Pengajian Quran dan Sunnah, “Panduan Asas Kaedah Kenal Pasti Status Hadis: Kajian Diskriptif Penggunaan Ensiklopedia Hadis 9 Imam,” Journal of Hadith Studies, vol. 8, no. 1, pp. 2550–1488, 2023, doi: 10.33102/johs.v8i1.225.
S. Muhammad Alfatih, Q. Saifuddin Zuhri, and M. Inayatul, “Digitalisasi Hadis Ala Pusat Kajian Hadis(PKH): Distribusi, Ciri, dan Kontribusi dalam Kajian hadis Indonesia,” Mashdar : Jurnal Studi Al-Quran dan Hadis, vol. 3, no. 2, pp. 105–128, Mar. 2021, doi: 10.15548/mashdar.v3i2.2982.
W. Wasoni and M. I. Helmy, “Pemaknaan Hadis-Hadis Jihad dalam Website VOA ISLAM dan Relevansinya dengan Diskursus Islam Indonesia,” AL QUDS : Jurnal Studi Alquran dan Hadis, vol. 6, no. 1, p. 343, May 2022, doi: 10.29240/alquds.v6i1.3401.
R. Fauzana, “Strategi Komunikasi Dakwah bil Qalam Komunitas Revowriter di Media Digital,” Idarotuna, vol. 3, no. 3, p. 229, Feb. 2022, doi: 10.24014/idarotuna.v3i3.16440.
A. Abdi, S. Hasan, M. Arshi, S. M. Shamsuddin, and N. Idris, “A Question Answering System In Hadith Using Linguistic Knowledge,” Comput Speech Lang, vol. 60, Mar. 2020, doi: 10.1016/j.csl.2019.101023.
Tatwadarshi P. Nagarhalli, Vinod Vaze, and N. K. Rana, “A Review of Current Trends in the Development of Chatbot Systems,” 2020 6 th International Conference on Advanced Computing & Communication Systems (ICACCS), 2020, doi : 10.1109/ICACCS48705.2020.9074420
G. Daniel, J. Cabot, L. Deruelle, and M. Derras, “Xatkit: a Multimodal Low-Code Chatbot Development Framework,” IEEE Access, vol. 8, pp. 15332–15346, 2020, doi: 10.1109/aCCESS.2020.2966919.
A. Hariansyah, E. Haerani, and M. Affandes, “Implementation of Telegram Chatbot as Information Service of Madani Hospital Pekanbaru,” Jurnal Ilmiah Merpati , vol. 11, no. 3, 2023, doi: 10.24843/JIM.2023.v11.i03.p05.
G. F. Avisyah, I. J. Putra, and S. S. Hidayat, “Open Artificial Intelligence Analysis using ChatGPT Integrated with Telegram Bot,” Jurnal ELTIKOM, vol. 7, no. 1, pp. 60–66, Jun. 2023, doi: 10.31961/eltikom.v7i1.724.
Keivalya Pandya and Prof. Dr. Mehfuza Holia, “Automating Customer Service using LangChain Building custom open-source GPT Chatbot for organizations,” arXiv preprint, 2023, arXiv : 2310.05421
Arjun Pesaru, Taranveer Singh Gill, and Archit Reddy Tangella, “AI assistant for document management Using Lang Chain and Pinecone,” International Research Journal of Modernization in Engineering Technology and Science, Jun. 2023, doi: 10.56726/irjmets42630.
O. Topsakal and T. C. Akinci, “Creating Large Language Model Applications Utilizing LangChain: A Primer on De-veloping LLM Apps Fast,” All Sciences Proceedings, 2023, [Online]. Available: http://as-proceeding.com/:Konya,Turkeyhttps://www.icaens.com/
Z. Fahma, I. Gorby, C. Ramdani, and K. N. Meiah, “Website-Based Competence Certification Information System Using Rapid Application Development (Rad) Method,” Jurnal Teknik Informatika (JUTIF), vol. 3, no. 2, pp. 219–226, 2022, doi: 10.20884/1.jutif.2022.3.2.173.
M. M. Hossain, S. Krishna Pillai, S. E. Dansy, and A. A. Bilong, “Mr. Dr. Health-Assistant Chatbot,” International Journal of Artificial Intelligence, vol. 8, no. 2, pp. 58–73, Dec. 2021, doi: 10.36079/lamintang.ijai-0802.301.
D. Sukma Hani and C. Indah Ratnasari, “Klasifikasi Masalah Pada Komunitas Marah-Marah di Twitter Menggunakan Long Short-Term Memory,” Jurnal Media Informatika Budidarma , vol. 7, pp. 1829–1837, 2023, doi: 10.30865/mib.v7i4.6755.
S. K. Nigam, S. K. Mishra, A. K. Mishra, N. Shallum, and A. Bhattacharya, “Legal Question-Answering in the Indian Context: Efficacy, Challenges, and Potential of Modern AI Models,” arXiv preprint, 2023, arXiv : 2309.14735
J. Lin, R. Pradeep, T. Teofili, and J. Xian, “Vector Search with OpenAI Embeddings: Lucene Is All You Need,” arXiv preprint, Aug. 2023, arXiv : 2308.14963
N. Muennighoff, “SGPT: GPT Sentence Embeddings for Semantic Search,” arXiv preprint, Feb. 2022, arXiv : 2202.08904
U. Gupta, “GPT-InvestAR: Enhancing Stock Investment Strategies through Annual Report Analysis with Large Language Models,” arXiv preprint, Sep. 2023, arXiv : arxiv.org/abs/2309.03079
J. Yang et al., “Harnessing the Power of LLMs in Practice: A Survey on ChatGPT and Beyond,” arXiv preprint, Apr. 2023, arXiv : 2304.13712
Y. Cheng, J. Chen, Q. Huang, Z. Xing, X. Xu, and Q. Lu, “Prompt Sapper: A LLM-Empowered Production Tool for Building AI Chains,” arXiv preprint, Jun. 2023, arXiv : 2306.12028
R. Tang, Y.-N. Chuang, and X. Hu, “The Science of Detecting LLM-Generated Texts,” arXiv preprint, Feb. 2023, arXiv : 2303.07205
M. Ranjit, G. Ganapathy, R. Manuel, and T. Ganu, “Retrieval Augmented Chest X-Ray Report Generation using OpenAI GPT models,” arXiv preprint, May 2023, arXiv : 2305.03660
J. Mao, Y. Qian, H. Zhao, and Y. Wang, “GPT-Driver: Learning to Drive with GPT,” arXiv preprint, Oct. 2023, arXiv : 2310.01415
M. Bommarito and D. M. Katz, “GPT Takes the Bar Exam,” arXiv preprint, Dec. 2022, arXiv : 2212.14402
Y. Bai et al., “Longbench: A Bilingual, Multitask Bench-Mark For Long Context Understanding,” arXiv preprint, 2023. arXiv : 2308.14508
Adith Sreeram and Pappuri Jithendra Sai, “An Effective Query System Using LLMs and LangChain,” in International Journal of Engineering Research & Technology (IJERT), Elsevier B.V., 2023, pp. 367–369. doi: 10.1016/j.procs.2016.02.023.
I. Budi Trisno, D. Febrian Elvianto, and U. Widya Kartika, “Aplikasi Sistem Informasi Manajemen Pengiriman Barang Pt. Gst,” Jurnal Teknologi Informasi dan Ilmu Komputer (JTIIK), vol. 9, no. 5, 2022, doi: 10.25126/jtiik.202295390.
“Scoring Evaluator | ????️???? LangChain.”, 2024. [Online]. Available: https://python.langchain.com/v0.1/docs/guides/productionization/evaluation/string/scoring_eval_chain/
Copyright (c) 2024 Niken Aisyah Maharani Herwanza, Nazruddin Safaat Harahap, Febi Yanto, Fitri Insani
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.