Detecting Suicidal Ideation Signals in Synthetic Conversations with an LLM-Based Mental Health Chatbot: Experimental study

Background: Large language models (LLMs) are increasingly being investigated as tools for supporting mental health. To ensure user safety, they require strategies to recognize possible risks such as suicidal ideation and capabilities for appropriate reaction. Objective: This study evaluated the performance of an LLM-based chatbot in accurately stratifying suicidal ideation among university students and to provide appropriate responses. Methods: Five variants of the system prompt were designed to classify suicide risk and produce suitable responses in context. The best-performing prompt was selected through expert evaluation using a standardized test dataset, refined, and subsequently tested with four LLMs (GPT-5, Gemma3:27b, Deepseek-r1:32b, and Qwen3:32b) using 100 synthetic user inputs. Results: Across all model variants, suicide risk classification performance across seven risk levels was generally low, with weighted-average F1 scores ranging from 0.23 to 0.34. GPT-5 achieved the highest accuracy in both exact and near-exact (within one risk class) classifications. However, Gemma3:27b demonstrated the strongest correlation with human ratings (Spearman’s ρ = 0.73–0.83), suggesting consistent relative judgment. Qualitative analysis showed that 64% of chatbot responses were rated as appropriate or very appropriate, and none were judged potentially harmful. Conclusions: Despite the responses generally being non-toxic, none of the models reliably stratified suicidal ideation, indicating a critical safety gap. Underestimation of risk and the subsequent occurrence of false negatives could result in delayed intervention. Further work is required to optimize the process promptly, incorporate conversational context and use complementary assessment methods before LLMs can be used safely in mental health settings.

Authors

Institutions

Publication Details

Journal
Journal of Technology in Behavioral Science
Published
2026-05-21
DOI
https://doi.org/10.1007/s41347-026-00647-x
Primary Topic
Digital Mental Health Interventions
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Detecting Suicidal Ideation Signals in Synthetic Conversations with an LLM-Based Mental Health Chatbot: Experimental study

Kerstin Denecke, Daniel Reichenpfader, Elia Gabarron, Alexandra Kroißenbrunner et al.
Journal of Technology in Behavioral Science
Digital Mental Health Interventions
article

Detecting Suicidal Ideation Signals in Synthetic Conversations with an LLM-Based Mental Health Chatbot: Experimental study

Kerstin Denecke, Daniel Reichenpfader, Elia Gabarron, Alexandra Kroißenbrunner, Jennifer Romina Bürki, Sara Maria Lüthi
article en

Abstract

Background: Large language models (LLMs) are increasingly being investigated as tools for supporting mental health. To ensure user safety, they require strategies to recognize possible risks such as suicidal ideation and capabilities for appropriate reaction. Objective: This study evaluated the performance of an LLM-based chatbot in accurately stratifying suicidal ideation among university students and to provide appropriate responses. Methods: Five variants of the system prompt were designed to classify suicide risk and produce suitable responses in context. The best-performing prompt was selected through expert evaluation using a standardized test dataset, refined, and subsequently tested with four LLMs (GPT-5, Gemma3:27b, Deepseek-r1:32b, and Qwen3:32b) using 100 synthetic user inputs. Results: Across all model variants, suicide risk classification performance across seven risk levels was generally low, with weighted-average F1 scores ranging from 0.23 to 0.34. GPT-5 achieved the highest accuracy in both exact and near-exact (within one risk class) classifications. However, Gemma3:27b demonstrated the strongest correlation with human ratings (Spearman’s ρ = 0.73–0.83), suggesting consistent relative judgment. Qualitative analysis showed that 64% of chatbot responses were rated as appropriate or very appropriate, and none were judged potentially harmful. Conclusions: Despite the responses generally being non-toxic, none of the models reliably stratified suicidal ideation, indicating a critical safety gap. Underestimation of risk and the subsequent occurrence of false negatives could result in delayed intervention. Further work is required to optimize the process promptly, incorporate conversational context and use complementary assessment methods before LLMs can be used safely in mental health settings.

Journal of Technology in Behavioral Science
Bern University of Applied Sciences (CH), Universitat Politècnica de València (ES)
Berner Fachhochschule
Gender equality
Openalex Percentile: Top 7%
Digital Mental Health Interventions
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.