PsyRA – A Retrieval-Augmented Dialogue System for Mental Health Support

Authors

  • Muhammad Hassaan Department of Computer Systems Engineering University of Engineering and Technology, Peshawar, Pakistan
  • Muhammad Saad Ali Shah Department of Computer Systems Engineering University of Engineering and Technology, Peshawar, Pakistan
  • Muhammad Uzaif Department of Computer Systems Engineering University of Engineering and Technology, Peshawar, Pakistan
  • Dr Yasir Saleem Afridi Department of Computer Systems Engineering University of Engineering and Technology, Peshawar, Pakistan
  • Rehmat Ullah Khattak Department of Computer Systems Engineering University of Engineering and Technology, Peshawar, Pakistan

Abstract

Mental health support continues to face numerous challenges, including limited access to care, persistent social stigma, and a shortage of trained mental health professionals. In response to these issues, this paper introduces PsyRA, an innovative AI-powered system designed to enhance psychological assessments through a specialized retrieval-augmented generation (RAG) approach. Unlike conventional chatbots that often fail to capture the nuanced context of patient interactions, PsyRA leverages domain-specific psychological knowledge to deliver more accurate and in-depth assessments. It draws from a carefully curated knowledge base that includes psychological research, diagnostic guidelines, therapy exercises, and intervention strategies to inform its responses and suggestions. PsyRA is equipped to understand patient narratives more clearly, provide evidence-based assessments by retrieving relevant psychological information, and offer personalized intervention recommendations tailored to individual needs. Early evaluations indicate that PsyRA is capable of detecting subtle emotional cues within patient conversations and responding in alignment with established psychological practices. The system demonstrates promising potential to broaden access to mental health support, assist professionals in the assessment process, and reduce the barriers that often prevent individuals from seeking treatment. This work contributes to the expanding field of AI-assisted mental health care by illustrating how retrieval-based models can enhance both the depth and quality of psychological assessments, offering improved emotional sensitivity and reliable, evidence-driven guidance.

References

E. G. Lattie, E. C. Adkins, N. Winquist, C. Stiles-Shields, Q. E. Wafford, and A. K. Graham, “Digital Mental Health Interventions for Depression, Anxiety, and Enhancement of Psychological Well-Being Among College Students: Systematic Review,” J Med Internet Res 2019;21(7)e12869 https//www.jmir.org/2019/7/e12869, vol. 21, no. 7, p. e12869, Jul. 2019, doi: 10.2196/12869.

W. H. Organization, “World mental health report: Transforming mental health for all,” Geneva WHO Publ., 2022.

A. A. Abd-alrazaq, M. Alajlani, A. A. Alalwan, B. M. Bewick, P. Gardner, and M. Househ, “An overview of the features of chatbots in mental health: A scoping review,” Int. J. Med. Inform., vol. 132, Dec. 2019, doi: 10.1016/J.IJMEDINF.2019.103978,.

and H. W. Gao, Yunfan Xiong, Yun Gao, Xinyu Jia, Kangxiang Pan, Jinliu Bi, Yuxi Dai, Yi Sun, Jiawei Meng Wang, “Retrieval-Augmented Generation for Large Language Models: A Survey,” arXiv:2312.10997, 2023, [Online]. Available: https://arxiv.org/pdf/2312.10997

W. Zhang and J. Zhang, “Hallucination Mitigation for Retrieval-Augmented Large Language Models: A Review,” Math. 2025, Vol. 13, Page 856, vol. 13, no. 5, p. 856, Mar. 2025, doi: 10.3390/MATH13050856.

L. Laranjo et al., “Conversational agents in healthcare: a systematic review,” J. Am. Med. Informatics Assoc., vol. 25, no. 9, pp. 1248–1258, Sep. 2018, doi: 10.1093/JAMIA/OCY072.

M. W. Liu, Q. Zhu, and Y. Yuan, “The role of the face itself in the face effect: Sensitivity, expressiveness, and anticipated feedback in individual compliance,” Front. Psychol., vol. 9, no. JAN, Jan. 2019, doi: 10.3389/FPSYG.2018.02499.

K. Daley, I. Hungerbuehler, K. Cavanagh, H. G. Claro, P. A. Swinton, and M. Kapps, “Preliminary Evaluation of the Engagement and Effectiveness of a Mental Health Chatbot,” Front. Digit. Heal., vol. 2, p. 576361, Nov. 2020, doi: 10.3389/FDGTH.2020.576361/BIBTEX.

M. V. Kathleen Kara Fitzpatrick, Alison Darcy, “Delivering Cognitive Behavior Therapy to Young Adults With Symptoms of Depression and Anxiety Using a Fully Automated Conversational Agent (Woebot): A Randomized Controlled Trial,” JMIR Publ., vol. 4, no. 2, 2017, [Online]. Available: https://mental.jmir.org/2017/2/e19/

A. B. R. Shatte, D. M. Hutchinson, and S. J. Teague, “Machine learning in mental health: A scoping review of methods and applications,” Psychol. Med., vol. 49, no. 9, pp. 1426–1448, Jul. 2019, doi: 10.1017/S0033291719000151,.

A. Seyeditabari, N. Tabari, S. Gholizadeh, and W. Zadrozny, “Emotion Detection in Text: Focusing on Latent Representation,” Jul. 2019, Accessed: May 21, 2025. [Online]. Available: https://arxiv.org/pdf/1907.09369

D. D. Luxton, “Ethical implications of conversational agents in global public health,” Bull. World Health Organ., vol. 98, no. 4, p. 285, Apr. 2020, doi: 10.2471/BLT.19.237636.

E. E. Lee et al., “Artificial Intelligence for Mental Health Care: Clinical Applications, Barriers, Facilitators, and Artificial Wisdom,” Biol. Psychiatry Cogn. Neurosci. Neuroimaging, vol. 6, no. 9, pp. 856–864, Sep. 2021, doi: 10.1016/J.BPSC.2021.02.001.

A. Sharma, I. W. Lin, A. S. Miner, D. C. Atkins, and T. Althoff, “Towards facilitating empathic conversations in online mental health support: A reinforcement learning approach,” Web Conf. 2021 - Proc. World Wide Web Conf. WWW 2021, pp. 194–205, Apr. 2021, doi: 10.1145/3442381.3450097;PAGE:STRING:ARTICLE/CHAPTER.

P. Lewis et al, “Retrieval-augmented generation for knowledge-intensive NLP tasks,” Adv. neural Inf. Process. Syst., pp. 9459–9474, 2020.

C. J. Cai, S. Winter, D. Steiner, L. Wilcox, and M. Terry, “‘Hello Ai’: Uncovering the onboarding needs of medical practitioners for human–AI collaborative decision-making,” Proc. ACM Human-Computer Interact., vol. 3, no. CSCW, Nov. 2019, doi: 10.1145/3359206.

and S. F. G. Ramesh, T. Liu, “Retrieval-augmented generation for AI-generated content: A survey,” arXiv Prepr. arXiv2401.10733, 2024.

V. Ta et al., “User Experiences of Social Support From Companion Chatbots in Everyday Contexts: Thematic Analysis,” J. Med. Internet Res., vol. 22, no. 3, p. e16235, Mar. 2020, doi: 10.2196/16235.

I. G. Nils Reimers, “Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks,” Assoc. Comput. Linguist., pp. 3982–3992, 2019, doi: 10.18653/v1/D19-1410.

“RecursiveCharacterTextSplitter — ???????? LangChain documentation.” Accessed: May 21, 2025. [Online]. Available: https://python.langchain.com/api_reference/text_splitters/character/langchain_text_splitters.character.RecursiveCharacterTextSplitter.html

W. Y. Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, “Dense Passage Retrieval for Open-Domain Question Answering,” Assoc. Comput. Linguist., pp. 6769–6781, 2020, doi: 10.18653/v1/2020.emnlp-main.550.

S. S. Shahul Es, Jithin James, Luis Espinosa-Anke, “Ragas: Automated Evaluation of Retrieval Augmented Generation,” arXiv:2309.15217, 2023, doi: https://doi.org/10.48550/arXiv.2309.15217.

D. K. Patrick Lewis, Ethan Perez, Aleksandra Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Küttler, Mike Lewis, Wen-tau Yih, Tim Rocktäschel, Sebastian Riedel, “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks,” arXiv:2005.11401, 2021, doi: https://doi.org/10.48550/arXiv.2005.11401.

Y. He et al., “Conversational Agent Interventions for Mental Health Problems: Systematic Review and Meta-analysis of Randomized Controlled Trials,” J. Med. Internet Res., vol. 25, no. 1, p. e43862, Apr. 2023, doi: 10.2196/43862.

A. S. Miner, A. Milstein, and J. T. Hancock, “Talking to Machines About Personal Mental Health Problems,” JAMA, vol. 318, no. 13, pp. 1217–1218, Oct. 2017, doi: 10.1001/JAMA.2017.14151.

“Woebot: The Mental Health Ally - Apps on Google Play.” Accessed: May 21, 2025. [Online]. Available: https://play.google.com/store/apps/details?id=com.woebot&hl=en&pli=1

“Wysa - Everyday Mental Health.” Accessed: May 21, 2025. [Online]. Available: https://www.wysa.com/

“How Retrieval-Augmented Generation (RAG) Supports Healthcare AI Initiatives.” Accessed: May 21, 2025. [Online]. Available: https://www.makebot.ai/blog-en/how-retrieval-augmented-generation-rag-supports-healthcare-ai-initiatives

“Retrieval-augmented generation - Wikipedia.” Accessed: May 21, 2025. [Online]. Available: https://en.wikipedia.org/wiki/Retrieval-augmented_generation

Downloads

Published

2025-05-18

How to Cite

Muhammad Hassaan, Muhammad Saad Ali Shah, Muhammad Uzaif, Dr Yasir Saleem Afridi, & Rehmat Ullah Khattak. (2025). PsyRA – A Retrieval-Augmented Dialogue System for Mental Health Support. International Journal of Innovations in Science & Technology, 7(7), 279–288. Retrieved from https://journal.50sea.com/index.php/IJIST/article/view/1365