featurepreneur
Published in

featurepreneur

My RASA Journey with Tact Labs

Chat bot

Have you ever wanted to create a really cool chat bot?

Do you know about the frameworks available to create one?

Read on to find out about my journey with one particular framework…

As part of my internship at Tactii and Tact Labs ,the first project that I had to work on was to create a chat bot with the RASA framework. The first thing that got me curious was about why I was told to work with this particular framework when many more existed.

What is RASA?

Rasa is an open source machine learning framework for building AI assistants and chat bots.

Its incredibly powerful and used worldwide by developers to create amazing chat bots.

So Why RASA???

Frameworks to develop chat bots

As you can see, there are many frameworks to develop chat bots in the market but RASA has several advantages over the others as given below ..

  1. Open Source:

Most of the above frameworks are closed systems whereas Rasa is an open source platform which means that developers can integrate features and functionalities as per their requirements. Rasa is also free to use.

2. Deploy everywhere:

After the creation of the chat bot, there comes the question of where to deploy the bot. Most of the above frameworks cannot be hosted in our favourite servers and are mostly on Premise but with RASA the problem is solved as we can deploy the bot on all platforms.

3. Connect with other messaging channels:

Generally there are teams for answering queries of customers on different normal messaging channels. After creating a chat bot using Rasa it may need to be launched on a new channel, but the advantage with Rasa is that it enables AI assistants to integrate seamlessly with other messaging channels such as Slack, Facebook messenger, telegram etc thus eliminating the need to have it’s own channel.

4. Not a state machine:

Rasa is not a state machine, it uses the conversations with real people as data for the chat bot and it will learn from these conversations.

5. Language Agnostic:

Most of the above frameworks make provision for a set of languages. With Rasa you can train the bot in any language of your choice.

6. Conversation-Driven Development:

Rasa has a very unique approach towards the continuous improvement of chat bots. They have a special tool called RASA X which is used to listen to the users and then use those insights to improve the assistant.

Getting started with RASA:

Initially I spent a couple of days learning about the framework .

Rasa Open Source:

The main components of RASA are:

1) Rasa NLU:

Rasa NLU is the tool which allows rasa to understand user messages in order to detect the Intents and Entities. All the users messages are given here.

2) Rasa Core:

This is the place where rasa predicts the dialogue as a reply based on the users message.It helps us with the contextual message flow.

Installing RASA and setting up the first project:

Rasa can be installed using the “pip install rasa” command.

After installing RASA , we can create a new project by running the “rasa init” command. This automatically creates a default bot for us with all the necessary files required.

The bot can be run with the “rasa shell” command.

Guess what, this bot returns the picture of a cute tiger whenever we say something sad. Exciting right!!!

default bot rasa creates.

RASA X:

Rasa X

Rasa X is a tool for conversation driven development (CDD) which uses the process of listening to users and using those insights to improve your AI assistant.

The pre-requisite to use Rasa X is a bot built on Rasa Open Source which is what we have discussed above.

With the help of Rasa X we can share our bot to testers. One really cool thing is that all of those conversations are recorded and we can go through and add them as stories to our bot.

Project:

So it was time to get working on the project.

The project I worked on was to create a chat bot so that new immigrants to Ontario, Canada can get to know about their workplace rights. Sounds cool right!!!

The chat bot was created using Rasa Open Source and Rasa X was used to share the bot with testers so that I can further improve my bot.

After the creation of the bot, comes the crucial deployment part. So I containerised my bot using Docker and deployed it in Heroku.

The front end for the bot (i.e chat UI) was created using HTML, CSS, Java script, Flask and it was deployed separately in Heroku. In order to access the bot , an api call was made from java script to the rasa back end.

Chat bot with basic UI

How the deployment of the bot is done?

Stay tuned for my next article where I will explain how the deployment is done is detail.

Happy Learning !!! Stay Safe!!!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store