How chatbots work

by
Rich Cleeve

Chatbots are growing exponentially in popularity because they provide delightful new ways for your customers to interact with your business. Like order meals, purchase goods, book services, make reservations, find information; all from the comfort of their favourite messaging app. They work with WhatsApp, Messenger, your website and many other interfaces.

For businesses there are massive cost savings to be had, for example with call centres and support lines. Banks and financial institutions can enable customers to engage in digital banking without the inconvenience of digging out yet another app from the swarm of apps plaguing their phones.

Lets get started

I will use Google Dialogflow to explain the concepts behind chatbots in a non-technical way. There are other chatbot services that do the same thing but the concepts are broadly the same.

Google Dialogflow is one of many chatbot engines that take input in the form of a message, convert it to something a computer can understand, then sends back the result.

It looks like a jumble of techie stuff, but we'll clear that up along the way.

Google Diagflow Chatbot Engine

End-user / Interface

The End-user section represents how the user interacts with the chatbot. The input method can be a chat with Telegram, WhatsApp, or other messaging app. It could also be Google Assistant or a telephone - there are lots of possibilities. This is represented as the "Expression". The "Response" is what the chatbot engine sends back to the user.

Once the chatbot engine is built, it can be connected to many different interfaces, so your customers/users can interact with your service in a way that works for them.

Dialogflow / Chatbot

The Dialogflow section represents the chatbot engine. This is the Google one, but there are others that work much the same way. The chatbot engine interprets what the user is asking for and matches it to an intent, representing what they actually want to do. For example the following 2 expressions could relate to the same intention or "Intent" to improve health.

- "What wellness programs do you have?"

- "get off couch lah"

These might both match an "Improve Health" intent. The intent would then handover to the Fulfilment service to return the information that matches what the user is looking for. If the Expression is unclear, or the intent has additional options, the chatbot engine can send back options to choose from or a further question for the user to answer. For example:

- "Would you like to improve your physical health or your mental health?"

This would then narrow down the choices and provide the user with a couple of menu items to choose from.

The API service is the way chatbot engine connects to other services to get the required information or perform the intended action, for example paying a bill through a bank account.

Fulfilment / Services

The Fulfilment section represents all manor of services that your customers might want to interact with. For example it could be a database containing information that you hold about them, an information service about a range of subjects related to your business, your help desk, an e-commerce shop or a combination of all of them. Pretty much anything you can think of.

Developing chatbots

When we develop chatbots, there are 3 core things we need to do, to take your domain expertise and turn it into personalised answers to your customers.

1. Design the Customer Experience

Design the chatbot service to work with your particular requirements including the interface and interactions. This is an in depth process to ensure users have an engaging and rewarding experience, and importantly, don't reach too quickly for the operator.

2. Configure the Chatbot Engine

Configure the Dialogflow chatbot engine to according to the design and interactions.

3. Integrate Fulfilment Services

Integrate with services that fulfil the intents (what the user wants it to do), or build new ones if they don't exist.

Hopefully that has provided an overview of how chatbots work. If anything is not clear or to find out more, please feel free to email me at rich@codestream.com.sg.

Remember that scene from Star Trek? We're almost there.