FormPolicy overrides TwoStageFallbackPolicy

Hi, I’m using the TwoStageFallbackPolicy as well as the FormPolicy. While testing I found that the FormPolicy overrides the TwoStageFallbackPolicy even though the confidence level is a below the defined threshold.


From the docs: There are different policies to choose from, and you can include multiple policies in a single rasa.core.agent.Agent . At every turn, the policy which predicts the next action with the highest confidence will be used. If two policies predict with equal confidence, the policy with the higher priority will be used.

So, what exactly does higher priority mean (it does not mean the order in the config file as it seems) and how can I give a higher priority to the fallback policy?

EDIT: Ok, looking at the code it seems like priorities are hardcoded. So, I guess I have to write custom code in the form action. Any hint, where I can get the nlu_threshold from other than reading it from the config-file

So, what exactly does higher priority mean

Higher priority means the following: if two policies both are confident regarding which action should be executed next, then the priority is used to determine which policy kicks in. E.g. if a machine learning policy says 100% action A and the MemoizationPolicy says 100% action B, the MemoizationPolicy would overrule the machine learning one.

You can change the priorities by adding a priority field to your policy config, e.g.

  - name: MemoizationPolicy
    priority: 1234