Setting realistic expectations for automated conversations powered by NLP
If you like this story, consider taking my Dialogflow Course.
Natural Language Processing (NLP) has changed the way businesses can communicate with customers, but using the technology to maintain continuous dialog as though you’re chatting with a friend, isn’t the right way to use the technology.
You can process free-form messages with more sophisticated technology by automatically extracting useful data from those messages. If there is any back and forth dialog, then it should be focused on a goal — to get the data you need.
For your business, the goal is serving customers on autopilot which can reduce human support costs and boost revenue. For your customers, the goal is getting an immediate response that is useful to them. Answering questions is an ideal use-case because many questions are frequently asked and by automating your understanding of those questions and your responses, you can achieve both goals of the customer and the business.
For example, if a user asks the question:
“Where is my order? It’s been 2 weeks.”
You can process that information with NLP in a couple of ways. First you’ll use a phrase to understand the general structure of the message, and then you’ll extract values out of that message that give you the data you need to respond.
Understand the meaning of words inside of phrases
For the above example, I created a Dialogflow entity called @purchase
and that entity contains a list of possible values that a user might say in order for me to understand what they mean. If they didn’t say “Where’s my order?” they could have said:
Where is my item?
Where are my shoes?
I only need to add one phrase to understand the user. Words including order, purchase, item, shoes, etc. are all possible values stored in my @purchase
Dialogflow Entity and by highlighting a single word in a phrase and selecting the entity, I will accept any of the possible values I have added to my entity.
The user also included, “It’s been 2 weeks” in their message and that indicates a period of time. That value could have been 3 hours, 2 months, or 4 days. Fortunately, Dialogflow takes care of that automatically for you with a System Entity that understands duration and will extract a value you can work with to intelligently respond.
Store values for future use
Any of the values I can extract from a message using an entity will be stored in a Dialogflow Parameter. It’s stored there temporarily so I can use the parameter values I extract in a Dialogflow response. I like to store those values somewhere in an external database such as Manychat and re-use these values to create more rich, interactive responses.
Get more values if you need them
Any continuing back-and-forth messaging should be purely focused on achieving yours and your customer’s goal. When you receive a message, you might need to follow-up and reply to the user with another message in order to get more information, but the goal should be to answer the question or complete the task.
Using our example, you might respond with something like “Do you have an order number?” The user might then respond with “Yes”, or, “Sorry, no”, or the order number itself. Maintain the context of the original message (so you’ll no what their response is in reference to). If they input their actual order number, then you can store that value and respond with “I’ll look up your order and get back to you as soon as possible!”.
At that point, the order information the user inputs could be saved to a parameter and you can then send the parameter value to an order lookup system, or it can be stored in a customer profile database (as a User Attribute, Custom Field, or saved in a CRM) so that you can better assist them.
Here is what my example might look using Dialogflow with my original intent that captures the order issue, and a series of follow-up Intents that capture things users might say after your bot’s initial response (“Do you have order details?”)
Using NLP, you are able to extract the information you need to better respond to a user and store values you can use to better respond to the customer.
Any attempts by the user to engage in long conversations, or off-topic conversations should be avoided with the bot constantly re-focusing the user on both the goal of the customer (get the right response) and the goal of the business (Provide support, or generate revenue).
Remember that integrating conversational AI is a process. You’ll need to train AI to understand the messages users say to your business, create responses, and store the values you need to create accurate responses.
Want to connect your Chatbot to Dialogflow and start experimenting with NLP? Janis can connect your bot to Google’s NLP for free.
If you like this story, consider taking my Dialogflow Course.