2 Building your first virtual assistant

 

This chapter covers:

  • Identifying the intent and entity in a single user utterance
  • Implementing a question-and-answer dialog for a recognized intent. Then, add contextual information to that answer when an entity is recognized.
  • Implementing a multiple-question process flow to satisfy a user request.

In the previous chapter, we learned about what virtual assistants are, why people use them, and some examples of virtual assistants that we encounter every day. In this chapter, you will learn how they work, and you will build an assistant from the ground up. We will work through a case study for a retail company looking to build their first virtual assistant.

The first thing assistants need to do is recognize what user’s utterances actually mean. A conversation starts with a user stating an intent and any related entities. The intent will help the assistant understand what to do next – whether to respond with an answer or to start a new dialog flow. We will first see in detail how the assistant breaks down a user utterance into intents and entities.

The simplest response is for the assistant to respond to each intent with a single “answer” response. We will configure an assistant to recognize a variety of different intents and to give a unique response for each. We will further explore how to provide additional information in a response based on the entities detected in the user’s utterance.

2.1      Building a virtual assistant for FICTITIOUS INC

2.1.1   Creating the assistant

2.2      What’s the user’s intent?

2.2.1   What’s an utterance?

2.2.2   What’s a response?

2.2.3   How does the assistant understand what the user means?

2.2.4   Adding intents to FICTITIOUS INC’s assistant

2.3      Responding to the user

2.3.1   Simple question and answer responses

2.3.2   Contextualizing a response by using entities

2.3.3   An alternate way to provide contextual responses

2.3.4   Responding with a process flow

2.4      Other useful responses

2.4.1   Detecting low confidence

2.4.2   Counting misunderstandings

2.4.3   Implementing confidence detection and the two-strikes rule

2.5      Try it out!

2.6      Summary

sitemap