Natural Language Processing

How To Use Knowledge Graphs To Build Chatbots That Can Parse Ambiguous User Utterances

___
Towards AI
6 min readDec 17, 2021

Introduction

In this article, I will explain how a chatbot can use a knowledge graph to resolve entities extracted from ambiguous utterances.

We will use Rasa as the example chatbot and TypeDB as the example knowledge graph. I assume the user is familiar with how these tools work. Otherwise, folks can refer to the respective tool’s quick start guides.

The code to reproduce the results in this article can be found here.

Problem Statement

Suppose you are tasked with building a chatbot for a telecommunications company to improve their customer experience. This means that the bot should be able to handle things like bill payment, common customer enquiries, online purchases, etc.

So, given an utterance like:

I want to buy an iphone

It is clear that the user’s intent is to purchase a device and the word “iPhone” is the device. Therefore, annotating this utterance’s intent and entities is straightforward.

Now, consider the following utterance:

iphone

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

No responses yet

What are your thoughts?