This is documentation for Rasa Open Source Documentation v2.0.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (2.6.x).

Version: 2.0.x


InvalidRule Objects

class InvalidRule(RasaException)

Exception that can be raised when rules are not valid.

RulePolicy Objects

class RulePolicy(MemoizationPolicy)

Policy which handles all the rules


| @staticmethod
| supported_data() -> SupportedData

The type of data supported by this policy.


The data type supported by this policy (ML and rule data).


| __init__(featurizer: Optional[TrackerFeaturizer] = None, priority: int = RULE_POLICY_PRIORITY, lookup: Optional[Dict] = None, core_fallback_threshold: float = DEFAULT_CORE_FALLBACK_THRESHOLD, core_fallback_action_name: Text = ACTION_DEFAULT_FALLBACK_NAME, enable_fallback_prediction: bool = True, restrict_rules: bool = True, check_for_contradictions: bool = True) -> None

Create a RulePolicy object.


  • featurizer - Featurizer which is used to convert conversation states to features.
  • priority - Priority of the policy which is used if multiple policies predict actions with the same confidence.
  • lookup - Lookup table which is used to pick matching rules for a conversation state.
  • core_fallback_threshold - Confidence of the prediction if no rule matched and de-facto threshold for a core fallback.
  • core_fallback_action_name - Name of the action which should be predicted if no rule matched.
  • enable_fallback_prediction - If True core_fallback_action_name is predicted in case no rule matched.