Mental Health Chatbot Application on Artificial Intelligence (AI) for Student Stress Detection Using Mobile-Based Naïve Bayes Algorithm

Authors

  • Ekanata Desi Sagita Mariyana Informatics Department, Universitas PGRI Semarang, Indonesia Author
  • Mega Novita Informatics Department, Universitas PGRI Semarang, Indonesia Author
  • Nur Latifah Dwi Mutiara Sari Informatics Department, Universitas PGRI Semarang, Indonesia Author

DOI:

https://doi.org/10.15294/sji.v12i2.24307

Keywords:

Student stress levels, Naïve bayes, Machine learning, Mental health, Chatbot application

Abstract

Purpose: This study aims to design and evaluate a chatbot-based artificial intelligence system to identify stress levels in students using the Naïve Bayes classification method. With increasing mental health concerns among students, early stress detection is considered crucial for timely intervention

Methods: This study proposes an AI-based chatbot system to detect student stress levels using a comparative approach between Naïve Bayes and Support Vector Machine (SVM) algorithms. A Kaggle dataset with 15 psychological and academic indicators was preprocessed and balanced using SMOTE. Naïve Bayes showed higher accuracy (90%) than SVM (89%). The trained model was deployed via Flask with Ngrok tunneling and integrated into a Flutter mobile app connected to the Gemini AI API for real-time stress screening. This research offers a practical and scalable solution for early mental health detection in students through intelligent chatbot interaction.

Result: The findings show that the Naïve Bayes model achieves a classification accuracy of 90%, slightly surpassing the SVM model, which records an accuracy of 89%. Evaluation through ROC and AUC metrics supports the reliability of Naïve Bayes in detecting stress levels. The integrated chatbot offers a responsive and engaging platform for preliminary mental health assessments.

Novelty: This research presents a unique contribution by combining AI-driven stress detection with a real-time chatbot interface, offering an accessible and scalable approach to student mental health support. The integration of machine learning models with conversational AI provides an innovative solution for early intervention. Future developments may involve deep learning and more diverse psychological inputs to further improve accuracy and effectiveness.

Downloads

Published

22-06-2025

Article ID

24307

Issue

Section

Articles

How to Cite

Mental Health Chatbot Application on Artificial Intelligence (AI) for Student Stress Detection Using Mobile-Based Naïve Bayes Algorithm. (2025). Scientific Journal of Informatics, 12(2), 199-210. https://doi.org/10.15294/sji.v12i2.24307