Reputation: 3998
I'm quite new to Chatbots and started using RASA as a framework. And wondering which method RASA use as their response generation technique. (NLG)
Theoretically, there are two types of NLG techniques:
So, in RASA what method they use ?
Upvotes: 1
Views: 2724
Reputation: 2121
The RASA stack is flexible enough to support both use cases.
The documentation (v: 0.10.3) for your question can be found at: http://www.rasa.com/docs/core/responses/
RASA offers a built-in templated based NLG. However, it also allows you to connect to an external HTTP server for NLG. What happens in that server is up to you, and it could be a neural net based NLG server, but that needs to be done by you.
From the docs:
The default format is, to include the utterances into your domain file. This file then contains references to all your custom actions, available entities, slots and intents.
One section of your domain file will include a templates section. Here is an example from the docs:
templates:
utter_greet:
- "hey there {name}!" # variable will be filled by slot with the same name or by custom code
utter_goodbye:
- "goodbye 😢"
- "bye bye 😢" # multiple templates will allow the bot to randomly pick from them
utter_default:
- "default message"
From the docs:
Retraining the bot, just to change the text copy can be suboptimal for some workflows. That’s why Core also allows you to outsource the response generation and separate it from the dialogue learning.
The bot will still learn to predict actions and to react to user input based on past dialogues, but the responses it sends back to the user are generated outside of Rasa Core.
If the bot wants to send a message to the user, it will call an external HTTP server with a POST request. To configure this endpoint, you need to create an endpoints.yml and pass it either to the run or server script.
The core will contact your server with information from the the conversation, including the user utterance, intent and slots filled. Your server then would have a neural net based NLG (developed by you) which would return the text that the bot should display to the user.
Upvotes: 3