GUVI
Back

What is RASA? How it Works?

Created 1 year ago
377 Views
0 Comments
KRajesh
@KRajesh
KRajesh
@KRajeshProfile is locked. Login

Introduction:

       In today’s modern era, we use a lot of chatbots like Siri, Alexa, Google Assistant, etc. These chatbots helps us in daily activities and can be seen in Facebook messenger, Slack, Telegram, Websites, etc. The development of Natural Language Processing can be seen in the fields like banking, navigation, finance, defense, etc., which uses Artificial Intelligence. One such important AI framework is RASA. In this blog. We are going to discuss about the RASA framework.

RASA

RASA is an open source machine learning framework to automate text and voice-based conversations. It is used to build AI chatbots using Natural Language Processing (NLU) and Python. RASA provides a space called “Framework” to develop AI build chatbots using NLU.

What actually RASA does?

RASA helps the users to interact with the bots which enhances the communication and helps the businesses to develop. These bots can handle a large amount of business problems and finds a way to connect with the users. Below diagram shows the architecture of the RASA.

RASA Action Server:

If you are going to build a RASA framework, you mostly probably be an expert to write any programming codes since it has user friendly interface. Although, you need “RASA Action Server” where you usually write codes in python. The main function of RASA action interface is to trigger external actions like Google API or REST API, etc.

Components of RASA:

There are two main components of RASA,

  • RASA NLU

  • RASA CORE

RASA NLU:

Natural Language Processing is a field in the Artificial Intelligence which handles the interaction between the humans and the computer/bots. In order to handle the Unstructured data which is usually given by humans can be used to convert into structured data by the computer. So, to implement this in the chatbot, RASA build a tool called, RASA NLU. It is an open natural language processing tool which can be used in the chatbots to classify intent, extract, entities and sentiment analysis. RASA NLU interprets the user messages, obtain the intent and entities with the help of using different pipelines. Let us see an example of RASA NLU.

"What is the weather like tomorrow?"

 Let us look into the above sentence and extract one thing at a time.

 date -> tomorrow,

 so, the basic intention of this sentence is about requesting the weather by the user. Using intent and entities, let us see how the RASA NLU works and how it looks like. To understand the process, we use JSON format to have a clear understanding.

{

"intent": "request_weather",

"entities": {

"date" : "tomorrow"

}

}

 Here, RASA NLU uses tokenization (i.e. each word can be split and taken as token). So, the intent is requesting the weather and the entity as tomorrow.

RASA CORE:

RASA CORE uses the message sent by RASA NLU after classifying the message. It manages context handling, session management and responses. So, the structured information which is provided by the interpreter to the RASA core in the form of intent and entities can be used to perform actions for the distinct input using the probabilistic model. So, the final action is the displaying or delivering the message to the user by RASA core. Using machine learning models, the RASA core takes decision based on the intent and entities.

Installing RASA on Windows:

Let’s install RASA using below steps.

Step 1: Installing python

Install Python 3.6, 3.7 or 3.8 or use this link.

You can check the python version by executing the below command,     

python --version

 

Step 2: Creating a virtual environment

Create a virtual environment for RASA using the command:

python -m venv venv

 

This will create a folder “venv” and activate the virtual environment by running:

source venv/bin/activate

 

Step 3: Installing the RASA

Install RASA by commanding,

pip install rasa

 

Step 4: Initiating the RASA

Now, we can initiate the RASA by commanding:

rasa init

Conclusion:

We came to know that RASA framework helps user to interact with bots. One can easily access and create the RASA even without programming experience. We mostly wonder how these bots are interacting with us whenever we use social media platforms, websites since the interaction between the user and bot is an evolution of Artificial Intelligence and it will enhance further in future.

- K. Rajesh

Comments
Please login to comment.
 
Powered by habitate.io Habitate