How to train for slot_was_set by custom action correctly?

Hi all,

I’m setting several slots in custom actions and now I have a couple of questions for which I cannot find an answer. (The next action is a conditional response so I can set the influence_conversation parameter to false as the action will be the same for every value.)

This is my story:

- story: happy path intro 
  - intent: interested_in_veg_food
  - action: utter_ask_ready_for_a_question
  - intent: affirm
  - action: action_reset_veg_food_slot # will change the values of the slot
  - action: action_ask_veg_food
  - intent: rate_veg_food # how often they eat it (e.g. never, sometimes, often)
  - action: action_set_veg_food # custom action that sets the value
  - action: utter_conditional_response
  - action: action_set_heard_explanation # sets a slot for later
  - intent: affirm
  - action: utter_conditional_advice
  - intent: affirm
  - action: utter_final_message
  1. Do I always need to train for slot_was_set in stories when this was done by custom actions (e.g. in the example above “action_set_veg_food”)? If I don’t do so how will it affect the policies? Or do I only need for slot_was_set within a story when influence_conversation is set to true?
  1. When a slot has several values (e.g. a categorical slot) but no matter with which value the slot will be set it will in each case continue with the same action (in my case a conditional response). Do I need to train the story with an OR statement for each value of the categorical slot and should the “influence conversation” be set to be false?

To me, the documentation is a bit ambiguous. Here it says

“Slot events are written under slot_was_set in a story. If this slot is set inside a custom action, add the slot_was_set event immediately following the custom action call.”

That kind of implies that we need to train it in a story. (also this rasa example here does train every slot in the conversation even when influence conversation is set to false. However, here it says

“Slots can be set after every user message based on slot mappings. They can also be set by a custom action run in response to a user message. All slots which influence the conversation need to be added to your stories or rules.”

which implies that it does not to be trained if influence conversation is set to false.

My “problem” is that I have a lot of slots set that get values defined by custom action, e.g. I store a value of slot example_slot in slot example_slot_old when resetting example_slot so it will be impossible for me to train all these different slot events within a story. Further having many values for the categorical slot will lead to massive OR statements for the slot_was_set event which will increase training a lot… Basically, I would love to know in which cases exactly I NEED to train for slot_was_set to not reduce the performance.

Please someone help me with that :raising_hand_man: I would appreciate it a lot :heart: