Information Technology - Blog V-Soft Consulting

Chatbot Development:  Designing  Dialog  Management

Written by Charan Sai Dasagrandhi | Mar 28, 2019 2:10:29 PM

Chatbots are known for their human-like conversational abilities. To generate better user experiences, businesses have been working hard to make human-chatbot conversations more humane. Dialogue management is the crucial aspect that makes chatbots to conduct contextual communications. Understanding aspects that get the dialogue management agent design right is key to the success of chatbot development. 

Dialog Management In Chatbot Development

A dialogue system is a computer system that is able to engage in an interactive dialogue with a human user about a particular topic. Metaphorically, all interaction can be seen as a kind of dialogue."  

-Joris Hulstijn.

Dialog Management determines the actual context of the dialogue. For example, the user might say “I need to order ice cream” and the bot might take the order. Then the user might say “Change it to coffee,” here the user refers to the order he has placed earlier, the bot has to correctly interpret this and make changes to the previous order before confirming with the user. Dialog management plugin enables us to do this. Dialog management has the following key plugins:

Figure: Choosing the best action to perform based on conversation

  • Feedback Mechanism: The agent takes the feedback from user to learn if the bot is doing fine with the conversation and the user is satisfied with the bot’s response. This reinforces the bot to learn from mistakes and correct itself in future conversations.
  • Policy Learning: Policy learning is a higher-level framework that teaches the bot positive language to improve overall end-user satisfaction. Broadly it creates the network of “happy paths” and routes the conversation to end-user satisfaction. The bot then tries to learn from the interaction and follow the conversation flow it had with similar users in the past. This makes use of reinforcement learning technique. 

Understanding Dialog Manager

Figure: Simplified Flow of a Conversational Chatbot

Few NLP systems use collective response models to generate responses more appropriately. The response models consider dialog history as the key input in generating responses in natural language text that are more user-friendly. To generate a responses that are satisfactory to the user, often dialog managers must make a trade-off between instant and long-term user satisfaction.

The response models are programmed to use a diverse set of tactics to output responses on varied topics. Here comes the role of the dialog manager in generating an appropriate response, by compiling various outputs generated by different response models. Here dialog history is crucial to the dialog manager’s decision-making process.

Based on the user input the Natural Language Understanding (NLU) unit  component of dialog systems generates the semantic representation for the dialogue task. Here it is dialog manager who is responsible for regulating the entire structure of dialogue. The dialog manger gets the input from the NLU components, maintains some sort of state or interface with task managers passes output to NLG. Usually, finite state and frame-based architectures are used by most of the dialog management projects, apart from these based on the chatbot use case some even go for most advanced probabilistic architectures that are information-state dialogue managers based on Markov decision processes.  

Dialog Manager Control Flow

Figure: Dialogue Manager Control Flow of a chatbot

To generate a correct response, the dialog must manage this generic procedure:

  • Gather user responses from all the response models
  • Check if any priorities are defined in the list of user responses and pick the response that holds the highest priority.
  • In case of no priority defined, some dialogue managers pick the responses based on the model selection policy. In this policy, the model selection policy may rate all the user responses and choose the response that holds the maximum score.

Evaluating Dialog Manager

User testing and evaluation is crucial to dialog systems design, as a part of this often development teams follow the below steps in a iterative manner: 

  • Study users via interviews surveys
  • Conduct investigations if any similar systems available,
  • Study various related to human-human communication transcripts
  • Develop simulations and prototypes to test the dialogue conducting capabilities
  • Test on various user groups
  • Collect Chat Transcripts
  • Post-Chat Surveys
  • Monitor Success Metrics

User satisfaction survey is considered crucial aspect of dialog system design. user satisfaction survey proposed by Walker et al. in 2001, is considered standard set of aspects dialog system designers can refer:

TTS Performance

Was the system easy to understand?

Task Ease

Was it easy to find the message you wanted?

Interaction Pace

Was the pace of interaction with the system appropriate?

System Response

How often was the system sluggish and slow to reply to you?

Expected Behavior

Did the system work the way you expected it to?

Future

Use Do you think you’d use the system in the future?

TTS Performance
Was the system easy to understand?
Task Ease
Was it easy to find the message you wanted?
Interaction Pace
Was the pace of interaction with the system appropriate?
System Response
How often was the system sluggish and slow to reply to you?
Expected Behavior
Did the system work the way you expected it to?
Future
Use Do you think you’d use the system in the future?

Table: User satisfaction survey, proposed by Walker. Source: Dialogue and Conversational Agents, Pearson Education.

References