Overwrite default fallback action

I have the two stage fallback policy in my config and I want that policy to use my own custom action for the fallback action instead of the default. I created a custom fallback action in the aciton server, added the name of the action to my domain file, and referenced the custom action in the fallback policy but the fallback policy is still performing the default behavior instead of using my custom action. Is there a step I’m missing?

  - name: TwoStageFallbackPolicy
    nlu_threshold: 0.9
    ambiguity_threshold: 0.1
    core_threshold: 0.9
    fallback_core_action_name: "action_custom_fallback"
   fallback_nlu_action_name: "action_custom_fallback"
   deny_suggestion_intent_name: "out_of_scope"

from rasa_sdk import Action, Tracker
from rasa_sdk.events import SlotSet, UserUtteranceReverted, ConversationPaused

class ActionCustomFallback(Action): 
  def name(self): 
    return "action_custom_fallback"

  def run(self, dispatcher, tracker, domain):
      # Do something
1 Like

Hi @tatianaf,

Did you start up your custom action server. When you do TwoStageFallbackPolicy.

Yes, its running. I realized that I also need to overwrite action_default_ask_affirmation if I want to change the behavior so Im trying that now

1 Like

Hi @tatianaf sorry I am an year late, but were you able to find a breakthrough? I want to customize the messages and make them more user-friendly, and after searching around the internet this post was the closest thing that resembled my problem.