Use Customer Conversations To Create Intents & Intent Examples

And How To Do This Automatically Using IBM Watson Assistant

Cobus Greyling
5 min readMay 2, 2021

--

Introduction

Intents are the frontline of any traditional chabot or conversational AI agent.

Chabot architecture is very much universal across commercial chatbot platforms; being constituted by:

  • Intents
  • Entities
  • Bot Responses (aka Script / Bot Dialog)
  • Sate Machine (Dialog) Management
The Four Pillars Of Traditional Chatbot Architecture

Intents are there to define the intention of the user, and each user utterance needs to be matched to a specific intent which are obviously pre-determined. The challenge is that each intent is a gate the conversation enters through in order to reach the dialog.

Intents also define the domain of the chatbot, and by implication if a user conversation is in or out of domain.

A dataset was used with technical questions from Stack Overflow.

The challenge is to decide how data should be grouped into different intents and to which intent training data belongs.

Intents can be too disparate, causing gaps. Alternatively intents can overlap, causing multiple intents to score high on a user utterance.

But, what if you could collect user utterances, and upload those as a csv. And have the chatbot interface group the questions into intents automatically. With each intent having a list of utterance examples?

That is exactly what IBM Watson Assistant intent recommendations allows you to do…below is a step-by-step example of how a CSV file with questions can be uploaded to create a list of intent recommendations and intent examples.

Even if you do not make use of Watson Assistant for your chatbot, the result of an exercise like this can be very insightful compared to what has been implemented.

The Watson Assistant Approach

Watson Assistant has a minimalistic interface where, amongst other elements, intents are listed. By clicking on intents, three tabs are visible. The traditional tab to create a new intent.

And also, two other tabs for

  • Recommendation sources and
  • Intent recommendations.
By clicking on intents, three tabs are visible. The traditional tab to create a new intent. And also, two other intents for Recommendation sources and Intent recommendations.

First we are going to select our recommendation source. For this demo, we will just be uploading the CSV file created from the kaggle data.

For a production environment you might want to connect to the live assistant conversations.

First we are going to select our recommendation source. For this demo, we will just be uploading the CSV file created from the kaggle data.

Once you click on Upload CSV files, a dialog pops up, with more information on the CSV format and size limit. From here you can drag-and-drop your file.

CSV file upload dialog with more information on the data size and format.

The uploaded file is visible, and it needs to be noted that multiple files can be uploaded. And this collection of uploaded CSV files are listed in the upload pane.

In cases where a curated data set wanted to be used, it makes sense to validate the data with visual inspection.

The successful upload is visible.

When the data is loaded, the list of recommended intents can be viewed. The descriptions are generated from the data, and this view is available when you click on Intent Recommendations.

The collection of intents created from the uploaded data with the number of utterances found per intent.

Once you click on an intent or intent collection name, you can see the number of occurrences grouped here.

The number of occurrences can serve as an indication of the importance of the utterance. After selecting utterances, these can be added to an existing intent, or used to create a new intent.

The user utterances listed a specific header. These utterances can be added to an existing intent, or used to create a new intent.

The advantage here is that the data is sorted for you automatically, and the process of curating the data manually and assigning it is vastly expedited.

Adding selected utterances to an existing intent.

In the case below, a new intent is created with the selected user utterances.

In this case a new intent is created with the selected user utterances.

After creating the intent, the recommender can still be used on the right-hand side where examples can be listed, and selected to be added to the intent.

Recommendations can be listed from the recommendation sources.

This process can be used in a CDD (Conversation Driven Development) like cycle, where conversations are used to determine what intents are created, and which existing intents are augmented.

Conclusion

We have not seen IBM Watson Assistant expand much on entities, with developments like nested entities or entity groups and types.

But, Watson Assistant has made strides in other areas, like fuzzy matching of entities, intent deprecation and auto learning.

With the above mentioned elements, the functionality for intent sourcing, identification and training data is bolstered significantly. The guess work is removed, and reliable sources like current customer conversations can be used.

--

--

Cobus Greyling

I explore and write about all things at the intersection of AI & language; LLMs/NLP/NLU, Chat/Voicebots, CCAI. www.cobusgreyling.com