Source-linked AI summary
An AI-Powered Culturally Aware Chatbot for Stress Detection and Wellness Support among Pakistani University Students Using NLP and Machine Learning
Muhammad Fahad Bashir, Muhammad Afzal
TL;DR
Pakistani university students face compounded stressors that existing Western-oriented digital mental-health tools do not adequately fit. The paper introduces Sukoon, which combines Random Forest stress classification with culturally adapted LLM dialogue, achieving 89.09% accuracy and 0.89 macro F1 while identifying teacher-student relationship as a key cultural stress factor. Future validation requires locally representative data and formal user evaluation.
Problem
Existing digital mental-health tools do not adequately match Pakistani university students’ compounded stressors, languages, cultural norms, and communication barriers.
Method
Sukoon uses Random Forest on 1,100 validated survey responses with 20 features, then routes classifications to an open-source LLM through culturally aware stepped-care prompting.
Results
89.09% accuracy and 0.89 macro F1 were achieved across three stress levels, while teacher-student relationship was identified as the second most predictive feature.
Takeaways & Limitations
Sukoon demonstrates a Pakistani-context system combining machine-learning stress detection with culturally nuanced AI wellness dialogue.
Takeaways & Limitations
The training data is not representative of Pakistani students, chatbot responses lack formal local user evaluation, and classifier evaluation used one stratified split.
Abstract
from arXiv · showhide
With the existing digital mental health tools specifically developed for Western settings, Pakistani students are exposed to a uniquely compounded stress situation in their university that includes academic, financial, familial, and relational stressors, which have become a serious concern for academic and psychological development of students in Pakistani universities. This paper introduces a new, AI-driven and culturally sensitive stress detection and wellness support system that is tailored to the context of Pakistani university students. The system is based on a machine learning model called Random Forest which is trained using a validated student stress data set of 1100 responses on 20 features from psychological, physiological, academic, environmental and social aspects, with an accuracy of 89.09% and a macro F1-score of 0.89, in three stress severity levels. The classification outputs are passed on to an open-source large language model through OpenRouter API, where an appropriately crafted system prompt, culturally aware, gives the model a conversation about wellness, in English, Urdu and Roman Urdu. The second most predictive stress factor in this population identified by feature importance analysis was teacher-student relationship, which is a culturally important stress factor highlighting the need for region-aware mental health systems. Future research will involve primary data collection from students at various academic levels of Pakistani Universities with the validated DASS-21 instrument focusing on the students who are moving from FSc to undergraduate studies, which is a time of being psychologically vulnerable which is under-researched.
1. INTRODUCTION
Pakistani university students face compounded academic, financial, family, and social stressors that existing Western-oriented digital mental-health tools do not adequately address. Sukoon is proposed as a culturally aware chatbot tailored to Pakistani students, including their languages, norms, stigma, and context.
- Pakistani university students simultaneously face academic, financial, family, and social pressures that can harm academic and psychological development.Reported consequences include poor achievement, strained interpersonal relations, depression, and psychological burnout.
- Existing digital mental-health tools often use Western datasets and English, limiting their cultural and communicative fit for Pakistani students.The passage also identifies cost and availability barriers in smaller or less-equipped universities.
- Sukoon is proposed as a culturally aware AI chatbot using a validated 20-feature survey to support Pakistani university students.
2. RELATED WORK
Prior research includes machine-learning stress classification and conversational mental-health systems, but the reviewed approaches remain limited in cultural or technical fit for Pakistani university students. The paper addresses this gap by combining stress classification with context-specific wellness support.
- Earlier machine-learning studies classified student stress from survey data, including Random Forest evaluation using an Indonesian DASS-21 sample.Related work also reports context-aware ensemble approaches for stress-level classification.
- Observational research documents mental-health problems among Pakistani university students, including associations involving rumination and worsening outcomes.
- A Zimbabwean open-source chatbot study demonstrated low-cost conversational support but lacked machine-learning stress classification and was designed for another national context.
3. METHODOLOGY
The methodology uses a validated 1,100-response, 20-feature stress dataset, preprocessing, and Random Forest classification across low, moderate, and high stress levels. Classified outputs are mapped to culturally aware, stepped chatbot support.
- 3.1 Dataset: The dataset contains 1,100 student responses across 20 features spanning psychological, physiological, environmental, academic, and social dimensions.
- 3.3 Machine Learning Model: Random Forest takes 20 survey-feature scores as input, predicts probabilities for low, moderate, and high stress, and is compared with SVM on identical data splits.The model was selected for tabular survey performance, overfitting reduction through aggregated trees, and feature-importance estimates.
- 3.4 Chatbot Architecture: Stress predictions are mapped to three stepped-care response tiers whose tone and support intensity increase with detected severity.The design ranges from warm encouragement for low stress to calm, grounding, non-judgmental support for high stress, with Pakistani linguistic and cultural cues.
- 3.5 System Pipeline: The system begins with a 20-question student self-report, then passes normalized features through Random Forest classification before generating chatbot support.
4. IMPLEMENTATION
Sukoon implements a bilingual web assessment that sends preprocessed responses to a Flask backend and Random Forest classifier, then transitions users to an LLM chatbot. Conversation history and a Pakistani-context prompt support coherent, culturally appropriate multi-turn responses.
- The implementation combines Python, scikit-learn, Flask, a 100-estimator Random Forest, joblib persistence, and an OpenRouter-connected open-source multilingual LLM.
- Students complete a bilingual 20-question assessment organized into five thematic steps before the backend preprocesses and classifies their responses.
- After classification, the frontend displays the stress result and culturally appropriate opening message, while subsequent turns retain conversation history and the Pakistani-context system prompt.
5. RESULTS AND DISCUSSION
The Random Forest classifier performed strongly across three stress categories and exceeded the reported comparison benchmark. Feature analysis highlighted physiological and culturally specific relational predictors, while qualitative testing indicated culturally appropriate chatbot responses.
- 5.1 Classification Results: 89.09% accuracy and 0.89 macro F1-score were achieved on the held-out test set across all three stress categories.Class-level F1-scores were 0.87 for Low Stress, 0.92 for Moderate Stress, and 0.89 for High Stress.
- 5.1 Classification Results: Random Forest accuracy exceeded SVM and the reported Zahra et al. benchmark, reaching 89.09% versus 88.48% and 87.93%.The comparison uses test-set accuracy for all three models or benchmark results.
- 5.2 Feature Importance Analysis: Blood pressure was the strongest predictor at 15.6% importance, followed by teacher-student relationship at 10.0% and sleep quality at 9.3%.Anxiety ranked ninth at 4.8%, while social support was among the higher-ranked features at 7.6%.
- 5.3 Discussion of Model Performance: The hybrid system used classifier outputs to inform support tone while the open-source language model generated contextually, linguistically, and culturally relevant responses.The chatbot supported English, Urdu, and Roman Urdu for Pakistani students.
- 5.4 Discussion of Cultural Findings: Teacher-student relationship emerged as a culturally significant stress feature, while low-stress students were mainly misclassified as moderate-stress students.The discussion characterizes this upward error as acceptable in a wellness deployment because it provides extra support.
- 5.5 Chatbot Response Evaluation: Preliminary qualitative testing found correct stress-tier responses and natural, culturally relevant bilingual answers across simulated Pakistani student stressors.Testing covered exam, family, financial, and teacher-related stress, with smooth switching to the chatbot interface.
6. CONCLUSION
Sukoon is a culturally sensitive system designed to detect stress and provide wellness support for Pakistani university students, addressing environmental and relational stresses underserved by existing digital tools.
- 6. CONCLUSION: Sukoon integrates stress detection with culturally adapted AI wellness dialogue for Pakistani university students.The system is designed around environmental and relational stresses specific to Pakistan’s university context.
- 6. CONCLUSION: Teacher-student relationship emerged as one of the most important factors in determining student stress.
7. FUTURE WORK & LIMITATIONS
Future work will improve Sukoon’s cultural relevance and assess its safety and usability, while current limitations concern data representativeness, chatbot evaluation, language processing, and validation design.
- 7.1 Future Work: Primary data collected with an Urdu-translated, clinically validated DASS-21 will support locally representative stress patterns, especially among students transitioning from FSc to university.Future evaluation will also assess cultural appropriateness, emotional safety, response relevance, and user satisfaction.
- 7.2 Limitations: The training data is not representative of Pakistani students, making current feature-importance findings preliminary.
- 7.2 Limitations: Formal user studies with Pakistani university students have not yet evaluated the chatbot’s responses.
- 7.2 Limitations: The system currently uses English with Urdu expressions prompted rather than a fully bilingual NLP pipeline.
- 7.2 Limitations: Classifier performance was evaluated on one stratified split, with k-fold cross-validation planned for more robust estimates and confidence intervals.