chatbot fundamentals

What is fundamentally possible with Chatbots today?

Posted on

2017 has been proclaimed as the year of conversational commerce (in fact 2016 was too). Some have also predicted that chatbots will kill mobile apps, given advances in natural language processing (supported by machine learning).

Yet, many still remember the days of (not so smart) virtual assistants, and the frustration of dealing with these early bot versions.

So what exactly is possible with chatbots today? Are they super smart automated engines like Jarvis in Ironman or even sentient beings from WestWorld? Or are we in the midst of a hype cycle with disappointment ahead for users? (short answer: somewhere in between J)

To answer this question, let’s introduce 3 basic concepts used for chatbots today: intents, entities and conversations (sometimes called stories or context).

Intents

Natural language processors (“NLP”) today aim to resolve typical human-speak (i.e. natural language) into intents. For example, if a user communicates (whether through speech or text) “Please play some music”, the NLP should understand the associated intent “play music”.

Now this may seem straightforward… until one thinks about the numerous ways that humans express the same intent. For example, “Let’s have some music”, “Music please” and “how about some jazz?” all express the same intent.

By and large, today’s NLPs have gotten pretty good at this task, and with repeated training, they get better each time at resolving natural language into intents.

Entities

While intents are the actions (verbs), entities are the objects (adjectives and nouns). To be useful, NLPs need to also understand many different types of entities.

In the previous example, “How about some Jazz?” the NLP needs to not only resolve the intent (“Play Music”) but also the entity (“Jazz”), such that it can send the instruction to play jazz.

Typical entities could be locations (“Play music from Asia”), time (“Play music of the 60s”) or any combinations of these (“Play Asian Jazz from the 60s”). NLPs need to find out the position where these terms appear and figure out the intent and associate entities in the sentence. In this case, the intent is “Play Music”, the entities are “Jazz”, “Asia” and “60s”.

Again, with training, the NLP should be able to pick this up.

Limitations

The chatbot needs to know beforehand what type of intents and entities it should be able to detect. In this case, the chatbot may only know the intent “Play music”, but cannot be expected to know the intent “Weather”. “Weather” would be a separate intent that needs to be specified, coded and trained, along with the entities associated with this new intent.

This is the fundamental constraint of today’s chatbots. There are only a limited number of intents and entities each chatbot understands. So if you ask a chatbot about an intent that it is not designed to cope with, chances are that you will get the frustrating “I don’t know what you are talking about” response.

Our Weather Bot

As an example, we have built a weatherbot that tells users the current weather in Singapore which understands the following 5 intents and associated entities.

Intent Entities
Hello
Bye
Weather Location
Forecast Region
PSI Region

The weather bot performs well if you ask “What is the weather in the City?” But doesn’t do so well if you ask “Please play some jazz music”.

As the number of intents and entities increases, the danger of confusion between intents and entities increases. For example, in the case of the weather bot, it needs to distinguish “what is the weather?” as a “weather” intent but “what will be the weather?” as a “forecast” intent.

Conversation and Contexts

The third key concept is that of conversations and contexts. In natural human language, we may not make requests in a single sentence. Therefore, the chatbot needs to recall what happened in previous sentences and try to correctly determine which intents and entities still apply.

For example, consider the conversation

User: “What is the weather?”

Bot: “Where?”

User: “City”

In this case, the chatbot should understand that the intent is “weather” and store this in the context of the conversation. When the chatbot detects the location entity “city”, it should relate this to the previous intent to provide the weather in the city.

Again, as conversations get longer and contexts change midway through conversations, the danger of the chatbot confusing the context increases.

Infinite Permutations and Probabilistic Approaches to Design

The fundamental challenge is that unlike mobile apps where there are a limited number of user inputs; for chatbots, there is an infinite number and sequences of possible user inputs.

This means that chatbot designers can only cater to high probability use cases and will typically allow low frequency use cases to be handled through an “I don’t know” response. For example, if you asked the weather bot “Tell me the weather in the city, but only if it is not raining in the west”; this is a very unlikely request that the chatbot would not be designed to cope with.

Managing Infinite Permutations with Chatbot Design

Chatbot designers try to create chatbots that guide users to know what they can understand by using menu options, prompts, quick replies and cards to guide users, while at the same time increasing the number of intents and entities that the chatbot would understand. More on this topic in a future article.

On the Bright Side, Mistakes Are Learning Opportunities

For many businesses, understanding what their users want is valuable in itself. Chatbots facilitate such understanding. If a business finds its chatbot users frequently requesting for an intent that is currently not provisioned for, it can build in that intent at the next opportunity, thereby fulfilling a user need.

Finally – the API Constraint

In summary, the key advancement within today’s chatbots versus those frustrating virtual assistants is the ability of NLPs to resolve intents, entities and conversations. Having resolved these intents, entities and conversations, the chatbots can utilize available APIs to carry out the actions.

In many ways, it has been the concurrent establishment of the API economy that has allowed chatbots to take actions and provide responses that were not available to yesteryear’s virtual assistants.

However, chatbots are not the self-learning (and far from sentient) machines in the movies. They are limited by the intents they are designed for and the APIs available to them. Without music to play, chatbots can’t create music; Chatbots cannot divine the weather without meteorological information; and alas, Chatbots cannot write blog articles automatically.

Brought to you by SingaporeChabots.sg. Want to build a chatbot? Drop us a note !

3 thoughts on “What is fundamentally possible with Chatbots today?

Leave a Reply

Your email address will not be published. Required fields are marked *