Problem when calling action_default_fallback

Hello,

May bot does not show the message related to action_default_fallback. My bot predict action_listen instead. Below the log. any help please

2021-10-07 08:55:03 DEBUG rasa.core.processor - Predicted next action ‘action_default_fallback’ with confidence 1.00. 2021-10-07 08:55:03 DEBUG rasa.core.processor - Policy prediction ended with events ‘[<rasa.shared.core.events.DefinePrevUserUtteredFeaturization object at 0x7fec146cb510>]’. 2021-10-07 08:55:03 DEBUG rasa.core.processor - Action ‘action_default_fallback’ ended with events ‘[<rasa.shared.core.events.UserUtteranceReverted object at 0x7fecd37aa790>]’. 2021-10-07 08:55:03 DEBUG rasa.core.processor - Current slot values: . . .

2021-10-07 08:55:03 DEBUG rasa.core.processor - Predicted next action ‘action_listen’ with confidence 1.00. 2021-10-07 08:55:03 DEBUG rasa.core.processor - Policy prediction ended with events ‘[]’. 2021-10-07 08:55:03 DEBUG rasa.core.processor - Action ‘action_listen’ ended with events ‘[]’. 2021-10-07 08:55:03 DEBUG rasa.core.lock_store - Deleted lock for conversation ‘5cf18c23adaa479e820a099820b3f3a8’.

Did you define the default response message?

Yes! i have defined the action_default_fallback

@Asmacats can you share rasa --version and config.yml file please.

@nik202

Rasa Version      :         2.8.6
Minimum Compatible Version: 2.8.0
Rasa SDK Version  :         2.8.2
Rasa X Version    :         None
Python Version    :         3.7.10
Operating System  :         Linux-5.4.0-81-generic-x86_64-with-debian-bullseye-sid
Python Path       :         /opt/tljh/user/bin/python

config (2).yml (675 Bytes) actions.py (1.1 KB)

@Asmacats Please update this:


policies:
  - name: MemoizationPolicy
  - name: TEDPolicy
    max_history: 5
    epochs: 100
  - name: RulePolicy
    core_fallback_threshold: 0.4
    core_fallback_action_name: 'action_default_fallback'
    enable_fallback_prediction: True

In domain.yml

utter_default:
     - text: I'm sorry, I didn't quite get you? Please try again..

I guess, it will automatically trigger the default action fallback.

@nik202 thank you it works. but i would like to call personalized action_default_fallaback in actions.py and it does not work for me using rasa 2.8. Any idea please ?

@Asmacats Nice, please close this thread as a solution for others and its should work like this, but if its not working in rasa 2.8.X may be they are working something on the code at backend :slight_smile: as we are playing for rasa 3.0 soon.

Try:

In domain.yml

actions:
  - action_default_fallback

In action.py

class ActionDefaultFallback(Action):

   def name(self):
      return "action_default_fallback"

   def run(self, dispatcher, tracker, domain):
      dispatcher.utter_message("Sorry, I couldn't understand.")

I know you have seen this link but as for ref only : Fallback and Human Handoff I would recommend please see it again the code and syntax :slight_smile: Good Luck!