Creating a Cognitive Behavioural Therapy chat bot.

Daniel Barrow


Supervised by Alun D Preece; Moderated by Louise Knight

Cognitive Behavioural Therapy (CBT) is a talking therapy that can help participants manage problems by getting them to deconstruct a situation and challenge any negative feelings or thoughts they may have (Mind 2020). Over several years, the NHS has seen a drastic increase in the demand for mental health services but has not seen a sufficient increase in its mental health workforce (British Medical Association 2020). This has lead NHS trusts relying on web-based self-help CBT services to support patients with low-risk mental health disorders such as anxiety, low-mood, and depression (Healthy Minds 2021)(NHS Choice 2021). However, the efficacy of these solutions varies based on its implementation, for unsupported programmes 74% of patient drop out before completing the therapy, with some administrative support 38% of patients drop out and with therapist support 28% drop out (Webb et al. 2017). Consequently, studies like “the use of Automated Conversational Agent in providing CBT to young adults” by Kathleen Fitzpatrick et al (2017) suggest that Automated Conversational Agents or Chatbots may play a part in improving dropout rates. The study suggests that chatbot led CBT help maintain patient’s engagement in therapy and led to greater reductions in symptoms of anxiety and depression in comparison to conventional web-based CBT.

Utilising Natural Language Processing and Sentiment Analysis, this project intends to create a chatbot which can understand the sentiment of a user’s text input and using a Cognitive Behavioural Therapy (CBT) Framework appropriately respond to a user by getting them to deconstruct and challenge their negative feeling or thought.

Due to ethical considerations, this project will not intend to use real patient datasets to create sentiment classification or identification, but rather will use existing NLP datasets to build functionality that can identify negative and positive feelings and thoughts. Feature design will be based on primarily secondary research, supported by some primary research in the form of interviews with individuals who have experience treating mental illness and or the CBT framework.


British Medical Association 2020. Mental health workforce report. Available at: https://www.bma.org.uk/advice-and-support/nhs-delivery-and-workforce/workforce/mental-health-workforce-report [Accessed: 13 April 2021].

Fitzpatrick, K.K. et al. 2017. 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 Mental Health 4(2), p. e19. Available at: https://mental.jmir.org/2017/2/e19/ [Accessed: 13 April 2021].

Healthy Minds 2021. SilverCloud (Online Therapy). Available at: https://www.healthyminds.whct.nhs.uk/silvercloud [Accessed: 15 April 2021].

Mind 2020. What is CBT? Available at: https://www.mind.org.uk/information-support/drugs-and-treatments/cognitive-behavioural-therapy-cbt/about-cbt/ [Accessed: 15 April 2021].

NHS Choices 2021. Self-help therapies. Available at: https://www.nhs.uk/mental-health/talking-therapies-medicine-treatments/talking-therapies-and-counselling/self-help-therapies/ [Accessed: 15 April 2021].

Webb, C.A. et al. 2017. Internet-Based Cognitive-Behavioral Therapy for Depression: Current Progress and Future Directions. Harvard Review of Psychiatry 25(3), pp. 114–122.

Final Report (03/11/2021) [Zip Archive]

Publication Form