Wednesday 5 May 2021

Knowledge bots. Earlier this year, I had a task to… | by Abhinav Ajmera | Apr, 2021


Earlier this year, I had a task to create a knowledge bot for an enterprise level platform. The users were primarily the employees of the organization and intention was to use the knowledge bot to share the offering and usage of platform.

There are quite a lot of frameworks in the market (each with its own pros and cons) hence it is very important that one selects the right framework depending upon the kind of bot that you are targeting to create. In case of creating the knowledge bots the typical requirements are –

1. The main purpose of the knowledge bot is to provide the information about the offering via a guided chat. If the user wishes, he should be able to come out of the guided chat and ask adhoc questions about the offering and go back to the guided chat.

2. The knowledge bot should be able to perform simple tasks like booking a demo of the product.

3. Knowledge bot should provide the Right information about the selected domain (in this case platform offering) correctly in the first time rather than covering a very broad domain with answers which are ~70–80% correct.

4. While it should provide ability to perform NLU and understand user asks but the overall criticality of those asks is limited. As such generally there is little requirement of contextual chatting for the case of knowledge bot.

I started evaluating the available chatbot frameworks in the market on the parameters of cost, flexibility, ease of use, maintainability, scalability, ease of development, future extensibility, integration, community support and zeroed in on below 2 platforms –

i) Rasa — “Rasa is the leading conversational AI platform, for personalized conversations at scale. With Rasa, all teams can create personalized, automated interactions with customers, at scale. Rasa provides infrastructure & tools necessary for building the very best assistants — ones that meaningfully transform how customers communicate with businesses.” — from Rasa’s site.

— Salient features include —

  • NLU based, default NLU engine provided is open source.
  • Comes with both open source (limited features) and paid enterprise license (more features).
  • Creation of Chatbots more inclined towards Developers.
  • Supports advanced features like calling external API, Intent Identification, Slot filling etc.
  • Can be embed into website. On-prem/Cloud deployment. Creation of chatbots using stories and training data (developer oriented) is not via web-based GUI framework.
  • Good community Support.
  • Platform is built around AI with training data being key to improve performance. Not a flow based so bit of black box.

ii) Botpress — “Botpress is an open-source platform for developers to build high-quality digital assistants. We have put together the boilerplate code and infrastructure you need to get a chatbot up and running. We propose you a complete dev-friendly platform that ships with all the tools you need to build, deploy and manage production-grade chatbots in record time.” — from Botpress site.

— Salient features include –-

  • NLU based, default NLU engine provided is open source.
  • Comes with both open source (limited features) and paid enterprise license (more features).
  • GUI based creation of Chatbots.
  • Supports advanced features like calling external API, Intent and Entity Identification, Slot filling etc.
  • Can be embed into website. On-prem/Cloud deployment but provide web interface.
  • Good community Support.
  • Primarily Flow based with support for NLU capability. Debugger support and control.

The main strength of Rasa lies in its NLU engine and the contextual chatting experience it offers. By contextual, I mean each input from user is taken in context of the ongoing conversation and then responded. However, training the bot to get those conversations right requires lot of efforts, compute and skills and as the conversation domain increases, the total number of stories needed to be written increases exponentially.

On the other hand, Botpress uses a mix of AI and rule-based engine to create the chatting experience for the user. It is not so strong on the contextual conversation but has a rich GUI offering for providing guided information.

While being a Senior Data Scientist, my initial feel was to go with Rasa (you know the contextual AI offering does sound attractive) but once I evaluated pros and cons in relation to the task at hand, I found Botpress to be more suited for creating knowledge bot with combination of rule based guided tour and NLU based adhoc questions (QnA feature of Botpress) given the time and resource constraint that we usually have in IT projects.

Below are the features that Knowledge bot developers should look in the bot framework. I have also mentioned how Botpress fulfils those.

1. Chatbot Trends Report 2021

2. 4 DO’s and 3 DON’Ts for Training a Chatbot NLP Model

3. Concierge Bot: Handle Multiple Chatbots from One Chat Screen

4. An expert system: Conversational AI Vs Chatbots

Ease of development — How fast can you get a basic version of your knowledge bot up and running. Does it require very specialized skill set or even the citizen data scientists can work with it? How easy it is to do a rebranding of the bot?

With Botpress, you can get a basic knowledge bot up and running using its GUI with absolutely no coding in a couple of weeks. It also offers simple way to brand the bot by just changing the style sheet. It provides widgets such as cards and carousal to share the information in a GUI rich manner.

Integration — Bots always need to be integrated with the main portal and must support other channels (e.g. Microsoft Team) as well. While selecting the bot framework we should see whether these integrations are natively provided and can be done with minimal efforts.

In Botpress, Integration with the main site is very easy with just a single script to open the bot in an iframe. It also provides integration with other channels such as Facebook, Telegram, Microsoft Teams and Slack to name a few.

Future Extensibility — While the initial knowledge bot might start with a limited scope, the fact is that the scope will keep increasing once the management realizes its benefits. The bot might not longer be limited to providing information but would also be expected to do simpler tasks like booking a demo etc. Hence it is important that the bot framework that one selects has support for these features.

Botpress provides extensions to write custom code to call backend APIs to perform complex tasks. The features such as Intent, Entity and slots are used to capture intention of the user to do a particular tasks by identifying the right Entity, capture the required values using slots and then have your custom code call the back end API to perform the tasks. These tasks could be ranging from sending an email to booking a conference room or a flight ticket or ordering a pizza.

Scalability — Often you would be required to build the knowledge bot for internet traffic and hence it is very important that the bot framework that you select can be scaled.

Botpress has a cluster based horizontally scalable architecture. One can leverage a load balancer to distribute traffic amongst bots.

Maintainability — As with all IT projects, it is never a deploy and forget scenario. We live in the world of DevOps where there is a continuous deployment of the application into the production. Hence it is of paramount importance that the bot framework does have a model that deals with scale and complexity especially when you are looking for a GUI based development.

In Botpress, the development happens by means of creating a flow chart, the structure is modular. It has the capability to create sub flows with entry and exit point defined for the sub-flow. This way we can create the knowledge bots using many simpler, smaller flows instead of one big flow.

NLU — While guided flow is good for providing the information, that alone is not enough. The main intention of providing a bot is that user should be able to chat as if there is an individual sitting behind the bot. This means that bot should be able to understand the nuances of language and provide a proper response.

In Botpress, there is an QnA module which allows you to cater to random questions that the user might ask about the product. You can provide multiple questions against an answer and train the Botpress NLU engine to neutralize the questions against semantics and grammar. While the NLU engine is not as powerful as Rasa’s I found that its fits the purpose. We had around 110 answers to be trained against ~1100 questions. After training, I found that the NLU engine did a decent job and got us the right answers more than 97% of time. Botpress NLU engines makes use to 2 services –

a) Duckling — For extraction of system entities which make it more robust during implementation of tasks based on entity and slots (e.g. ordering a pizza or booking a flight ticket).

b) Language Server — This provides the word embeddings and has support for multiple languages.

Context Switching — The transition between asking Adhoc questions and taking a guided flow should be seamless. The flows should not be very long, provide a break points to user where he can ask the questions and then go back to flow whenever required.

With the use of ‘flow wide transitions’ feature provided within Botpress, the context switching between a guided tour and random questions can be implemented easily. Also, from the question and answer section Botpress gives ability to go back to a node which is part of guided tour hence taking the user back to guided tour.

There are other features of Botpress such as multilingual ability, Dockerization, Human In the loop, using 3rd Party NLU, SSO integrations, Clustering, Monitoring and Altering, Strong community support which can make the overall experience more robust.

Summary — Next time you wanted to build a knowledge bot in a short span of time, consider a bot framework that leverages both the rule based and NLU powered engines. Botpress is a strong contender for the same especially if cost and ROI is a decision-making factor.

Abhinav Ajmera

Senior Data Scientist, Atos

The opinion of the author are personal and author is in no way associated with Botpress.



from
https://fatsfixedassettracking.com/knowledge-bots-earlier-this-year-i-had-a-task-to-by-abhinav-ajmera-apr-2021/2097/

No comments:

Post a Comment

The Evolution of Customer Service: Conversational Automation is Your Key to Success | by Ambit | Jun, 2021

The ways customers interact with businesses have drastically changed in previous years. From the early days of face-to-face...