Latest news

How to improve your chatbot in 3 simple steps

No comments

I have developed and tested numerous chatbots, and came to realize a key factor to why most chatbots struggle in user experience. You may be thinking it has to do with the the chatbots purpose or the lack of powerful AI, but thats not usually the case. Actually, many chatbots have a very good purpose, and do solve a real problem or pain.

The main reason these chatbots “fail”, is because of a key element developers miss — Users are expecting to chat, not fill a form. I will use a Weather Bot called Weabo as an example throughout this post. Lets take a look at the following conversation:

The conversation above usually occurs when the chatbot’s logic looks something like this:

function generate_response(message, current_state) {
...
if (current_state == "zipcode.get") {
response = "This is not a valid Zipcode. Please try again";
if (is_valid_zipcode(message)) {
save_user_zipcode(message);
response = get_weather(message);
}
}
...
return response
}

As much as we would hope so, end users don’t always follow the conversation flow we as bot developers, have designed and expected. For most users, this might even be the first time talking to a chatbot. End users don’t understand the complexity of AI and how fragile a bots understanding can be. So they can’t be blamed for doing what they’re supposed to do — simple chat. That’s why you shouldn’t assume state related strict user input, because in many cases the user will be stuck in a infinite loop, and lose patience.

Here are 3 steps you can take to significantly improve your conversational experience without much work:

1. Provide small talk context understanding

In my opinion, every chatbot should standardize itself to understand and respond to basic small talk. You don’t need to be an NLP or Machine expert to supply small talk to you chatbot. Just get familiarized with one of the many great 3rd party solutions out there such as Api.ai, Wit.ai, Lex, etc. These solutions offer simple out of the box solutions for small talk. So for example, if the user asked “What can you do”, you can easily catch that intent via 3rd party APIs and provide the appropriate response. Check out Api.ai’s solution for small talk which I personally recommend and have found very useful — Click here.

To summarize thus far, provide small talk understanding for anything from a basic “hello” or “thank you”, to specific questions such as “what can you do?” In my opinion, this shouldn’t take you more than a days work. Furthermore, once you’re obligated to provide answers to questions such as “what can you do?”, this will push you to really tighten your bots purpose and capabilities.

2. Keep your conversation flow logic loose

Conversation states are crucial to any chatbot so if you’re going in that direction — good job. However, don’t build your flow logic such that you’re expecting a specific and strict input from users, because thats where your bot can seriously fail. Instead, loosen your logic and accept the fact that users might decide to deviate from the flow you’ve designed.

All you have to do, is reverse your current logic. If you’re expecting a Zip code as input at some conversation state, match the current state with the appropriate response only if you’ve first identified a valid Zip code in the users input. Otherwise, treat the current user input as a stateless message, ignore the users current state and respond accordingly. Also, take into consideration the retrieved intent from the 3rd party you’ve decided to integrate. Lets look at a refined example below:

function generate_response(message, current_state, intent) {
...
if (intent == "smalltalk.name.get") {
response = "My name is Weabo :)";
} else if (intent == "smalltalk.help") {
response = "Sure! You can type 'What is the weather in X?'"
} else if (intent == "weather.get") {
response = get_weather(message)
} else if (is_valid_zipcode(message)) {
if (current_state == "zipcode.get") {
save_user_zipcode(message);
response = get_weather(message);
}
}
...
return response
}

After implementing this logic, the conversation example above would look like this:

To summarize, try to first understand the intent/meaning of every incoming message, and only in the right cases, match them with users current states and respond accordingly.

3. Redirect unknown intents to what you know

Lastly, I want to focus on unknown intents. Unknown intents are messages that the chatbot did not understand or knows how to respond to. I have identified that between 70%-80% of all users input falls into unknown intents. There are many blog posts I can write regarding how to improve your bots logic in this case, but for now I’ll focus on one — redirect the user to what your bot can understand. Think of the conversation as a pinball game. The user shoots a ball, and your mission is to make sure the ball doesn’t enter the drains. In order to achieve that, is to provide hints and responses on what your bot can understand. For example: “I might understand this in the future. For now, I can tell you the weather. Try this: whats the weather in new york”.

Most users just want to understand what are your chatbots limits, what it can do, and mostly what it can’t do. The more you assist end users on understanding what your bot can’t do, the less users input will fall into the unknown intents category.

Summary

There is still so much you can do to improve your chatbots conversational experience. The simplicity of significantly improving your chatbots user experience is whats important to understand. More importantly, users want to chat, but mostly understand your chatbots abilities and how to improve their relationship with it. Treat the conversational user interface as you would treat any basic human to human conversation, and forget what you’ve learned about web/app interfaces.

Last note: If you’re not planning to provide basic free text understanding, consider moving to persistent menus/quick replies. Its better to limit the users expectations at first, rather than to disappoint them later.

I hope this post helped you in some way and thank you for taking the time to read it. Feel free to drop a comment if you have any thoughts!

For more chatbot posts: www.assafelovic.com


How to improve your chatbot in 3 simple steps was originally published in Chatbots Magazine on Medium, where people are continuing the conversation by highlighting and responding to this story.

Source: Chatbots Magazine

magnoliaHow to improve your chatbot in 3 simple steps

Related Posts

Leave a Reply