2 Building your first conversational AI

 

This chapter covers

  • Identifying the intent and entity in a single user utterance
  • Implementing a question-and-answer dialogue for a recognized intent
  • Adding contextual information to answers when an entity is recognized
  • Implementing a multiple-question process flow to satisfy a user request

In chapter 1, we learned about what AI assistants are and why people use them, and saw some examples of AI 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 its first conversational AI.

The first thing assistants need to do is recognize what a user’s utterances 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, such as respond with an answer or start a new dialogue flow. First, we will see in detail how the assistant breaks 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 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 conversational AI for Fictitious Inc.

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 Why machine learning?

2.2.5 What’s an intent?

2.2.6 What’s an entity?

2.2.7 Combining intents and entities

2.2.8 intents to the Fictitious Inc. 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 alternative 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

sitemap