Photo by Juan Rojas on Unsplash

Use Customer Utterances To Create Chatbot Intents & Intent Examples

And How Intent Management Is Done By Three Platforms

Cobus Greyling
6 min readMar 31, 2022

--

Introduction

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

Chabot architecture is very much universal across commercial chatbot platforms; the main pillars are :

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

To understand the user, we need to discover the intent or intention of the user’s utterance. Ideally from the first utterance sans a rep-prompt or disambiguation, ideally. Avoiding the process of disambiguation is not always possible, as the user’s input can be hugely ambiguous.

There is also ambiguity which is not a problem for us as humans, but pose a challenge for chatbots. This scenario is best described with these two example sentenced:

  • There is a drop of water on my phone.
  • There, I dropped my phone in water.

You can think of Google as the world’s largest intent discovery engine…a single dialog turn chatbot.

An example from IBM Watson Assistant where a kaggle dataset with Stack Overflow Questions were used to create intent recommendations with the number of entries per intent shown.

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 needs to enter through in order to reach the dialog.

Traditional Intent Approach

Traditionally, and currently in most chatbot frameworks and tools:

  • Intents need to be defined as a starting point, or point of departure and then utterances added to the intent.
  • Intents cannot be hierarchical or nested. Sub-intents are not possible. Only a single layer of intents are possible.
  • Intents are not flexible and cannot me managed, in terms of easily merging or splitting.
  • Intent overlap and gaps are not easily detected.

Intent Management

Intent management is functionality which is increasingly introduced in more platforms and environment…Here are a few current intent management trends…

Intent Discovery From Utterance Data

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.

Recommendations can be listed from the recommendation sources.

A challenge with the Watson Assistant approach is cost. It is only available on the higher priced tiers. The functionality is basic and not as elegant compared to HumanFirst, for instance.

Secondly, the functionality is only available in Watson Assistant Dialog skills. On which there is a moratorium currently; for creating new Dialog Skills, that is.

Human First AI has the ability to take a single column of utterances. Flags, categories and intent names were removed. Illustrating the prowess of the platform in detect intent and meaning.

As seen above, intent-groupings are created by customer utterances being grouped together. Hence creating provisional intents from customer utterances. An example of not starting with the “solution” and working your way back, but starting from customer utterances and deducing intents from there.

Setting granularity determines how big specific clusters will be, and how many intent groupings are created. High granularity is very specific, ramp up granularity to see a basic topical overview of conversations.

Cluster size can help expunge clusters which might not have enough data to constitute an intent. Cluster size can also be used to determine how many examples are in each intent grouping.

Hierarchical Intents (Nested Intents)

The main activity in the chatbot marketplace around intents and entities are:

So far, I have come across two implementations of nested intents or intent levels or child intents; HumanFirst and Cognigy.

Both offer hierarchical or nested intents. Cognigy offer 3 levels deep nesting of intents.

The intent Balances (red) has three sub-intents (green), and third level intent (yellow).

As seen above, The intent Balances (red) has three sub-intents (green), and third level intents (yellow).

On the utterance: “savings balance for my own account”, the NLU returns:

"intentLevel": {
"level1": "Balances",
"level2": "Personal Accounts",
"level3": "Savings"
}

You can see the advantage of nested intents, knowing that a balance was requested, for a personal account, and the account type is Savings.

HumanFirst allows much deeper nesting. See below, HumanFirst affords users the capability to nest intents (sub intents). In this example you can see a complex nesting of sub-intents under Sports.

You can see in this example the nesting is 7 levels deep; Sports/BaseBall/Teams/Top5Teams/New York Yankees/Tickets/Season.

HumanFirst affords users the capability to nest intents (sub intents). In this example you can see a complex nesting of sub-intents under Sports. You can see in this example the nesting is 7 levels deep; Sports/BaseBall/Teams/Top5Teams/New York Yankees/Tickets/Season.

Intent Management

Intent management is surfacing to some degree in chatbot development frameworks. In this example from Cognigy below, a traffic light system is implemented scoring an utterance’s fit for the intent. Watson Assistant also highlights conflicts.

In this example from Cognigy, a traffic light system is implemented scoring an utterance’s fit for the intent.

HumanFirst has the functionality to drag and drop intents. This functionality can be used to create nested intents or merge intents.

HumanFirst has the functionality to drag and drop intents. This functionality can be used to create nested intents or merge intents.

The message prompt to user if the intent move was meant for merging intents or creating a child intent.

In this example from HumanFirst their advanced intent management is visible to some degree. Intents can be merged, or intents can be nested, creating child intents.

As can be seen above, in the example from HumanFirst their advanced intent management is visible to some degree. Intents can be merged, or intents can be nested, creating child intents.

In HumanFirst after an intent is created and some relevant utterances are assigned to the intent, HumanFirst will look-forward and identify relevant utterances to add to the said intent.

In HumanFirst after an intent is created and some relevant utterances are assigned to the intent, HumanFirst will look-forward and identify relevant utterances to add to the said intent.

This forward looking into unlabeled data from HumanFirst and identifying possible fits reminds much the process of annotating data in IBM Watson Knowledge Studio.

Conclusion

Trends in intent management from the avant-garde…

  1. You don’t need customer conversations, only customer utterances or sentences.
  2. Utterances are clustered automatically for easy intent identification.
  3. Systems are forward-looking, picking up from annotated data.
  4. Intents can be split, merged, nested. And in some cases nested multi-level deep.
  5. Multiple data sources for utterances can be toggled between. Workstreams can be setup.
  6. Clustering of utterances within intents, in order to detect sub intents or separate intents.
  7. Annotation of entities in utterances, within intents.

--

--

Cobus Greyling

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