Contradicting rules or stories found with categorical slots

Hello everyone

I’m currently trying the latest version (2.6.0), and I currently have this rule that will be triggered when the schedule form is submitted.

  - rule: Submit schedule demo form
    condition:
      - active_loop: schedule_demo_form
    steps:
      - action: schedule_demo_form
      - active_loop: null
      - slot_was_set:
          - interested_demo: "yes"
      - action: utter_want_schedule_demo

  - rule: Submit schedule demo form - 2
    condition:
      - active_loop: schedule_demo_form
    steps:
      - action: schedule_demo_form
      - active_loop: null
      - slot_was_set:
          - interested_demo: "no"
      - action: utter_dont_want_schedule_demo

But, when I train the bot, I receive the following message:

InvalidRule:

Contradicting rules or stories found :rotating_light:

  • the prediction of the action ‘utter_dont_want_schedule_demo’ in rule ‘Submit schedule demo form - 2’ is contradicting with rule(s) ‘Submit schedule demo form’ which predicted action ‘utter_want_schedule_demo’.

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.

The interested demo slot is categorical like this:

  interested_demo:
    type: categorical
    influence_conversation: true
    values:
      - yes
      - no

I’m not sure what I’m doing wrong, I tested in 2.4.0 and the error doesn’t show up. I thought that I could use categorical slots to guide the flow as I want.

Let me know what I can do

Hi @DanielOlarte, your usage of categorical slots is just fine, the behaviour you’re seeing is due to a bug introduced in 2.5.0. We wrote a fix for this, which should be in 2.6.1. Please let me know if you continue to see this behaviour.

Hi @fkoerner. Yes, we keep seeing that issue after updating to 2.6.1

InvalidRule:

Contradicting rules or stories found :rotating_light:

  • the prediction of the action ‘utter_dont_want_schedule_demo’ in rule ‘Submit schedule demo form - 2’ is contradicting with rule(s) ‘Submit schedule demo form’ which predicted action ‘utter_want_schedule_demo’.

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.

And:

Rasa Version      :         2.6.1
Minimum Compatible Version: 2.6.0
Rasa SDK Version  :         2.6.0
Rasa X Version    :         None
Python Version    :         3.7.3
Operating System  :         Darwin-20.3.0-x86_64-i386-64bit
Python Path       :         /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7

Let me know if I missed something

Thanks

Hi @DanielOlarte, sorry, I jumped the gun. Turns out this fix didn’t make it into 2.6.1, and it should be in the next minor release. If this is blocking your progress, you can also try and compile from source. The relevant fix is here

Hi @fkoerner

Great, any timeline for that release? just wondering. For the moment, we just revert it back to 2.4.* until that fix is done.

Thanks,

Had the same issue, thanks for answering! Waiting for Repeat PR on 2.6.x branch by JEM-Mosig · Pull Request #8689 · RasaHQ/rasa · GitHub to be included in the next release.

It’s out! See release notes here

Let me know if you have any other issues related to this but hopefully this time it’s all ironed out :slight_smile:

Great! It’s working without issues. Thank you!

1 Like

Glad to hear it :slight_smile: Happy bot-building!

Hi! I am facing almost the same issue with list type slots .

My Rasa is

Rasa Version      :         2.6.2
Minimum Compatible Version: 2.6.0
Rasa SDK Version  :         2.6.0
Rasa X Version    :         None
Python Version    :         3.6.8
Operating System  :         Windows-10-10.0.17763-SP0

My rules are

version: "2.0"
rules:
  - rule: predictive_dynamic_set
    steps:
      - intent: buttons
      - action: action_get_buttons
      - slot_was_set:
        - buttons: [1, 2, 3]
      - action: utter_predictive_buttons

  - rule: predictive_static_set
    steps:
      - intent: buttons
      - action: action_get_buttons
      - slot_was_set:
        - buttons: null
      - action: utter_static_buttons

Slot in domain:

  predictive-buttons:
    type: list
    influence_conversation: true

And error is:

InvalidRule: 
Contradicting rules or stories found

- the prediction of the action 'utter_static_buttons' in rule 'predictive_static_set' is contradicting with rule(s) 'predictive_dyn
amic_set'.
- the prediction of the action 'utter_predictive_buttons' in rule 'predictive_dynamic_set' is contradicting with rule(s) 'predictiv
e_static_set'.
Please update your stories and rules so that they don't contradict each other.

Hi @annthehuman, looks to me like this is another related bug :frowning: Would you mind creating an issue here?

I see you created an issue, thank you very much! :slight_smile:

1 Like