Have two rules which have the bot respond with different sequence of actions to the same intent, based on different “slot_was_set” slots. The idea is to take a different action on an intent depending if a certain slot had already been set.:
rule: Say goodbye anytime the user says goodbye with a color slot set.
condition:
-
slot_was_set:
- color steps:
-
intent: goodbye
-
action: utter_congratulations
-
action: utter_goodbye2
-
rule: Say goodbye anytime the user says goodbye with a mood slot set condition:
- slot_was_set:
- mood steps:
- intent: goodbye
- action: utter_goodbye2
- slot_was_set:
-
rule: Say goodbye if user says bye and no slots set steps:
- intent: goodbye
- action: utter_goodbye
When I train, I get the following:
InvalidRule:
Contradicting rules or stories found
- the prediction of the action ‘utter_congratulations’ in rule ‘Say goodbye anytime the user says goodbye with a color slot set’ is contradicting with rule(s) ‘Say goodbye anytime the user says goodbye with a mood slot set, Say goodbye if user says bye and no slots set’ which predicted action ‘utter_goodbye2’.
- the prediction of the action ‘utter_goodbye’ in rule ‘Say goodbye if user says bye and no slots set’ is contradicting with rule(s) ‘Say goodbye anytime the user says goodbye with a mood slot set, Say goodbye anytime the user says goodbye with a color slot set’ which predicted action ‘utter_goodbye2’. Please update your stories and rules so that they don’t contradict each other. You can find more information about the usage of rules at Rules.
Why is this a contradiction if the these rules would not be invoked in the same circumstances?
Running Rasa version 3.3.1 Running Python version: 3.7.15