Back to Parent

Outcome


Context 

About 40 million people in the United States suffer from chronic long-term sleep disorders each year and an additional 20 million people experience occasional sleep

Inspired by [CallFrank] and chatbots like [insomnobot3000] by Casper Mattress, Sleepyhead provides a new way to tackle insomnia, a friend by your side to make it through the long sleepless nights. However, Casper is just a SMS bot, which led me to think something like Google Assistant or Alexa would be more appropriate, someone you can directly talk to. Below is an example of an interaction with the Casper bot: 

Insomnobot3000
Show Advanced Options

1. Identifying the Problem 


It has come to my attention that more and more people are suffering from insomnia and issues sleeping due to a variety of factors. This has led to a pandemic rise in feelings of loneliness and isolation, especially among young adolescents. I thought that perhaps there is a way to use Conversational UI to create a sleep companion that will talk to you and suggest music late at night. I chose to work with Alexa as it avoids the user's exposure to blue light at night.  Hence what if there can be a bot that you can talk to during the hours of the night, but then will send you text updates throughout the day? 

Slot
Show Advanced Options

Example of SMS response through the day: 

Ideation diagram2
Show Advanced Options

Intention

Sleepyhead is a voice empowered chatbot that connects to Alexa/Google Home. Here are some of its main functions.

  • Regular check-in
  • Provides regular reminders
  • Interesting sloth facts
  • Provides guidance and support
  • Always listens
  • Links to Music, Podcast, Headspace, Stories…
  • 1. Bot Personality 

    The below bot personality exercise helped me determine what kinda of chatbot I wanted and potentially what the conversation flow is going to be. Sleepyhead is a carefree sloth that is caring but also funny. The conversation should be easy and lighthearted.  

    Bot personality worksheet
    Show Advanced Options

    1. User Flow 

    Crafting the conversational flow of the bot is essential in its success. Initial usability testing was conducted to test out what essential functions were needed. 

    Workflow
    Show Advanced Options

    3. User Testing 

    Sample conversation testing to refine end conversation   

    George [12:52 PM] Hey, you up?

    Sleepyhead [12:53 PM] Yup, always. Are you ?

    George [12:53 PM] Yeah, I can't sleep

    Sleepyhead [12:53 PM] What's keeping you awake?

    George  [12:53 PM] ALL OF THESE THOUGHTS RACING THROUGH MY BRAIN ITS TRUEEEE

    Sleepyhead [12:53 PM] Hmmmm, do you want to talk about it ?

    George [12:54 PM] I want to go to sleep

    Sleepyhead [12:54 PM] Well, usually talking about it helps

    George [12:54 PM] bark

    Sleepyhead [12:54 PM]  I dont quite understand, do you want to be entertained or do you want to talk about it

    George  [12:54 PM] I keep being haunted by dreams of a giant dog and I can't sleep without fear of the dog

    Sleepyhead [12:55 PM] Well lets dig deeper

    George [12:55 PM] dogs dig.... im scared

    Sleepyhead [12:55 PM] Maybe it is something from your childhood?

    George [12:56 PM] No.but PBS kids was a big part of my childhood the dog is always red and big

    Sleepyhead [12:56 PM] I am scared of big dogs too

    George [12:56 PM]awwww

    Sleepyhead [12:57 PM] clifford was scary

    George [12:57 PM] DONT SAY HIS NAME

    Sleepyhead  [12:57 PM] whoever thought of making a red dog is crazy

    George [12:57 PM] _-

    Sleepyhead [12:57 PM] sorry would you like me to do something to distarct you? I can sing you a song or play some calming music or a tedx podcast might help alleviate your fear

    George [12:58 PM] I would like to not think about the red thing a song would be nice

    Sleepyhead [12:58 PM] alright then, I will sing you a lullaby

    George [12:58 PM] i am ready

    Sleepyhead [12:58 PM] ba ba black sheep

    1. Designing the Conversation

    In Alexa, the conversation is designed through intents on the Alexa Developer Console. Similar to Dialogue flow for the Google Assistant, you can set designated intents that can be triggered by different user utterances. The challenge here is that you can to be very specific when designing the conversation, and have to project that the user might say and how they may say it. Then on the server side design the different intents to trigger different speech responses. These intents are connected by making a HTTP request to the Alexa webhook '/incoming/alexa'. Below is a section of the sample code used in the Ruby Sinatra framework. [app.rb]

    Show Advanced Options

    2. Storing Session_Attributes 

    I soon realized that to have a productive and natural conversation it is important to remember what the user might have said in previous responses and to have followup questions if needed. Since I did not store the user's information in a database, I chose to store the session using the special Alexa session_attributes to store the specific information in the slots. Slots are variables in a general utterance that can change. For example, the [Mood] slot might contain a variety of different emotions such as [happy, sad, mellow, chill, angry]. The information in the slots can then be stored to invoke some sort of action or be used in future conversations. 

    Screen shot 2018 10 19 at 1.08.14 pm
    Show Advanced Options
    Show Advanced Options

    3. API Connection 

    For this project, I chose to connect to two APIs to perform specific actions based on the intent.

     1) Spotify // Making music suggestions and suggests  playlists 

    2) Yelp // Making late night suggestions and make potential food suggestions if hungry 

    Show Advanced Options
    Show Advanced Options

    Challenges 

    Throughout the process, I faced many technical and non-technical challenges that I had to overcome.

    Technical Challenges

    A major technical challenge I faced was working with the rigid format of the Alexa. Alexa only gives very specific types of responses, such as <text> or <ssml>, in which case I am restricted in the response format. Another difficulty was tackling with the Natural Language Processing aspect of the conversation. As with different users, sometimes it is extremely difficult what responses will be given and currently, the training aspect of the utterances is still quite rigid and limited. 

    Non-Technical Challenges 

    I struggled with having the right user responses and catering to different needs. Perhaps with more extensive user research, I will be able to modify and refine the conversation to be more empathetic. 

    Takeaways

    Overall, this was a very rewarding exercise that allowed me to gain a deeper understanding of how conversation UI worked and what potentials it has in improving people's lives. It has also exposed to greater ethical issues dealing with the collection of data and privacy issues. I would love to see where more user research and the incorporation of a database would take the project. 

    Sleepingsloth copy
    Show Advanced Options
    Drop files here or click to select

    You can upload files of up to 20MB using this form.