Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidRule warning raised despite slots that should resolve conflict #8581

Closed
koernerfelicia opened this issue Apr 30, 2021 · 2 comments · Fixed by #8612
Closed

InvalidRule warning raised despite slots that should resolve conflict #8581

koernerfelicia opened this issue Apr 30, 2021 · 2 comments · Fixed by #8612
Assignees
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@koernerfelicia
Copy link
Contributor

Rasa version:
2.5.1 (not observed in 2.5.0)

Python version:
3.8.7

Operating system (windows, osx, ...):
OSX

Issue:
See slack thread here. It seems rule validation isn't considering slots when resolving potential conflicts.

Error (including full traceback):

InvalidRule: 
Contradicting rules or stories found 🚨
- the prediction of the action 'utter_switch_luis' in story 'why rasa 3' is contradicting with rule(s) 'why rasa 2, why rasa 4' which predicted action 'utter_ask_more'.

The story:

- story: why rasa 3
  steps:
  - intent: why_rasa
    entities:
    - current_api: luis
  - slot_was_set:
    - current_api: luis
  - action: utter_why_rasa
  - action: utter_switch_luis
  ...

The rules:

- rule: why rasa 2
  steps:
  - intent: why_rasa
    entities:
    - current_api: tensorflow
  - slot_was_set:
    - current_api: __other__
  - action: utter_why_rasa
  - action: utter_ask_more
- rule: why rasa 4
  steps:
  - intent: why_rasa
    entities:
    - current_api: dialogflow
  - slot_was_set:
    - current_api: dialogflow
  - action: utter_why_rasa
  - action: utter_switch_dialogflow
  - action: utter_ask_more_migrate

The domain.yml

slots:
  current_api:
    type: categorical
    values:
    - dialogflow
    - luis
    ```
@koernerfelicia koernerfelicia added type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors. area:rasa-oss 🎡 Anything related to the open source Rasa framework labels Apr 30, 2021
@koernerfelicia koernerfelicia self-assigned this Apr 30, 2021
@koernerfelicia
Copy link
Contributor Author

koernerfelicia commented May 4, 2021

Update: I'm pretty sure this is not an issue of string matching, the featurization seems to be working just fine (this makes sense too, since that part of the code hadn't changed). I think the logic from the hide rules PR allows prediction_source_from_intent to override prediction_source_from_text. Still figuring out what the desired behaviour is for this, and how to make it align.

@JEM-Mosig
Copy link
Contributor

It's probably caused by the sorting of values in RulePolicy._does_rule_match_state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:rasa-oss 🎡 Anything related to the open source Rasa framework type:bug 🐛 Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants