5 Managing Conversational Flow with Dialog Management

 

This chapter covers

  • Understanding Dialog Management
  • Exploring the dialog classes in Microsoft Bot Framework
  • Using prompts to accept user input
  • Exploring the different prompt types available in Microsoft Bot Framework

In the previous chapters, we learnt about Intent and Entity recognition, which help our bot understand the question asked by the user. To recap, the intent tells us about the nature of the question being asked by the user and the entities give us information about the parameters that might be required to answer the question asked by the user. By parameters, I mean the values that might be required for solving a given query. If we go back to our programming corollary, parameters would be the arguments we pass to our function. In our example, if the user asked “how to do a pushup?”, the intent would be ‘get workout info’ and the entity or the parameter required for it would be ‘pushup’. Then we discovered how we can use Luis to integrate intent and entity recognition into our Microsoft Bot Framework bot. And we learnt how to answer these queries using simple text--albeit the text was hardcoded and therefore not very helpful because they didn’t really answer the question and were placeholder responses. These examples all followed a very basic and simple conversational flow, where every question has a single direct answer to it.

5.1   What is Dialog management

5.2   Why we need Dialog Management

5.2.1   Filling incomplete information

5.2.2   Acknowledging the user request

5.2.3   Getting confirmations

5.3   Loops inside the conversational flow

5.4   Exploring the dialog class in Microsoft Bot Framework

5.4.1   Implementing a simple dialog

5.4.2   Dialogs invoking other dialogs

5.4.3   Filling incomplete information using prompts

5.5   Using replaceDialog to loop for the right input

5.6   Different prompt types

5.6.1   Prompts Text

5.6.2   Prompts Confirm

5.6.3   Prompts Number

5.6.4   Prompts Time

5.6.5   Prompts Attachment

5.6.6   Prompts Choice

5.7   Summary