From voice-enabled chatbots like Alexa and Google Home to native bots living on Facebook Messenger or Slack, we’ve become accustomed to holding a basic conversation with chatbots. But one of the most cited shortcomings of these chatbots is their inability to understand and convey emotion. Lacking emotional intelligence, current chatbots cannot respond appropriately to a happy or angry user.

This week, thanks to the work of Hao Zhou and his team at Tsinghua University, chatbots are getting a serious upgrade to detect emotional content and respond based on the emotional valence of the conversation. For example, the paper provides various responses to a post concerning Valentine’s Day:

How Does This Work?

Scientists generally categorize emotion into six categories: happiness, sadness, disgust, anger, surprise, and fear. Psychologists and social scientists have long documented a list of emotional valence of words. In fact, there’s even a corpus for over 1.3 million sarcastic comments.

Zhou’s team decided to apply some of this data to emotionally charge chatbots. First, sentiment analysis extracts the high-level emotional content of the conversation. Next, the chatbot generates responses that are contextually and emotionally appropriate. Zhou’s team annotated more than 23,000 sentences from Chinese microblogging site Weibo and trained the chatbot to classify sentences based on the perceived emotional valence. Lastly, the chatbot generates responses using a popular Seq2Seq model similar to how other deep-learning based chatbots behave.

Implications — More Chatbots?

Aside from the cool factor, this development could accelerate the growth of the chabot industry. For now, chatbots are primarily used to retrieve information (e.g. ask for weather, traffic data) or give simple directives (e.g. order items, create calendar event). An emotionally aware chatbot could significantly change the service industry.

While most websites currently have offline chatbots you can talk to, imagine an empathetic bot that can help you solve your issues with the product instead of waiting for a potentially grumpy sales agent. If this technology matures even more, customer service industry may also feel the effects of automation.

Yitaek is the Director of R&D at Leverege who loves learning about IoT, machine learning, and artificial intelligence. He graduated from Duke University with a dual degree in electrical/computer and biomedical engineering and is a huge Cameron Crazie.