BiyeBot-A Virtual Assistant to Make Communication Easier
By definition, a chatbot is a robot or bot which is basically a script/software which can run itself or can do some automated tasks, in this case, the task is to chat. We needed a virtual assistant who can take our place to communicate with visitors.
It was a plan from Nascenia to develop a chatbot to provide virtual assistance to the current and probable clients. We started to develop this chatbot in September 2019. We realized that our solution must include the following things :
Must have the ability to be integrated with well-known chatting applications (i.e. Facebook, etc.)
Technologies that we are going to use needed to be self-developed or open-source.
In order to meet the primary needs, we focused on the open-source leading chat engines. We did a lot of research and made a choice on Hubot, BotPress, and Rasa. In comparison, we chose Rasa as the building block of our project, which was written completely on Python as this is the most favorite language nowadays for machine learning purposes.
Nascenia, involved developers to work on this exciting project. It was targeted to make the user experience better. In order to do so the chatbot needed to fulfill the following requirements:
- Make the conversation as humanize as possible.
- Take into consideration Bengali language and reply in the same, if not possible at least reply with that “Currently we are not supporting this language.”
- Reply to common greetings (i.e. Hi, Assalamualaikum, etc.).
- Answer all the FAQs (i.e. How to register?, Contact information, etc.).
- Forward or Acknowledge manual assistance if required.
After analyzing all the requirements and getting familiar with all the technologies we are going to use, we started our development by the end of September. Rasa works with the following architecture:
This can be divided into three distinct sections:
NLU stands for Natural Language Understanding. It takes the raw input from the client and understands what the client is trying to say. NLU’s purpose is to understand the intention of the client.
CORE takes the intent class and makes the decision which type or class needed to be sent as a response.
NLG stands for Natural Language Generation. It’s an optional section. This step requires the actual text or the type of text to be sent as a response.
Managing all the three sections, we need to study the type of chat that clients usually have over the phone or facebook page. We gather all those data and created an intent classifier. After that, we created use cases which in terms of RASA known as stories. That stories actually make the system understand what type of response to be generated for which type of intent class. It also understands that asking something from the beginning of a conversation is not of similar meaning when it is asked in the middle of a conversation. As a result, a tree is generated, which is similar to this :
For response, we didn’t rely on some Language Generation tool or Framework rather we used some fixed text, as we know the Domain (Biyeta) is very well known to us.
That lead us to a working bot, which primarily serves our purpose. But still deploy the system and it to facebook or make a web user-interface to use it independently. We then integrated with biyeta facebook page in messenger through the webhook provided by the rasa itself. We also created a simple user interface for biyeta. While doing so, we went through an issue, through ui an ajax call are required to communicate with RASA which was not being possible because from the browser interacting with those port are generating issues so we used Nginx to create a reverse proxy, by that if we solved the port issue by some advance routing mechanism.
Contributor: Mohammad Sheikh Ghazanfar