Did you mean 'nlu_fallback'? | two stage fallback Rasa 2.0.0

Hello!

After using Rasa 1.10.X for a while, I’ve moved to Rasa 2.0.0. One thing that is confusing me is the nlu_fallback intent.

As far as I understand, the NLU will predict an nlu_fallback intent with a confidence of 1.0 for any message which does not meet the confidence threshold. Unfortunately, as the predicted intent is nlu_fallback, the default_ask_affirmation actions always asks “Did you mean ‘nlu_fallback’?”.

It seems to me that the new way of triggering a fallback has broken the two stage fallback. Is there something I’m doing wrong? I want it to suggest whichever of my intents has the highest confidence, not the nlu_fallback intent.

How can I fix this issue? Is it possible to get the next highest confidence intent with a custom action, to override default_ask_affirmation?

Thank you

3 Likes

Same question here.

So I’m using a custom action_default_ask_affirmation, and so to map to the correct intent I just get the intent that ranked second highest instead of the one that actually was selected, which is nlu_fallback.

last_intent_name = tracker.events[-1]['parse_data']['intent_ranking'][1]['name']

2 Likes

Okay, I just opened an issue on Github for this: Two-stage fallback always asks "Did you mean 'nlu_fallback'?" instead of the highest confidence user-defined intent · Issue #7251 · RasaHQ/rasa · GitHub

1 Like

Hey,

I wonder if some other guideline was already presented anywhere besides making the tracker point to the previous intent. Did you guys discovered more workarounds regarding this?

The official documentation do mention the option about customizing the fallback actions but is not so specific regarding some of the right parametrization of the FallbackClassifier component or something on the RulePolicy.

My goal is to reproduce something as presented in this link (with customized answers for the top 1 intent in terms of confidence, even if lowest than the threshold):

Finally fixed by correctly retrieve intent ranking from useruttered event by amn41 · Pull Request #7622 · RasaHQ/rasa · GitHub :tada:

can you solve this Fall back policy is not working