The prevalence of mental illness and suicidal tendencies in our society creates a need for more help than ever. The National Suicide Hotline is a well-known resource for suicide intervention, but sometimes there is a long wait list for people who really need to talk to someone.
What it does
A chatbot that keeps a distressed user engaged and gathers important information while waiting for a human volunteer to become available.
How we built it
Our chat interface is written in html and css using the foundation framework. We use jquery to send the actual messages. Our backend uses Flask to process the messages that the user sends, and generate a response based on both a YAML-defined decision tree and a script that automatically generates comforting responses using basic natural language processing.
Challenges we ran into
Our original idea was to use advanced natural language processing and machine-learning techniques. We found out that these take a lot of research, so our biggest initial challenge was figuring out what we could reasonably build in a short amount of time. The next challenge was figuring out what we would say to the user. This is an important question, because handling the situation improperly could have devastating consequences. We found some hotline training documents online, and one of them suggested questions to ask a person to initially assess his/her condition and decide how severe it is. We decided that our bot could be useful in doing this initial assessment; so the bot asks questions along the lines of "Do you have plans to commit suicide" and "Do you have the means to commit suicide?". The final largest challenge that we probably faced was figuring out how to make generated responses show up properly on the website-- in other words, integrating the front-end and back-end.
Accomplishments that we're proud of
- Built a nice-looking chat window
- Wrote a program that is configurable using YAML, rather than hard-coding configuration options
- Sharing the workload evenly among team members
- Learning brand new technologies extremely fast, regardless of initial skill level ## What we learned
What's next for Project Pyper
When we learn more about language processing, we will be able to make a more sophisticated and useful bot.