Concierge Bot: Handle Multiple Chatbots from One Chat Screen

Jinraj Jain
Chatbots Life
Published in
7 min readMar 16, 2021

--

We have a range of platforms and methods for developing chatbots. Each chatbot has its own personality. It all depends on who the users are and how they use it.

At a high level, any chatbot would fall under one of the below types

Rule-Based Chatbots: They are guided chatbots where the bot guides the user by prompting options for selection until the final response.

Smart Chatbots: They understand the context and emotions of user queries and respond accordingly.

Hybrid Chatbots: It involves both rule-based and intelligence-based approaches to better understand and meet user needs.

a standard chatbot structure
Img1 — A standard chatbot structure

A standard chatbot would require an NLP, backend code to generate responses, and an optional live support executive if the bot is unable to recognize.

An NLP is required to understand the meaning of the user question and to construct a human-like conversation with users. For each user question, a score is determined for each intent in a bot, and the one with the highest value is most likely the exact matching intent.

Consider the case of an HR bot with three intents and a backend service that collects responses from multiple sources.

Chatbot, NLP and Backend Response Data Sources
Img2 — Details of NLP and the Backend

Problem

When there are multiple chatbots for different departments across the enterprise, It can be difficult for users to remember or recognize which chatbot to use.

The best solution is to build a “concierge/centralized chatbot” that can serve all of the user's questions intelligently and route them to the appropriate chatbots maintaining a human-like conversation.

This can be achieved in multiple ways

  1. Concierge bot without an NLP
  2. Concierge bot with its own NLP
  3. Concierge bot without an NLP but, directly accessing the NLPs of respective chatbots

Let us consider some scenarios and observe the pros and cons of each:

1. Concierge bot without an NLP

Let us create a centralized chatbot without an NLP for 3 different chatbots, and allow it to start the conversation with a welcome message with 3 quick replies where it can route to. On the backend will write if-else or switch logic to handle user selection and connect to the respective chatbot.

Img3 — Concierge bot with 3 separate chatbots

That’s not a smart idea at all. It lacks the human approach since the customer cannot type his sentence directly (which is the most crucial in a perfect chatbot). An NLP would have improved here, but let’s not spend money on one just yet; we can get away with hardcoding some keywords for each chatbot.

For example:

Human_Resouce = [“timesheet”, “hr”, “shift”, “on-call”, “leave”, “hours” etc…]

Financial_Queries = [“financial year”, “salary”, “tax”, “deduction” etc…]

Bank_Policies= [“fixed”, “current”, “deposit”, “credit” etc…]

When a user says “I am unable to submit my timesheet”, since the timesheet keyword is present in the Human_Resource list, the user is connected to the HR Chatbot, and the interaction will continue there until the user closes the conversation.

Trending Bot Articles:

1. How Chatbots and Email Marketing Integration Can Help Your Business

2. Why Chatbots could be the next big thing for SMEs

3. My Journey into Conversation Design

4. Practical NLP for language learning

What if you have more and more separate chatbots?

Img4 — Concierge bot with several chatbots

We can still use the previous method, but as the number of chatbots grows, the bot would be unable to maintain a human-like conversation with users and it would again leave users perplexed while making a selection.

Img5 — User confused looking at the concierge bot with several button options

So, I believe it is now time to add a natural language processor (NLP) to our concierge bot.

2. Concierge bot with its own NLP

Img6 — Concierge bot with an NLP

But, wait! how do we train a Concierge Bot? * Which utterances should I use to train our Concierge Bot?

  1. Pick the subset of utterances from each intent of each bot and combine them to form intent in the Concierge bot? i.e., each bot’s trained utterances will become an intent of the Concierge bot.

This might work!! But, what if it doesn't recognize the queries which are not in Concierge NLP but trained in the primary bot?

Perhaps setting a lower threshold of concierge NLP can crack the puzzle?

OR

2. Copy all the utterances of each bot as an intent of the Concierge bot?

This should match the intent correctly for most of the utterances.

But, we have few issues -

a. The NLP of Concierge bot gets huge as the number of chatbots increases.

b. Training the utterances at two places (chatbot and concierge bot)

c. NLPs will have the data storage limit

d. Splitting the NLP into 2 or more would also lead to complexities

Did our solutions work?

3. Concierge bot without an NLP but, directly accessing the NLPs of respective chatbots

Let’s go look again at the Img3 of 3 separate chatbots. Why can’t we reuse the same NLP from the respective chatbot instead of making a different NLP for the concierge bot?

Img7 — Concierge bot directly calling NLP’s of chatbots

Yes, pass the user sentence directly to all the NLPs of the chatbots in parallel. This can be done by making a single asynchronous call to all of the NLPs and collecting the confidence scores of each bot at the intent level. It not only tells which bot is the best match but also which intent is the exact match for the given sentence.

Let’s assume the confidence score of an intent as α (alpha)

if α ≥ 85%*, prompt to confirm if multiple, else directly connect with bot

else if 75%* ≤ α ≤ 84%*, prompt to confirm even if one

else if α ≤ 74%*, ask user to rephrase the sentence

* threshold values can be set as per our requirement

As seen in the Img7, for the user question “How do I apply for leaves in my timesheet?”, all of the respective chatbot’s NLP returned confidence scores, and the highest match is with Intent1–92% of HR Bot, which is greater than our threshold value, so the concierge bot connects with the HR Bot for rest of the conversation.

I hope, that cleared!

Consider 6 different bots returning confidence scores where 2 are greater than the threshold. Refer to the image below, where a user is having trouble accessing the timesheet page. This could be related to HR Bot if the problem is with his access, or IT Support Bot if the problem is with the network or browser. So the query has matched intent from both bots with >85% confidence and as per our condition “prompt to confirm if multiple”, will prompt the user to confirm what exactly they meant.

Img8 — Chatbots returning confidence scores

Few NLPs don't provide intent scores

During my assessment of various NLP-based chatbots on the market, I discovered that the majority of NLPs return confidence scores, but few don’t. Those bots would either return the matching intent name or a fallback if none of the intents fit.

Since we’re dealing with multiple chatbots, regardless of which NLP is used to predict the user’s context, our approach to create a concierge bot remains the same.

Imagine each bot is developed with different NLP and the results/scores are as below. The condition still remains almost the same.

Img9 — Multiple chatbots with different NLPs returning matching intents

Let’s assume the confidence score of an intent as α (alpha)

if α ≥ 85%* + Intents, prompt to confirm if multiple, else directly connect with bot

else if 75%* ≤ α ≤ 84%* + Intents, prompt to confirm even if one

else if α ≤ 74%* + Intents, ask user to rephrase the sentence

* threshold values can be set as per our requirement

Here,

intents whose score is greater than the threshold (85%) i.e., Intent3 (from IT Support Bot)

+

intents returned by few exceptional bots i.e., Intent3 and Intent2 from Banking Bot and Insurance Bot respectively.

In total, 3 intents are matched. As a result, make these intents available to users as button choices, and attach them to the bot that the user chooses. The conversation starts !!!

That’s it.

I hope that provided a favorable idea to deal with multiple chatbots. Let me know in the comments what do you think about it. Thanks for reading.

Don’t forget to give us your 👏 !

--

--

Conversational AI Engineer — Chatbots ~ NLP ~ Machine Learning ~ UI/UX ~ Web Design