Rasa: RulePolicy: Warn about overlapping rules

Created on 2 Jun 2020  路  7Comments  路  Source: RasaHQ/rasa

@Ghostvv

I'd like to remove longest matching rule, rules shouldn't overlap

Current behavior
In case multiple rules match the current state, the RulePolicy will use the longest matching rule.

Desired behavior
In case rules overlap the RulePolicy should

  • print a warning &
  • stop the training and exit

The RulePolicy should be trained before the other policies to be able to fail early.

What does "overlap" mean

  • one rule is a subset of another one, regardless whether they predict the same action or not. E.g. rule A predicts action_overlap after two actions action_1, action_2 while rule b predicts action_overlap after a preceding action action_2
  • two rules match the same state but predict different actions
  • stories and rules contradict
area normal type

All 7 comments

I think we even emit hard error, and stop training until rules are fixed. Therefore, RulePolicy should be always trained first

I see where you're going, but on the contrary we are currently not doing the same for conflicting stories. Actually we currently not even warn the user about conflicting stories 馃檲

without RulePolicy, it was tricky to do

updated the PR description 馃憤

Also train the RulePolicy first to fail early

@Ghostvv Should I handle this or you?

I can handle it as part of RulePolicy refactor

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nahidalam picture nahidalam  路  3Comments

karnigili picture karnigili  路  3Comments

nicolasfarina picture nicolasfarina  路  3Comments

mit4dev picture mit4dev  路  4Comments

edouardlp picture edouardlp  路  3Comments