Do I need to write any story of an action if it is already attached to a certain intent in domain file?

I’ve created an action action_recommended_reading attached to a specific intent news in domain file like this:

> - news:
>     use_entities: false
>     triggers: 
>       - action_recommended_reading

and I want action_recommended_reading only triggered by news, to avoid core predicting other actions with that intent, do I need to write a story for that? For example, a story:

> ## story get_news:
> * news
>     - action_recommended_reading
>     - export

Currently I didn’t wrote any story for this kind of intent and core sometimes predicted with other actions even though NLU predicted the right intent. So I thought maybe I still need to add stories to this intent, am I right?

in order to trigger this action, there is no need for the stories, but if you don’t implement forgetting inside this action, rasa core might not know what to predict afterwards. See docs for details: Policies

According to the link you gave:

If you do not want your intent-action mapping to affect the dialogue history, the mapped action must return a UserUtteranceReverted() event.

So that means, if I don’t want attached action to mess the core prediction, I should create an extra action? For example, an utter_say_hello action is attached, I should implement one extra action action_say_hello beside utter_say_hello , like this:

 class ActionSayHello(Action):
 def name(self):
     return "action_say_hello"
 def run(self, dispatcher, tracker, domain):
     dispatcher.utter_template("utter_say_hello", tracker)
     return [UserUtteranceReverted()]

Is that right? If so, then how do we do with an attached action which is not an utter_ action? Do I need to return UserUtteranceReverted() as well? E.g, return a list [something, something, UserUtteranceReverted()] ?

Thanks a lot! I didn’t pay attention to this issue before…

in your custom action, yes, you need to add UserUtteranceReverted() to returned events, but in the front of the list: [UserUtteranceReverted(), something, something], otherwise something will be forgotten as well