Get the code
By Muralidhar Chavan | Updated January 17, 2019 - Published January 18, 2019
There are scenarios where a user wants to have a conversation involving multiple domains. For example, when I want to travel to a place, I want to query for the weather and book a cab or flight. I might have to end up switching between two different bots — a weather bot and a travel bot. What if I could just have one interface bot that redirects my messages to a specific bot and gets answers to me? This developer code pattern showcases an implementation of this approach.
Typically, chatbots are designed to cater to domain-specific queries from humans. For example, a weather bot can handle messages such as:
What is the weather forecast for today?
What will be the high temperature tomorrow?
Will it rain in the evening?
A travel bot can handle questions such as:
Book a cab
Book a flight
What is the flight duration between Bengaluru and Mumbai?
A user must switch between bots to ask questions related to different domain bots. There can be several bots, and expecting a user to switch between bots can be unreasonable.
The solution is to have an agent bot (or an interface bot) and a few other bots that can handle queries for a specific domain (let’s call these specific bots). The agent bot knows about the specific bots and also about which domain each of them can handle. When user initiates conversation with agent bot, the agent bot will understand the intent of user query, and it will redirect the user query to a specific bot. Subsequent requests from user are redirected to specific bot. When the conversation with the specific bot is over or when the specific bot is not able to handle the request, the control is given back to agent bot, which will then redirect the messages to appropriate bot.
This approach provides a seamless experience for the user. It can be used by organizations that provide a host of services to their customers, such as financial services, tours and travel agencies, and news agencies.
Advantages with this approach are:
This code pattern uses a Watson™ assistant bot for building bots and a Node.js application as an orchestration layer.
When you have completed this code pattern, you will understand how to:
Find the detailed steps for this pattern in the README. These steps will show you how to:
Teams working to build a virtual agent with Watson Assistant define the agent's domain using intents and entities and structure…
Get the Code »
Back to top