Oberoi et al. Res. Trends Int. J. Technol. Innov., April - June 2026, 1 (2) : 45-53
1International Institute of Information Technology Bangalore, Bangalore, India; 2Department of Computer Science and Engineering, Delhi Technological University, New Delhi, India
Article History
Accepted : 31 May 2026
Published : 29 Jun 2026
Publication Issue
Volume 1, Issue 2
April - June 2026
Page Number45–53
Conversational agents deployed in mental health first-response contexts must recognise emotional escalation and route users to human support promptly. This paper fine-tunes a DistilBERT-based sentiment and risk classifier on a curated, de-identified corpus of 22,000 support-chat transcripts to detect five escalation levels, and integrates it into a rule-constrained response generator that defers to a human counsellor above a configurable risk threshold. The classifier achieved a macro F1-score of 0.88 for risk-level detection, and a blinded review by two counsellors rated 91 percent of low-risk automated responses as appropriate.
Keywords - conversational AI, sentiment analysis, mental health, transformer models, risk detection
Text-based mental health support services increasingly rely on triage systems to route the highest-risk conversations to trained counsellors quickly, and automated risk detection can support this without replacing human judgement for escalated cases.
A DistilBERT encoder was fine-tuned on 22,000 de-identified support-chat transcripts labelled by trained annotators into five escalation levels, from routine to imminent-risk. The resulting classifier was integrated into a response pipeline in which only low-risk turns were eligible for automated templated responses, with all higher-risk turns immediately flagged for human handoff.
The fine-tuned classifier achieved a macro F1-score of 0.88 across the five risk levels, with recall for the two highest-risk categories at 0.95, prioritising sensitivity for escalation over precision. In a blinded review of 300 low-risk automated responses, two independent counsellors rated 91 percent as clinically appropriate.
Fine-tuned transformer classifiers can support responsible triage in mental health chat platforms when paired with conservative human-handoff thresholds. Future work will evaluate the system in a live, IRB-approved pilot deployment.
[1] Sanh V. et al., DistilBERT, a distilled version of BERT, NeurIPS Workshop, 2019. [2] Milne D. N. et al., Detecting suicidality in online communities, ACL Workshop, 2016.
© 2026 The Author(s). Published by IJEIA Editorial Office. This is an open access article under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
Tanvi Oberoi, Aryan Khanna (2026). Sentiment-Aware Chatbot Framework for Mental Health First-Response Using Fine-Tuned Transformer Models. IJEIA, 1(2), 45-53.
Sanya Grover, Utkarsh Pandey
Artificial IntelligenceAnanya Rao, Vikram Nair
Artificial IntelligenceRahul Chatterjee, Ishita Sen