TwoStageFallBackPolicy without Payload buttons

Hello, I intend to use TwoStageFallBackPolicy to handle exception scenarios. However, I don’t want to use Payload buttons while asking user affirmation. I would rather want the user to type Yes or No. Can you please advise how can I achieve this?

Hi @jineshishere4u. You can change the defaults to achieve this, as mentioned in the docs:

Rasa Core provides the default implementations of action_default_ask_affirmation and action_default_ask_rephrase . The default implementation of action_default_ask_rephrase action utters the response utter_ask_rephrase , so be sure to specify this response in your domain file. The implementation of both actions can be overwritten with custom actions.

1 Like

thanks for response. Actually, I wanted to know that by default action_default_ask_affirmation will ask user to affirm the intent with highest confidence level by providing Yes or No Payload buttons. When users chooses one of the option, the policy automatically takes next action. My question is if I create a custom action for ask_affirmation WITHOUT any payload buttons then user will manually type in Yes or No. So, will the policy be able to take the same action as it would with action_default_ask_affirmation. Please note that I do not want the payload button as my current interface do not support it.

@jineshishere4u Yes, you can overwrite them with custom actions that do not include buttons

ok…thanks. Let me give it a try and let you know.

Hi, I tried two ways of implementation -

  1. I created a custom action with the same name but the policy still seem to go for the built-in action thereby offering the buttons to affirm or deny the intent
  2. I modified the built in action and commented out the payload button part from the code under - venv/Lib/site-packages/rasa/core/actions/action.py

Can you please advise further.

@jineshishere4u What if you create a custom action with a different name and replace action_default_fallback in fallback_nlu_action_name: "action_default_fallback"?