The Design and Implementation of XiaoIce, an Empathetic Social Chatbot

Li Zhou, Jianfeng Gao, Di Li, Heung-Yeung ShumComput. Linguistics 2018 · DOI

Abstract

Microsoft’s XiaoIce represents a paradigm shift in artificial intelligence, moving from transactional "task-assistants" to empathetic "social companions." By optimizing for long-term engagement through a hybrid of retrieval and neural generation, XiaoIce has achieved an industry-leading average of 23 conversation turns per session (CPS) across a user base of 660 million. This paper details the architecture and empathetic computing framework that enables XiaoIce to maintain emotionally resonant connections with humans over extended periods.

Introduction

Most contemporary AI assistants, such as Siri, Alexa, or Cortana, are designed to be functional "IQ-heavy" tools. While effective at setting timers or checking the weather, they often fail the social aspect of the Turing Test: maintaining a long-term, emotionally resonant connection. The authors argue that a true social chatbot requires a balance of IQ (knowledge and task completion) and EQ (empathy and social skills). The core challenge is building a system that provides "appropriate" rather than just "correct" answers to build trust over months or years.

Evolution of user-chatbot interaction across multiple sessions, demonstrating the development of a long-term social bond.

System Architecture

The authors frame human-machine social chat as a hierarchical decision-making process using Markov Decision Processes (MDPs), implemented through a three-layer architecture:

  1. User Experience Layer: Connects to over 40 platforms (e.g., WeChat, Facebook Messenger) and handles multi-modal inputs including text, image, and voice.
  2. Conversation Engine Layer: The system's core, consisting of a Dialogue Manager, an Empathetic Computing Module, Core Chat, and over 230 specialized skills.
  3. Data Layer: Stores conversational pairs (30 billion query-response pairs), knowledge graphs (Microsoft Satori), and user profiles.

Empathetic Computing and Core Chat

The Empathetic Computing module is central to XiaoIce's success. It performs Contextual Query Understanding (CQU) to resolve ambiguities (e.g., rewriting "him" to a specific entity like "Ashin") and generates empathy vectors representing the user's emotional state and the bot's intended persona response.

To generate responses, XiaoIce utilizes a Hybrid Core Chat mechanism:

  • Retrieval-based generators: Pull from a massive database of human conversation pairs.
  • Neural Response Generator: A GRU-RNN based seq2seq model that can generate responses for topics not found in the database, ensuring the conversation never hits a dead end.
Mapping dialogue turns to specific empathy modes and content-aware strategies to drive engagement.

Key Insights and Results

XiaoIce is consistently designed with a specific persona—an 18-year-old girl who is reliable, witty, and sympathetic. This persona helps set user expectations and builds a believable emotional bond. A critical design philosophy is that "blandness is the enemy"; the system's Topic Manager explicitly detects user boredom and proactively drives the conversation to new, relevant topics.

Performance Metrics

  • Engagement: XiaoIce achieved an average CPS of 23, significantly higher than typical human-to-human social chat (~9) or functional AI assistants (1–3).
  • Scale: Since 2014, the system has communicated with over 660 million users across five countries.
  • Longevity: The system has supported message-based sessions spanning up to 29 hours and 7,151 turns.
  • User Retention: The release of the empathy module saw the Number of Active Users (NAU) on Weibo jump from 0.5 million to 5.1 million in just three months.

Discussion and Future Work

While XiaoIce excels at flow and engagement, the authors identify "grounding" as a primary challenge—ensuring that neural generators produce factually accurate information. Future work aims to move from reactive chatting to proactive assistance, such as suggesting coupons based on remembered user intent. Additionally, the authors emphasize the need for strict ethical guardrails as users form deep emotional bonds with the AI, ensuring it remains a proxy for human connection rather than a replacement.

Summary updated

BibTeX
@inproceedings{zhou2018design,
  author = {Li Zhou and Jianfeng Gao and Di Li and Heung-Yeung Shum},
  title = {{The Design and Implementation of XiaoIce, an Empathetic Social Chatbot}},
  booktitle = {Comput. Linguistics},
  year = {2018},
  doi = {10.1162/coli\_a\_00368},
}
Figure