Khazanah Journal of Religion and Technology
Vol. 4 No. 1 (2026): June

Evaluation of DistilBERT and BiLSTM Models for the Development of Islamic Chatbots Based on Tag Classification

Muhammad Rizki Al-Fathir (Unknown)
Muhammad Saifurridwani 'Ijazi (Unknown)
Nabila Lailatanzila (Unknown)
Nirwan Rasyid Ridlo (Unknown)
Riza Anwar Fadil (Unknown)



Article Info

Publish Date
29 Jun 2026

Abstract

This study evaluates the performance of DistilBERT and Bidirectional Long Short-Term Memory (BiLSTM) models for intent classification in Islamic chatbots, with the main challenge being a highly imbalanced dataset containing 2,031 unique intents. Following the CRISP-DM methodology, the DistilBERT model was fine-tuned using Focal Loss to address class imbalance, while the BiLSTM model was built from scratch with a standard loss function. The evaluation results demonstrated the absolute superiority of DistilBERT, achieving an accuracy of 65.15%, far surpassing BiLSTM, which achieved only 34.50% due to severe overfitting. Although the final model sizes of both were similar, DistilBERT training proved to be significantly more efficient. These findings demonstrate that a Transformer-based architecture combined with an appropriate strategy, such as Focal Loss, is a much more robust and effective solution for large-scale, imbalanced text classification in specific domains. The practical feasibility of this approach was validated through its successful implementation in a publicly accessible, functional chatbot prototype.

Copyrights © 2026






Journal Info

Abbrev

kjrt

Publisher

Subject

Religion Computer Science & IT Engineering Languange, Linguistic, Communication & Media Social Sciences

Description

The Khazanah Journal of Religion and Technology is dedicated to advancing the understanding of the complex relationship between religion and technology. The journal aims to serve as a platform for publishing original research that explores the intersection of these two domains, focusing on recent ...