bots how teach them to speak Artificial Intelligence

How to teach a Bot to talk: examples

02/04/19

One of the main elements when designing a Chatbot is teaching it to answer the questions in the best possible manner regarding the topics under its knowledge, that is, you need to teach it “how to talk”. Before this post, may you prefer to read this one: What is a chatbot and how to use it?

What is the aim of our Chatbot

Conversation design: examples

How to achieve a natural language

Know your target

What is the aim of our Chatbot

The first thing we need to know is how we want our Chatbot to answer the user and which goals we want to achieve: customer service, query resolution, obtaining user data (for example: the status of the accounts), management of services’ booking, etc.

Once we have defined the aim, we have to design the conversational experience. Here we have to define the main conversations the Chatbot will be using to interact with our users. Literally: this is where we taught it how to speak.

chatbot objective what can i help you with

Conversation design: examples

In the design, it is useful to make summaries, mind maps, complete navigation streams… you need to bear in mind all possible conversation options, making sure they’re coherent and that they all have a corresponding answer.

The first thing to be done in every conversation is finding out what the issuer is asking for. In our case, the user. That is, their #intention. But we also have to determine which part of the question or user’s expression is data. This data is what we call @entities. This information is indispensable in order to properly generate the answers.

Depending on the intention, it’s possible that there’s no need for entities to happen. For example, when greeting.

Let me show you with some examples:

#Greeting

The most basic intention is greeting, so we will start to teach him how to do so. After creating the #Greeting intention (and giving him some answers like “Hello” “Hi” “Heeeeey”), we have to teach him to identify what the user is trying to say with that answer. How? With training. That is, we add all possible ways the user may use to greet, and we also want the Chatbot to reply with the #greeting intention.

In this case, they will include: “Hello”, “Good evening”, “Good morning”, “Hey”, “What’s up?”.

#BuyTickets

Let’s shake things up a little bit. We need a Chatbot for a ticketing page. Besides from greeting, the ideal thing would be for it to help you buy tickets. Therefore, we create the #BuyTickets intention and we will have to teach it how to “Buy tickets for tonight’s concert at Manchester Theatre”, “Buying tickets for John Mayer London”, or even more specific “I want to buy 5 standing tickets for Beyonce’s concert in NY”.

In this case we will also need @Entities, which is the data we’d use to filter the result. We would create the following entities: @Event, @City, @Day, @TypeOfTicket, @NumberOfTickets.

#BookATable

Now think that you may want to book a table at some restaurant.

For our Bot to identify your intention, we will teach it phrases like: I want to book a table, I need a table for tonight, I would like to book a table for dinner, I look for a table in X restaurant…

In this case, we have the entities, since “booking a table” is an intention that requires more data to be completed. Like the day we want our reservation to take place or the number of people there will be. Therefore, beside from the intention, we need to create the following entity groups: @Restaurant, @Date, @Hour, @NumberOfPeople.

Once the intention has been detected, if the Chatbot doesn’t have the necessary entities in the expression to give out an answer, the conversation will carry on until it has the necessary values to complete the intention. Like in this dialogue:

  • [User] I want to book a table for tomorrow at 22:00 in Palace Hotel Madrid.

 (Here the Chatbot already knows: Intention #BookATable, Entities @Restaurant; Palace Hotel Madrid, @Date: actual date + 1, @Hour: 22:00. The only thing lacking is the number of people, therefore asking the user for that specific information).  

  • [Bot] For how many people do you need the reservation?
  • [User] For 4

(The Chatbot already has the entity that lacks for the intention: @NumberOfPeople: 4)

  • [Bot] I have just booked a table for 4 for tomorrow at 22:00 in Palace Hotel Madrid. Number of reservation: 123456
bot conversation design example

How to achieve a natural language

After designing the dialogues, we have to simulate them with several people. We will therefore achieve a very natural conversation with the Chatbot, ensuring that we don’t step outside the lines of the conversation.

Some writing advices:

  • Use simple language
  • Always use the 2nd person, since it’s a conversation between two people
  • First-name the user
  • Never use capital letters. You know it translates into anger when it comes to messages
  • Use the neutral gender, we don’t know who we’re talking with
  • If the user constantly asks for things the Chatbot doesn’t know, remember them that it’s a Chatbot and whether they need to be redirected to a human operator
  • The greeting message has to be clear, meeting the expectations of the user and stating in which matters it can help the user. The objective we talked about before J
  • Divide long messages in a couple of short ones
bot natural language processing

Know your target: who might be on the other side?

It’s important to know which kind of users are going to interact with our Chatbot. Plus, how they will do so. Knowing this data is key to determine the behavior of the bot and defining its personality. The expressions and language used will be different when addressing Millennials looking to #BuyTickets than when addressing insurance clients.

The type of user also influences the channel in which the bot will answer: a channel like Facebook Messenger may be good for Millennials, but for insurances maybe the Web is more appropriate, right?

To finish: don’t forget that a Bot never stops learning

The bot is a system that requires constant updating and knowledge. We need to test conversations, analyze results, solve miscommunication mistakes, train the bot and try again.

Last but not least, remember to measure how the Chatbot is answering questions and keep track of the failure rate. This will help you know whether conversations are being effective or have to be redesigned.

Author: Ernesto Rubio

Santander Global Tech

 

Other posts