Difference between Rasa core and Rasa nlu

@trinca's answer is correct. I just rephrase a bit the points

Second thing, there are examples to build chatbot in Rasa core as well as Rasa nlu both can be used to build chatbot but couldn't understand what's the difference in two approaches and when to follow which one.

No, NLU/Core are not different approaches, rather, these are different components of a dialog manager engine.

  1. RASA NLU is a intent/entities classifier:

    You off-line trains the classifier with a number of examples sentences with attached relative intent (and entities) tags.

    Afterward, at run-time, you submit to the classifier an incoming sentence and you have back an intent tag and a list of possible entities related to the intent, as result of the classification.

  2. RASA Core is a (probabilistic) dialog manager:

    It decides/guess which is the next probable "state" (again just an intent) of the chatbot conversation. It's off-line trained with a RASA specialities: "stories". These are possible sequences of intents, following examples of conversation that developers submit in the train phase.

    Afterward, at run-time, RASA Core, when a user submit a sentence (so a corresponding intent guessed bu previous mentioned NLU component) it guess the "probable" next state of the conversation (an intent).

Notes:

IMMO you can't build a chatbot with just the NLU (an intent classifier) component proposed by many competitors as the "solution" to build bots), because with just the intents classifier (The NLU) you can manage just "stateless" dialogs (single turn volleys without any context of the conversation).

An the end of the day RASA is winner in comparison with other mentioned frameworks (these are often just channel gateways/intente classifiers) because the dialog manager component and the stories way to design/develop a conversation, without hardcoded rules (if/then).


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.


To explain in simple terms Rasa NLU uses NLP (Natural Language Processing) to understand what you tell the bot.

It understands what you say and matches it to some intent that you have defined.

Rasa Core on the other hand handles the conversation flow. The stories markdown file lists the intents and the actions for them.

Hence when the NLU gives the intent, the Core performs the action corresponding to it and the bot replies with that action.


A very layman description for starters: Rasa NLU is the interpreter which understands the input. Basically, it figures out entities and labels the intent.
Rasa Core does the rest of the work you want your bot to do, the flow of conversation being the most important thing.

For example, you say "Hello" to the bot. Rasa NLU will understand the input's intent as a greeting and Rasa Core will tell the bot to reply with a greeting.
The reply back would be a greeting if you train your bot for it or it might be anything else as well.