Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Rasa core and Rasa nlu

I tried to understand the difference between Rasa core and Rasa NLU from the official documentation, but I don't understand much. What I understood is that Rasa core is used to guide the flow of the conversation, while Rasa NLU is used to process the text to extract information (entities).

There are examples to build chatbots in Rasa core as well as Rasa NLU. I couldn't understand what the difference in the two approaches is and when to adopt one instead of the other approach.

Could you please help me to understand this better?

like image 221
Henu Avatar asked Dec 14 '17 17:12

Henu


People also ask

What is Rasa NLU?

Rasa NLU (Natural Language Understanding): Rasa NLU is an open-source natural language processing tool for intent classification (decides what the user is asking), extraction of the entity from the bot in the form of structured data and helps the chatbot understand what user is saying.

What is the job of Rasa NLU?

So, the Rasa build a tool called Rasa NLU which is an open-source natural language processing tool that can be used in chatbots to classify intent, extract entities, and sentiment analysis. Rasa NLU interprets the user message and extracts intent and entities using the help of various pipelines.

What algorithm does Rasa core use?

Rasa NLU internally uses Bag-of-Word (BoW) algorithm to find intent and Conditional Random Field (CRF) to find entities. Although you can use other algorithms for finding intent and entities using Rasa. You have to create a custom pipeline to do that.

What is the difference between Rasa-core and Rasa NLU?

But in rasa-core there is a slot option (Information to keep track of during a conversation (e.g. a users age)) Rasa core is used to guide the flow of conversation while Rasa nlu is the understand and process the text to extract information (entities)

What are intents in Rasa NLU?

Rasa uses the concept of intents to describe how user messages should be categorized. Rasa NLU will classify the user messages into one or also multiple user intents. The two components between which you can choose are:

What are the components of rasa?

There are two main components of this framework – Rasa NLU and Rasa Core. Rasa NLU is a natural language processing tool which classifies intents and extracts entities in chatbots. It analyses free text and takes out structured data from it.

Is it possible to use Rasa NLU as an interpreter?

Those are features from Rasa Core, not Rasa NLU. At item 2 on this example (called Define an interpreter) the author explicitly said he is making use of Rasa NLU as the interpreter (but you could be even using another entity extractor framework). The second example (the Rasa NLU one) shows how to train the entity and intent extractor only.


1 Answers

You got it right. Both work together but they have distinct goals. In simple terms, Rasa Core handles the conversation flow, utterances, actions and Rasa NLU extract entities and intents.

About your second question:

The first example shows the entire workflow to create the bot, it shows how to setup the domain and the stories. Those are features from Rasa Core, not Rasa NLU. At item 2 on this example (called Define an interpreter) the author explicitly said he is making use of Rasa NLU as the interpreter (but you could be even using another entity extractor framework).

The second example (the Rasa NLU one) shows how to train the entity and intent extractor only. You don't have any information about domains and stories, no information about the conversational flow, it is a pure NLU example (even though he is using the default run method from Rasa Core to run the bot).

When I started studying Rasa was a bit hard to understand the concepts to develop the bots. But as you start coding it got clear. No matter which platforms you use, NLU will be handling entity and intents while the conversational flow will be something else.

It is even possible to use one library to handle the core of your bot and another one to handle NLU.

I would like to note that different from the most tools you can use to build the core of your bot, Rasa Core use machine learning to better generalize the dialogue flow. Instead of write code for each possible node on your conversation, you can use a dataset of possible conversational paths and train the core to generalize it. This is a very cool and powerful feature :)

Hope it helps.

like image 195
Trinca Avatar answered Sep 18 '22 15:09

Trinca