Evidence Hub

A Multi-Component Framework for Safe Mental Health Chatbots: Integrating Retrieval-Augmented Generation, Sentiment Analysis, and Guardrail Mechanisms

A. Guda, Noor Abdelhady, Yassin Bedier, Ahmed Khattab, A. Hatem, Raghda E. Ali

Internet, Multimedia Systems and Applications, 2026

Abstract

Mental illnesses like anxiety, depression, and stress pose a significant public health problem in the contemporary world since not everyone is able to receive professional help due to the high cost, social stigma, and a lack of specialists. The rise in need for affordable and efficient mental illness treatment prompts researchers to come up with intelligent systems that can provide personalized, safe and effective help. This study focuses on combining the capabilities of a RAG model, safety guardrails, sentiment analysis, and multi metric recommendation systems. Specifically, an artificial system that integrates a manually built RAG using sentence transformer embeddings stored in a FAISS vector database, along with guardrails and sentiment analysis for safe and context-aware conversations, was considered. Evaluation experiments have proven that a method involving cosine similarity with focused retrieval produces the most precise results when retrieving mental illnesses-related data. Also, guardrails improve the reliability and safety of responses. Incorporating RAG, sentiment analysis, guardrails for safety, and recommendations into the framework increases the effectiveness in terms of performance and quality of the responses generated by the system, when compared to the typical RAG architecture. This is demonstrated by attaining a higher BERTScore-F1 score by $\mathbf{2. 3 4 \%}$ compared to the baseline model.

Read the paper

Related studies

Go deeper in Evidence Hub

Evidence Hub adds a study data sheet (design, sample size, evidence level, key numbers), an AI summary and a chat grounded in the paper's text.

Open this study Sign up free