Chatting with Val
Val is very nice :)
Mental illness affects about 1 in 5 adults in the United States. Although there have been many attempts to address this issue, it all either seemed too expensive, inconvenient, and/or impersonal. We wanted people to be able to access resources on mental health and also have someone they can extensively talk to without spending exorbitant amounts of money. It was important for people to not feel guilty or ashamed of talking about how they feel and whether or not they might be struggling with things such as anxiety or depression.
And so, we decided to create this iOS app, a chatbot for people to receive personalized feedback from an unbiased source. Why is it called Valerian? Valerian is a medicinal plant that is well known for its calming properties and is often used to treat depression, mental stress, and anxiety disorders. Thus, it seemed fitting to name our chatbot Val, so that it can be just as helpful as the actual herb.
What it does
Valerian helps people exercise healthy ways of thinking through a process called cognitive behavioral therapy (CBT). This method is proven to be one of the best options to improve daily mood and overall health. Val is also attentive to the meaning of your words in order to help you identify thought patterns and keep track of your mood day-to-day.
CBT is proven to be one of the best options to improve daily mood and overall health. The key steps in CBT is to: identify and get to know automatic negative thoughts that are spontaneously triggered, ask whether there is concrete evidence or good reason to feel the way you do, challenge your initial thoughts by doubting your instincts, and find an alternative to view the thought or situation. Following these principles, Val can help users by listening to them, actively engaging them, and providing actionable feedback.
How we built it
First, we looked into the history of mental illness treatments and methods. This involved researching CBT and seeing what other similar resources were available. There didn't seem to be any with the exact same approach and goals we had in mind, so then we created a plan for how we can make the chatbot analyze text + return feedback. This resulted in an iOS app that can pull in data from firebase for Valerian's responses to the user.
We used Google's Natural Language Processing API to detect sentiment polarity values of responses submitted by users. We also used IBM Watson's Tone Detection API to detect emotions and moods in the text. With sentiment and tones, we are able to make the CBT delivery much more accurate and tailored towards the user. For example, if somebody often feels anxious in a particular environment, it will detect anxiety and recommend CBT techniques to help improve the person's mood. We built the iOS app in Swift and used JSQMessagesViewController for messaging features and CorePlot for data visualizations, and used Node.js and Express.js to communicate between an iOS frontend and python backend.
Challenges we ran into
One challenge was learning all the different frameworks and languages needed for this project (Swift had a bit of a steep learning curve) and integrating different APIs for sentiment analysis. We wanted to help the user identify negative thoughts and the challenge was to distinguish the topic from the negative emotions/moods. We wanted to use word vectors and key phrase extraction as a way to map similar thought patterns of the user. However, we ran into difficulties integrating the backend with the frontend and did not have enough time. There were many awesome features we wanted to integrate like using FireBase to hold user data and information to factor in progress of the user into our CBT techniques, so that could be a potential future feature. We also had trouble getting the iOS app to work with Heroku, but we were able to make it work locally.
Accomplishments that I'm proud of
For some of us, it was the first time we did iOS development so we definitely all learned a lot this weekend. I'm proud of how we managed to pull together in the end and construct a project that's personally important to all of us. (also we won cup stacking and a week's supply of liquids to help get us through midterms)
What we learned
We learned about a ton of APIs and learned how to integrate them together for our custom sentiment analysis. We also learned more about CBT and NLP theory, mobile development in Swift servers, and servers with Node and Express.
What's next for Valerian
Better sentiment analysis and research into methods for identifying+addressing+treating depression, anxiety, mental disorders without stigmatizing it. We would like to include more real-time statistics and feedback for users, and with permission from the user, real data that therapists and psychologists can also access. In the future we would like to also add machine learning to create more personalized recommendations based on how the user is feeling, as well as animations/interactions to make our avatar really come to life.