/depression-bot

AI conversational chatbot which helps depressed clients using concepts of Cognitive Behavioral Therapy

Primary LanguagePython

depression-bot

The anti depression bot is an attempt to utilise techniques used in Cognitive Behavioural Therapy to get an idea of and help a company employee solve his or her problems that cause stress and affect work efficiency. The basic idea behind this is that stress at workplaces can be caused due to a multitude of factors such as personal problems, health issues, social problems or ineffective time management. The approach is to divide workplace stress, which is caused due to work environment factors, into six categories which effectively cover the causes of such stress. These categories are health, time management, assertiveness, social skills, problem solving skills and positive thinking. The details are as follows.

Designing the conversation flow

To make the bot we will be using a binary classification sentiment analysis neural model. This model has been trained on data taken from Twitter and Reddit and it can classify between positive and negative responses from the end user. To use this model and carry on a conversation we need to first design a conversation flow. This basically uses CBT principles which advocate questioning a person to understand his or her problems and then, either help the person understand it's illegitimacy (if the problem being faced is due to self imposed negative thoughts) or help the person by providing some potential solutions to his or her problem. The conversation flow first asks the person a few questions which can help determine the category that his or her problem belongs to. Then depending on the determined category we the bot gives its responses and poses questions to the user. The responses from the user's side are then classified as positive or negative responses and depending on that the next response or question is posed by the bot. The flow is designed in such a way so as to help the user open up at certain stages and help the person identify and find a solution to his or her problem. We have also placed a mechanism to initiate conversations from other categories so as to cover as many problems as possible. The conversation ends at an appropriate stage with the user's permission.

The Sentiment Analysis Model

The neural model used here is a binary classification sentiment analysis model which has been trained on Twitter and Reddit data. The model uses a variation of the attention model to decide the polarity of the response which gives better results in case the user responses are longer. The model has been able to achieve a good level of accuracy.