Mental Health Chatbot for Detecting Depression Symptoms Using Natural Language Processing and DASS-21

Main Article Content

Fadilah Nuraini
Muhammad Najamuddin Dwi Miharja
Abdul Halim Anshor

Abstract

The prevalence of depressive symptoms among university students continues to rise, driven by academic pressure, social isolation, and limited access to psychological support. Early detection and intervention remain critical challenges in mental health services. This study presents the design and implementation of an intelligent chatbot that integrates the Depression Anxiety Stress Scale-21 (DASS-21) with Natural Language Processing (NLP) techniques to enable non-clinical mental health screening. The chatbot processes user input through intent classification and text preprocessing pipelines to dynamically assess indicators of depression, anxiety, and stress. Utilizing a hybrid rule-based and machine learning architecture, the system provides a self-assessment interface that delivers personalized feedback based on the DASS-21 scoring rubric. Two models were evaluated: a TF-IDF-based Neural Network and a fine-tuned BERT model. The TF-IDF model achieved an accuracy of ninety-one percent with a weighted F1-score of 0.91, while the BERT model outperformed it with an accuracy of ninety-four percent and a weighted F1-score of 0.94. Notably, the BERT model demonstrated a recall of ninety-eight percent in identifying moderate depression cases. However, both models showed limitations in detecting mild depression due to data imbalance. The approach prioritizes usability, anonymity, and accessibility, key factors in promoting help-seeking behavior among young adults. The results demonstrate the potential of NLP-powered conversational agents as scalable, low-cost tools for early detection of mental health risks in academic environments.

Downloads

Download data is not yet available.

Article Details

How to Cite
Nuraini, F., Najamuddin Dwi Miharja, M., & Anshor, A. H. . (2025). Mental Health Chatbot for Detecting Depression Symptoms Using Natural Language Processing and DASS-21. Jurnal Teknologi, 17(2), 133–142. https://doi.org/10.24853/jurtek.17.2.133-142
Section
Articles

References

K. Pleska, J. Wojtania, M. Łepik, Z. Uszok, K. Rosiak, and R. Szyguła, “Dyslipidemia among psychiatric patients with depression–common possible reasons and treatment implications–review,” Quality in Sport, vol. 10, no. 1, pp. 76–87, 2024.

World Health Organization, “Depression,” WHO Fact Sheets, Jun. 2023.

Lovibond, S.H., and Peter F. Lovibond. "Manual for the Depression Anxiety Stress Scales (DASS-21)." Psychology Foundation of Australia, 2nd edition (1995). https://doi.org/10.1037/t01004-000

Gunawan, Teddy Surya, Asaad Babiker, Nanang Ismail, and Mufid Ridlo Effendi. "Development of Intelligent Telegram Chatbot Using Natural Language Processing." Journal of Advanced Technology and Applications 7, no. 1 (2023):153–159. https://doi.org/10.5281/zenodo.7656768

Mahajan, Papiya, Rinku Wankhade, Anup Jawade, Pragati Dange, and Aishwarya Bhoge. "Healthcare Chatbot using Natural Language Processing." International Research Journal of Engineering and Technology (IRJET) 7, no. 11 (2020): 250–255. https://www.irjet.net/archives/V7/i11/IRJET-V7I1142.pdf

X. Li, S. Zhang, X. Zhang, Y. Zhan, and L. Xu, “Design and Evaluation of a CBT-Based AI Chatbot for Mental Health Support among College Students: A Randomized Controlled Trial,” Applied Sciences, vol. 14, no. 13, p. 5889, 2024. doi: 10.3390/app14135889

Rakib, A. B., Rumky, E. A., Ashraf, A. J., Hillas, M. M., & Rahman, M. A.

"Speech Recognition and Neural Networks based Talking Health Care Bot (THCB): Medibot." In International Conference on Brain Informatics. Cham: Springer, 2021, pp. 378–387.

Najamuddin, Muhammad, and Shohibul Adhkar. "Implementasi Chatbot Deteksi Depresi Dini pada Mahasiswa dengan PHQ-9." Prosiding SAINTEK: Sains dan Teknologi 1, no. 1 (2022). Universitas Pelita Bangsa.

Moh. Abdul Hakim and Nina Vania Aristawati, “Measuring Depression, Anxiety, and Stress in Early Adults in Indonesia: Construct Validity and Reliability Test of DASS-21,” Jurnal Psikologi Ulayat: Indonesian Journal of Indigenous Psychology, vol. 10, no. 2, pp. 232–250, 2023, doi: 10.24854/jpu553.

Girija Atigeri, Ankit Agrawal, and Sucheta V. Kolekar, “Advanced NLP Models for Technical University Chatbot Development and Conversational Assistant,” IEEE Access, vol. 12, pp. 29633–29646, 2024, doi: 10.1109/ACCESS.2024.3368382.

Dody Indra Sumantrawan, Siska Narulita, Muhammad Khoirul Wais, and Abraham Yano Subandono**, “Factors Affecting Depression in Students and the Role of Machine Learning in Mental Health Analysis,” Digital Transformation Technology, vol. 4, no. 1, pp. 705–713, Mar. 2024, doi: 10.47709/digitech.v4i1.4577.

G. Malcher and B. Belatreche, “Weightless Neural Networks for Text Classification Using TF-IDF,” in Proceedings of the 29th European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning (ESANN), Bruges, Belgium, 2021.

R. Dey, “Classification of Fake News Headlines Based on Neural Networks,” arXiv preprint, arXiv:2201.09966, 2022.

C. Feldges, “Text Classification with TF-IDF, LSTM, BERT: A Quantitative Comparison,” Medium, 2023.

F. T. John, M. Liu, and A. K. Jaiswal, “Efficient Deep Learning-Based Text Classification with TF-IDF and Neural Networks,” Journal of Intelligent Systems, vol. 33, no. 1, pp. 45–56, 2023. https://doi.org/10.1515/jisys-2023-0005

M. N. Miftahuddin, A. Fauzi, and A. Rahman, “Mental Health Prediction Using NLP and Machine Learning Techniques: A Comparative Study,” Informatics in Medicine Unlocked, vol. 46, 2024.

H. J. Kim and K. Lee, “Design and Evaluation of an NLP-Based Mental Health Chatbot for Early Depression Detection Using the DASS-21,” Scientific Reports, vol. 14, no. 1, p. 5432, 2025.

S. Sazan, R. Rahman, M. S. Islam, and M. M. Rahman, “Enhancing Depressive Post Detection in Bangla: A Comparative Study of TF-IDF, BERT, and FastText Embeddings,” IEEE International Conference on Bangla Speech and Language Processing (ICBSLP), 2024. https://doi.org/10.2139/ssrn.4885802

T. Kerasiotis, K. Stefanidis, and G. Tsoumakas, “Depression Detection on Social Media Using DistilBERT and Auxiliary Features,” IEEE Access, vol. 12, pp. 11235–11247, 2024.

A. Lorenzoni, G. S. Garcia, and L. Rocha, “A Comparative Study of Machine Learning and Deep Learning Models for Mental Health Text Classification,” Scientific Reports, vol. 15, no. 1, pp. 1–12, 2025.