nlpartificial-intelligencechatbotrasa-nlurasa-core

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?


Solution

  • 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.