HANA: An AI Chatbot for Islamic Jurisprudence on Menstruation using SBERT and TF-IDF
The advancement of Artificial Intelligence (AI), particularly in Natural Language Processing (NLP), has opened new opportunities for religious technological innovation, especially in addressing practical Islamic jurisprudence issues such as menstruation (fiqh haid). This research proposes and implem...
Saved in:
| Main Authors: | , , , |
|---|---|
| Format: | Article |
| Language: | English |
| Published: |
Politeknik Negeri Batam
2025-06-01
|
| Series: | Journal of Applied Informatics and Computing |
| Subjects: | |
| Online Access: | https://jurnal.polibatam.ac.id/index.php/JAIC/article/view/9449 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1850080037701681152 |
|---|---|
| author | Tsaura Rafah Masuzzahra Khothibul Umam Hery Mustofa Maya Rini Handayani |
| author_facet | Tsaura Rafah Masuzzahra Khothibul Umam Hery Mustofa Maya Rini Handayani |
| author_sort | Tsaura Rafah Masuzzahra |
| collection | DOAJ |
| description | The advancement of Artificial Intelligence (AI), particularly in Natural Language Processing (NLP), has opened new opportunities for religious technological innovation, especially in addressing practical Islamic jurisprudence issues such as menstruation (fiqh haid). This research proposes and implements HANA, an AI chatbot developed for Telegram, utilizing a hybrid approach combining Term Frequency-Inverse Document Frequency (TF-IDF) and Sentence-BERT (SBERT) models. A curated dataset of over 1000 question-answer pairs from classical and contemporary Islamic literature was used, primarily based on the Shafi'i school of thought. The chatbot matches user queries through a two-stage retrieval: initial keyword matching via TF-IDF and deeper semantic matching via SBERT embeddings. Evaluations were conducted by comparing TF-IDF, SBERT, and hybrid approaches using cosine similarity, precision, recall, and F1-score metrics, focused on top-1 retrieval accuracy. HANA achieved an average cosine similarity score of 0.6581 and a semantic relevance rating of 87% based on expert validation, while User Acceptance Testing (UAT) involving 15 respondents indicated 86.7% satisfaction. Although the system is deployed as a proof-of-concept on Google Colab without persistent hosting, it demonstrates the viability of lightweight AI chatbots for Shariah consultation services. Future improvements include multi-turn conversation handling and integration with large language models for better context understanding. This research contributes to expanding NLP applications within techno-dakwah initiatives, providing a scalable approach to enhance women's access to Islamic jurisprudence knowledge. |
| format | Article |
| id | doaj-art-6730d84b1f4c44128fc71a103267e4c8 |
| institution | DOAJ |
| issn | 2548-6861 |
| language | English |
| publishDate | 2025-06-01 |
| publisher | Politeknik Negeri Batam |
| record_format | Article |
| series | Journal of Applied Informatics and Computing |
| spelling | doaj-art-6730d84b1f4c44128fc71a103267e4c82025-08-20T02:45:02ZengPoliteknik Negeri BatamJournal of Applied Informatics and Computing2548-68612025-06-01931013102410.30871/jaic.v9i3.94496994HANA: An AI Chatbot for Islamic Jurisprudence on Menstruation using SBERT and TF-IDFTsaura Rafah Masuzzahra0Khothibul Umam1Hery Mustofa2Maya Rini Handayani3UIN Walisongo SemarangUIN Walisongo SemarangUIN Walisongo SemarangUIN Walisongo SemarangThe advancement of Artificial Intelligence (AI), particularly in Natural Language Processing (NLP), has opened new opportunities for religious technological innovation, especially in addressing practical Islamic jurisprudence issues such as menstruation (fiqh haid). This research proposes and implements HANA, an AI chatbot developed for Telegram, utilizing a hybrid approach combining Term Frequency-Inverse Document Frequency (TF-IDF) and Sentence-BERT (SBERT) models. A curated dataset of over 1000 question-answer pairs from classical and contemporary Islamic literature was used, primarily based on the Shafi'i school of thought. The chatbot matches user queries through a two-stage retrieval: initial keyword matching via TF-IDF and deeper semantic matching via SBERT embeddings. Evaluations were conducted by comparing TF-IDF, SBERT, and hybrid approaches using cosine similarity, precision, recall, and F1-score metrics, focused on top-1 retrieval accuracy. HANA achieved an average cosine similarity score of 0.6581 and a semantic relevance rating of 87% based on expert validation, while User Acceptance Testing (UAT) involving 15 respondents indicated 86.7% satisfaction. Although the system is deployed as a proof-of-concept on Google Colab without persistent hosting, it demonstrates the viability of lightweight AI chatbots for Shariah consultation services. Future improvements include multi-turn conversation handling and integration with large language models for better context understanding. This research contributes to expanding NLP applications within techno-dakwah initiatives, providing a scalable approach to enhance women's access to Islamic jurisprudence knowledge.https://jurnal.polibatam.ac.id/index.php/JAIC/article/view/9449chatbotfiqh haidsentence-berttf-idftelegram bot |
| spellingShingle | Tsaura Rafah Masuzzahra Khothibul Umam Hery Mustofa Maya Rini Handayani HANA: An AI Chatbot for Islamic Jurisprudence on Menstruation using SBERT and TF-IDF Journal of Applied Informatics and Computing chatbot fiqh haid sentence-bert tf-idf telegram bot |
| title | HANA: An AI Chatbot for Islamic Jurisprudence on Menstruation using SBERT and TF-IDF |
| title_full | HANA: An AI Chatbot for Islamic Jurisprudence on Menstruation using SBERT and TF-IDF |
| title_fullStr | HANA: An AI Chatbot for Islamic Jurisprudence on Menstruation using SBERT and TF-IDF |
| title_full_unstemmed | HANA: An AI Chatbot for Islamic Jurisprudence on Menstruation using SBERT and TF-IDF |
| title_short | HANA: An AI Chatbot for Islamic Jurisprudence on Menstruation using SBERT and TF-IDF |
| title_sort | hana an ai chatbot for islamic jurisprudence on menstruation using sbert and tf idf |
| topic | chatbot fiqh haid sentence-bert tf-idf telegram bot |
| url | https://jurnal.polibatam.ac.id/index.php/JAIC/article/view/9449 |
| work_keys_str_mv | AT tsaurarafahmasuzzahra hanaanaichatbotforislamicjurisprudenceonmenstruationusingsbertandtfidf AT khothibulumam hanaanaichatbotforislamicjurisprudenceonmenstruationusingsbertandtfidf AT herymustofa hanaanaichatbotforislamicjurisprudenceonmenstruationusingsbertandtfidf AT mayarinihandayani hanaanaichatbotforislamicjurisprudenceonmenstruationusingsbertandtfidf |