Accepted for/Published in: JMIR Mental Health
Date Submitted: Mar 27, 2025
Date Accepted: Sep 21, 2025
Date Submitted to PubMed: Sep 26, 2025
A Prompt Engineering Framework for Large Language Model–Based Mental Health Chatbots: Design Principles and Insights for AI-Supported Care
ABSTRACT
Background:
Artificial intelligence (AI) presents a transformative opportunity to revolutionize access to and the nature of mental health care, offering the promise of on-demand, scalable, and individualized support. To ethically and effectively leverage this potential, rigorous attention must be paid to prompt engineering in AI-powered therapy chatbots.
Objective:
This study aims to investigate the current landscape of mental health Chatbots and develop an end-to-end prompt engineering framework. The goal of this study is to integrates evidence-based therapeutic models, user-centric design, and robust ethical safeguards to improve the safety, empathy, and effectiveness of AI-driven mental health interventions.
Methods:
We propose a three-stage prompt design framework, combining clinical evidence from therapies such as CBT, ACT, and DBT with technical strategies for prompt customization. The framework incorporates user state monitoring, ethical controls, and real-time feedback loops. This process also involves careful crafting of prompts that customize the conversational tone.
Results:
Our framework demonstrates that deliberate and carefully crafted prompt engineering enhances the safety, empathy, and scalability of AI-based mental health care. Example cases and design guidelines confirm that the integration of clinical best practices with advanced prompt strategies significantly improves response quality. Besides, we incorporate insights from recent advancements in prompt engineering for mental health applications and offer a comprehensive plan for validation that includes well-stated evaluation criteria and critical dimensions of evaluation.
Conclusions:
Through example cases, design guidelines, and successive testing, we demonstrate that careful design and crafting of prompts is pivotal to delivering safe, empathetic, and effective mental health care at scale. Our integrated approach shows promise in transforming AI-based mental health chatbots into safer and more effective tools. Future work should focus on rigorous clinical validation, long-term engagement studies, and continuous refinement of ethical safeguards to fully harness AI’s potential in mental health care.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.