Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
Muralidhar Chavan edited this page Nov 5, 2018 · 8 revisions

Welcome to the watson-assistant-multi-bot-agent wiki!

Short Name

Bots Compose - Agent Bot to redirect messages to specific Bots

Short Description

Bots Compose showcases how Watson Assistant can be used to compose bots, serving different domains, coordinated by an Agent Bot.

Offering Type

Artificial Intelligence

Introduction

Generally bots address queries related to a specific domain or topic. If a user wants to query for something from a different domain then the user will have to switch to a different bot and ask question. E.g. If one wants to travel to a place, he or she might ask for weather and also book a cab or flight. The person might have to end up switching between two bots, weather bot and travel bot. What if that person could just have one interface bot which will redirect my messages to a specific bot and get answers to me? Well, this code pattern showcases an implementation of this approach.

Author

Muralidhar Chavan

Code

Demo

  • N/A

Video

  • Coming soon!

Overview

Generally bots address queries related to a specific domain or topic. If a user wants to query for something from a different domain then the user will have to switch to a different bot and ask question. E.g. If I want to travel to a place, I might query for weather and also book a cab or flight. I might have to end up switching between two bots, weather bot and travel bot. What if I could just have one interface bot which will redirect my messages to a specific bot and get answers to me? Well, this code pattern showcases an implementation of this approach.

The solution here is to have an agent bot (or an interface bot) and a few other bots which 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 and seamless experience for the user. It can be used by organisations which provide a host of services to its customers like financial services, tours and travel agencies, news agencies etc..

Advantages with this approach are:

  • plug and play the bots
  • Modular approach facilitates bots composition
  • Come up with new services by composing two or more bots
  • Easy to maintain, make changes, add/remove functionalities
  • Easy to troubleshoot issues
  • Transparent to user

In this code pattern we will use Watson assistant bot for building bots and Nodejs application as orchestration layer.

Flow

Architecture

  1. User accesses web application and types in a message. Nodejs application, an orchestration later, sends user message to agent bot
  2. Agent bot determines the intent of the message and responds with the specific bot details, to which the message needs to be redirected.
  3. Nodejs application sends message to the specific bot (Weather Bot, in this case). Specific bot responds. Conversation continues between user and specific bot.
  4. When the conversation with specific bot is over, user message is then sent to agent bot to determine the intent.
  5. Nodejs application sends message to the specific bot (Travel Bot, in this case). Specific bot responds. Conversation continues between user and specific bot.

Included components

  • Watson Assistant: Add a natural language interface to your application to automate interactions with your end users. Common applications include virtual agents and chat bots that can integrate and communicate on any channel or device.
  • SDK of Node.js: The Node.js runtime on IBM® Cloud is powered by the sdk-for-nodejs buildpack. The sdk-for-nodejs buildpack provides a complete runtime environment for Node.js apps.

Featured technologies

Blog

A chatbot is an application that facilitates conversation between a human and a machine, in a natural language way. Chatbots are mostly used for customer service and involves dialog between humans and bots. They use artificial intelligence technology to understand human conversation and provide with relevant information.

Typically chatbots are designed to cater to a domain specific queries from humans. e.g. a Weather Bot can handle messages such as What is the weather forecast for today?, What will be the maxiumum 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 human user will have to 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.

How about having only one interface for different domain bots and the user does not need to know or switch between bots for different domain questions? Well, the code pattern addresses this situation. In this Code Pattern, we build two domain specific Bots along with an agent bot. Agent bot deflects the queries to the specific bot by understanding the intent of the user message. User is not bothered with switching between and bots and remains transparent to the user as to which bot responded to the query.

In this solution, new bots and be used as plug and play with a simple configuration update. The solution becomes extendible and flexible to make necessary changes.

This approach provides and seamless experience for the user. It can be used by organisations which provide a host of services to its customers like financial services, tours and travel agencies, news agencies etc..

Advantages with this approach are:

  • plug and play the bots
  • Modular approach facilitates bots composition
  • Come up with new services by composing two or more bots
  • Easy to maintain, make changes, add/remove functionalities
  • Easy to troubleshoot issues
  • Transparent to user

In this code pattern we will use Watson Assistant bot for building bots and Nodejs application as orchestration layer.

Links

Clone this wiki locally