How to use action_back?

I’ve attempted to use action_back, I saw it referenced here: Default Actions

Is there a guide available on how to trigger it?

I tried just entering /back into the command line and nothing was picked up. Then I created an intent called /back, trained it, and triggered it but nothing happened there either.

Any help would be much appreciated

Is this feature still supported?

@ronankff Hi. I will suggest make an intent like go_back, and then trigger like this

        triggers: action_back
       - action_back
1 Like

Thanks for the reply @nik202, I’ll give that a shot

Hey @nik202, I set up the bot as you said. Can you confirm for me that this is the way the back function works:


Story is as follows:


@ronankff have you updated config.yml file

action_back (Default Actions)

This action undoes the last user-bot interaction. It can be triggered by the user by sending a “/back” message to the assistant if the RulePolicy is configured.

  - name: "RulePolicy"
    core_fallback_threshold: 0.3
    core_fallback_action_name: action_default_fallback
    enable_fallback_prediction: true
    restrict_rules: true
    check_for_contradictions: true

In your stories, you not mention action?

I guess you using Rasa 1.X ? Right? If you are using Rasa Open Source please updated to Rasa 2.7.1 or 2.6.2

1 Like

I am using 1.x, apologies I forgot to even mention that.

Unfortunately we’re not in the position to upgrade versions right now. According to the Legacy docs the correct policy for this action is MappingPolicy, which I have included

Good spot with the stories file too, I changed it.

Running with the above setup gets me this error:

I’m a bit confused because as far as I can tell action_back doesn’t need to be initialised in the actions file.


did you mention this in domain.yml?

       - action_back

Is your action_back is a function in with trigger utterance?

An alternative solution, if you want to go back to the previous menu. In that, I can help if you want? For Rasa Ver 1.X

For example:

Bot: How are you doing? or some menu Rasa | Rasa X

User: I’m fine

Button: previous menu

User: user select previous menu

Bot: How are you doing? or some menu Rasa | Rasa X

and so on.

I am sorry, a lot have change from Rasa 1.x to Rasa 2.7.1. It’ bit confusing for me also :stuck_out_tongue: But, I honestly want to assist you @ronankff

1 Like

Yes, I have the action registered in the domain. My action_back is not a function in yet. I thought that it would be built into Rasa as it’s a default action. Do I have to create it myself? If so, what code do I need?

Thank you for offering an alternative but I the product owner wanted something that would take you back in the conversation. For example:

  • User - Hello
  • Bot - Hello, how can I help?
  • User - See menu
  • Bot - menu options
  • User - /back
  • Bot - Hello, how can I help?

Does that make sense to you?

@ronankff Yes.It fine customer is always right! Mean while if you can share your all files it will be great to test. Thanks.

1 Like

@ronankff python version? can you create the requirement file for me

pip freeze > requirements.txt

1 Like

Python 3.9.5


Was the original command I used to set that up.

@ronankff using rasa-x?

Hope you aware of this You can install Rasa Open Source using pip (requires Python 3.6, 3.7 or 3.8).

Its fine if your rasa x is running on python 3.9

1 Like

I’m not using rasa x for this particular task. I’m just trying to make a small demonstration of the back button working and then we’ll add it to the larger project once we know it works.

@ronankff You want something like this? Sorry for late reply was busy in office work and deadlines.


you want to go back to the previous step/stage every time? When you say “go back”, “back”, "put me back "

Please consider this (back option) process (dialogue conversation) based on the project. Can I ask what’s are your project objective?

I have taken this thread How to use action_back? - #9 by ronankff as a example and checked and fixed your code.

Please give me more example(as shown in above thread) so that I can help you more. Thanks.


Oh no problem man, I appreciate the help.

Ideally what they want is that the bot goes back to the previous step. That’s why I’m trying to get action_back working.

The project has a lot of conversations and sometimes people press the wrong button or whatever and want to go back and hit the right button.

@ronankff Oh my bad, I see the example and based on that trying to fix. I will see much more tomorrow. Its late now in UK. Will find solution :slight_smile:

1 Like

Hi @nik202, any luck?

@ronankff I have seen some example, everyone using action_back function. But nothing is working as they have suggested. Do you have any links which I can see and try to fix your code.

Would you mind sharing these examples? I can try implement them myself, it’s just hard to find anything on it.

@ronankff Sure Please.




@ronankff Honestly, I have seen so many examples, and want to provide at-most help. But, some process is hard to implement, so as a developer we found the atternative. If I found any more links or even solution; I will post here. Cheers!

1 Like