I have been confused for a long time, if you have encountered similar problems, please help me, thank you, I just started to learn RASa, there are many things I do not understand
The TwoStageFallbackPolicy uses the actions you have defined in your config. action_default_fallback is a default action in Rasa Core which sends the utter_default response to the user. Make sure to specify the utter_default in your domain file - see the docs here.
You also need to specify utter_ask_rephrase, since the first stage of the TwoStageFallbackPolicy uses this - see here
If you want it to run utter_answer_out_of_scope as the final action instead of action_default_fallback for NLU fallback, you need to put that in your config, like this:
first,thank you for your reply! What really bothers me is how to use “deny_suggestion_intent_name”,for example,i define the deny_suggestion_intent_name parameter,“deny_suggestion_intent_name: “out_of_scope””,how to config the intent “out_of_scope” in domain.yml or somewhere else,What role does deny_suggestion_intent_name play ?
Although the website has an explanation, But I still don’t understand well.
Ok, I see what you’re asking. What deny_suggestion_intent_name means is that in the second stage of TwoStageFallback:
? Did you mean 'greet'? (Use arrow keys)
» 1: Yes (/greet)
2: No (/out_of_scope)
Type out your own message...
So when the user clicks “No”, that intent gets sent.
You add the out_of_scope intent (if that’s what your deny_suggestion_intent_name is called) to the domain intents: section. If you want to, you can also add training data for it to the NLU model, if you have known out-of-scope utterances, but this isn’t necessary for two stage fallback.
A mini-version of the domain would look like:
intents:
- greet
- bye
- handoff
- out_of_scope
responses:
utter_greet:
- text: Hi
utter_bye:
- text: bye
utter_default:
- text: Sorry, I don't seem to be able to help you.