Form policy priority lower than mapping policy

Hello everyone!

I have an intent greet which has a mapping, so it is

greet:
  triggers: utter_greet

Also I have a form action, and there I fill some slot. What I was trying to achieve is to fill the slot depending on the answer, in my case it was yes or no, and for that I was trying to catch affirm and deny intents. The thing is that if the user says something irrelevant I would like to ask it once again, for that reason I created following slot_mappings:

    def slot_mappings(self):
        return {"want_switch": [self.from_intent(intent = "affirm", value = True),
                                self.from_intent(intent = "deny", value = False),
                                self.from_intent(intent = "greet", value = False)]}

In this example I added greet just to test things, e.g. I read that priority of form policy is higher than mapping policy, therefore in this case want_switch should be set to false. However, this is the result:

So instead hello just goes along the form action. I tried to change priorities, however result is the same. Here is my logs.

2020-04-21 22:30:34 DEBUG    rasa.core.processor  - Received user message '/restart' with intent '{'name': 'restart', 'confidence': 1.0}' and entities '[]'
2020-04-21 22:30:34 DEBUG    rasa.core.processor  - Logged UserUtterance - tracker now has 41 events.
2020-04-21 22:30:34 DEBUG    rasa.core.policies.memoization  - Current tracker state [{'prev_action_listen': 1.0, 'intent_switch': 1.0}, {'intent_switch': 1.0, 'prev_switch_form': 1.0}, {'prev_action_listen': 1.0, 'intent_switch': 1.0}, {'intent_switch': 1.0, 'prev_switch_form': 1.0}, {'intent_restart': 1.0, 'prev_action_listen': 1.0}]
2020-04-21 22:30:34 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2020-04-21 22:30:34 DEBUG    rasa.core.featurizers  - Feature 'intent_restart' (value: '1.0') could not be found in feature map. Make sure you added all intents and entities to the domain
2020-04-21 22:30:34 DEBUG    rasa.core.policies.mapping_policy  - The predicted intent 'restart' is mapped to  action 'action_restart' in the domain.
2020-04-21 22:30:34 DEBUG    rasa.core.policies.form_policy  - There is no active form
2020-04-21 22:30:34 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.6).
2020-04-21 22:30:34 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_2_MappingPolicy
2020-04-21 22:30:34 DEBUG    rasa.core.processor  - Predicted next action 'action_restart' with confidence 1.00.
2020-04-21 22:30:34 DEBUG    rasa.core.processor  - Action 'action_restart' ended with events '[<rasa.core.events.Restarted object at 0x7f5d9944cc50>]'.
2020-04-21 22:30:34 DEBUG    rasa.core.processor  - Current slot values:
        fallback_count: None
        requested_slot: None
        subj_mail: None
        text_mail: None
        want_mail: None
        want_switch: None
2020-04-21 22:30:34 DEBUG    rasa.core.processor  - Predicted next action 'action_listen' with confidence 1.00.
2020-04-21 22:30:34 DEBUG    rasa.core.processor  - Action 'action_listen' ended with events '[]'.
2020-04-21 22:30:34 DEBUG    rasa.core.tracker_store  - Recreating tracker from sender id '4ee795e639a240fb9e704d9f7dc76db4'
2020-04-21 22:30:34 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "user", "timestamp": 1587508234.3284187, "text": "/restart", "parse_data": {"text": "/restart", "intent": {"name": "restart", "confidence": 1.0}, "intent_ranking": [{"name": "restart", "confidence": 1.0}], "entities": []}, "input_channel": "rasa", "message_id": "b1561226c3344307bc898b1646630049", "metadata": {}}
2020-04-21 22:30:34 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "action", "timestamp": 1587508234.3540142, "name": "action_restart", "policy": "policy_2_MappingPolicy", "confidence": 1}
2020-04-21 22:30:34 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "restart", "timestamp": 1587508234.3540206}
2020-04-21 22:30:34 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "action", "timestamp": 1587508234.354685, "name": "action_listen", "policy": null, "confidence": 1.0}
2020-04-21 22:30:34 DEBUG    rasa.core.tracker_store  - Tracker with sender_id '4ee795e639a240fb9e704d9f7dc76db4' stored to database
2020-04-21 22:30:34 DEBUG    rasa.core.lock_store  - Deleted lock for conversation '4ee795e639a240fb9e704d9f7dc76db4'.
2020-04-21 22:30:39 DEBUG    rasa.core.agent  - Requesting model from server http://rasa-x:5002/api/projects/default/models/tags/production...
2020-04-21 22:30:39 DEBUG    rasa.core.agent  - Model server returned 204 status code, indicating that no new model is available. Current fingerprint: db2b82541045249a934006386e2423c8
2020-04-21 22:30:39 DEBUG    rasa.core.agent  - No new model found at URL http://rasa-x:5002/api/projects/default/models/tags/production
2020-04-21 22:30:44 DEBUG    rasa.core.tracker_store  - Recreating tracker from sender id '4ee795e639a240fb9e704d9f7dc76db4'
2020-04-21 22:30:44 DEBUG    rasa.core.processor  - Received user message 'hi' with intent '{'name': 'greet', 'confidence': 0.9598373770713806}' and entities '[]'
2020-04-21 22:30:44 DEBUG    rasa.core.processor  - Logged UserUtterance - tracker now has 45 events.
2020-04-21 22:30:44 DEBUG    rasa.core.policies.memoization  - Current tracker state [None, None, None, {}, {'prev_action_listen': 1.0, 'intent_greet': 1.0}]
2020-04-21 22:30:44 DEBUG    rasa.core.policies.memoization  - There is a memorised next action 'utter_greet'
2020-04-21 22:30:44 DEBUG    rasa.core.policies.mapping_policy  - The predicted intent 'greet' is mapped to  action 'utter_greet' in the domain.
2020-04-21 22:30:44 DEBUG    rasa.core.policies.form_policy  - There is no active form
2020-04-21 22:30:44 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.6).
2020-04-21 22:30:44 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_0_MemoizationPolicy
2020-04-21 22:30:44 DEBUG    rasa.core.processor  - Predicted next action 'utter_greet' with confidence 1.00.
2020-04-21 22:30:44 DEBUG    rasa.core.processor  - Action 'utter_greet' ended with events '[BotUttered('hello', {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, {}, 1587508244.4839776)]'.
2020-04-21 22:30:44 DEBUG    rasa.core.policies.memoization  - Current tracker state [None, None, {}, {'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'prev_utter_greet': 1.0, 'intent_greet': 1.0}]
2020-04-21 22:30:44 DEBUG    rasa.core.policies.memoization  - There is a memorised next action 'action_listen'
2020-04-21 22:30:44 DEBUG    rasa.core.policies.mapping_policy  - The mapped action, 'utter_greet', for the intent, 'greet', was executed last, but it was predicted by another policy, 'policy_0_MemoizationPolicy', so MappingPolicy is not predicting any action.
2020-04-21 22:30:44 DEBUG    rasa.core.policies.form_policy  - There is no active form
2020-04-21 22:30:44 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.6).
2020-04-21 22:30:44 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_0_MemoizationPolicy
2020-04-21 22:30:44 DEBUG    rasa.core.processor  - Predicted next action 'action_listen' with confidence 1.00.
2020-04-21 22:30:44 DEBUG    rasa.core.processor  - Action 'action_listen' ended with events '[]'.
2020-04-21 22:30:44 DEBUG    rasa.core.tracker_store  - Recreating tracker from sender id '4ee795e639a240fb9e704d9f7dc76db4'
2020-04-21 22:30:44 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "user", "timestamp": 1587508244.461066, "text": "hi", "parse_data": {"intent": {"name": "greet", "confidence": 0.9598373770713806}, "entities": [], "intent_ranking": [{"name": "greet", "confidence": 0.9598373770713806}, {"name": "feedback", "confidence": 0.009052620269358158}, {"name": "help_import_data", "confidence": 0.008478539995849133}, {"name": "deny", "confidence": 0.006894328631460667}, {"name": "goodbye", "confidence": 0.0068478891626000404}, {"name": "affirm", "confidence": 0.004251312464475632}, {"name": "switch", "confidence": 0.003186427988111973}, {"name": "abilities", "confidence": 0.0014514266513288021}], "text": "hi"}, "input_channel": "rasa", "message_id": "05d45103c51047c19f1ac5b83a5a6d3c", "metadata": {}}
2020-04-21 22:30:44 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "action", "timestamp": 1587508244.4841096, "name": "utter_greet", "policy": "policy_0_MemoizationPolicy", "confidence": 1.0}
2020-04-21 22:30:44 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "bot", "timestamp": 1587508244.484116, "text": "hello", "data": {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, "metadata": {}}
2020-04-21 22:30:44 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "action", "timestamp": 1587508244.5098844, "name": "action_listen", "policy": "policy_0_MemoizationPolicy", "confidence": 1.0}
2020-04-21 22:30:44 DEBUG    rasa.core.tracker_store  - Tracker with sender_id '4ee795e639a240fb9e704d9f7dc76db4' stored to database
2020-04-21 22:30:44 DEBUG    rasa.core.lock_store  - Deleted lock for conversation '4ee795e639a240fb9e704d9f7dc76db4'.
2020-04-21 22:30:47 DEBUG    rasa.core.tracker_store  - Recreating tracker from sender id '4ee795e639a240fb9e704d9f7dc76db4'
2020-04-21 22:30:47 DEBUG    rasa.core.processor  - Received user message 'switch' with intent '{'name': 'switch', 'confidence': 0.9954257607460022}' and entities '[]'
2020-04-21 22:30:47 DEBUG    rasa.core.processor  - Logged UserUtterance - tracker now has 49 events.
2020-04-21 22:30:47 DEBUG    rasa.core.policies.memoization  - Current tracker state [None, {}, {'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'prev_utter_greet': 1.0, 'intent_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_switch': 1.0}]
2020-04-21 22:30:47 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2020-04-21 22:30:47 DEBUG    rasa.core.policies.mapping_policy  - The predicted intent 'switch' is mapped to  action 'switch_form' in the domain.
2020-04-21 22:30:47 DEBUG    rasa.core.policies.form_policy  - There is no active form
2020-04-21 22:30:47 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.6).
2020-04-21 22:30:47 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_2_MappingPolicy
2020-04-21 22:30:47 DEBUG    rasa.core.processor  - Predicted next action 'switch_form' with confidence 1.00.
2020-04-21 22:30:47 DEBUG    rasa.core.actions.action  - Calling action endpoint to run action 'switch_form'.
2020-04-21 22:30:47 DEBUG    rasa.core.processor  - Action 'switch_form' ended with events '[BotUttered('Do you want to talk with operator?', {"elements": null, "quick_replies": null, "buttons": [{"payload": "/affirm", "title": "yes"}, {"payload": "/deny", "title": "no"}], "attachment": null, "image": null, "custom": null}, {}, 1587508247.75378), <rasa.core.events.Form object at 0x7f5d99399ac8>, <rasa.core.events.SlotSet object at 0x7f5d99399a58>]'.
2020-04-21 22:30:47 DEBUG    rasa.core.processor  - Current slot values:
        fallback_count: None
        requested_slot: want_switch
        subj_mail: None
        text_mail: None
        want_mail: None
        want_switch: None
2020-04-21 22:30:47 DEBUG    rasa.core.policies.memoization  - Current tracker state [None, {}, {'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'prev_utter_greet': 1.0, 'intent_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_switch': 1.0}]
2020-04-21 22:30:47 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2020-04-21 22:30:47 DEBUG    rasa.core.policies.mapping_policy  - The mapped action, 'switch_form', for this intent, 'switch', was executed last so MappingPolicy is returning to action_listen.
2020-04-21 22:30:47 DEBUG    rasa.core.policies.form_policy  - There is an active form 'switch_form'
2020-04-21 22:30:47 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.6).
2020-04-21 22:30:47 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_2_MappingPolicy
2020-04-21 22:30:47 DEBUG    rasa.core.processor  - Predicted next action 'action_listen' with confidence 1.00.
2020-04-21 22:30:47 DEBUG    rasa.core.processor  - Action 'action_listen' ended with events '[]'.
2020-04-21 22:30:47 DEBUG    rasa.core.tracker_store  - Recreating tracker from sender id '4ee795e639a240fb9e704d9f7dc76db4'
2020-04-21 22:30:47 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "user", "timestamp": 1587508247.719889, "text": "switch", "parse_data": {"intent": {"name": "switch", "confidence": 0.9954257607460022}, "entities": [], "intent_ranking": [{"name": "switch", "confidence": 0.9954257607460022}, {"name": "greet", "confidence": 0.0015333207556977868}, {"name": "abilities", "confidence": 0.001376154599711299}, {"name": "help_import_data", "confidence": 0.0006797130336053669}, {"name": "goodbye", "confidence": 0.0005205778870731592}, {"name": "deny", "confidence": 0.0003180593193974346}, {"name": "affirm", "confidence": 0.0001398829190293327}, {"name": "feedback", "confidence": 6.478714112745365e-06}], "text": "switch"}, "input_channel": "rasa", "message_id": "a48e06a4150149bd8923d6efc44d46e0", "metadata": {}}
2020-04-21 22:30:47 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "action", "timestamp": 1587508247.7540276, "name": "switch_form", "policy": "policy_2_MappingPolicy", "confidence": 1}
2020-04-21 22:30:47 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "bot", "timestamp": 1587508247.7540348, "text": "Do you want to talk with operator?", "data": {"elements": null, "quick_replies": null, "buttons": [{"payload": "/affirm", "title": "yes"}, {"payload": "/deny", "title": "no"}], "attachment": null, "image": null, "custom": null}, "metadata": {}}
2020-04-21 22:30:47 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "form", "timestamp": 1587508247.7540383, "name": "switch_form"}
2020-04-21 22:30:47 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "slot", "timestamp": 1587508247.7540429, "name": "requested_slot", "value": "want_switch"}
2020-04-21 22:30:47 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "action", "timestamp": 1587508247.7761936, "name": "action_listen", "policy": "policy_2_MappingPolicy", "confidence": 1}
2020-04-21 22:30:47 DEBUG    rasa.core.tracker_store  - Tracker with sender_id '4ee795e639a240fb9e704d9f7dc76db4' stored to database
2020-04-21 22:30:47 DEBUG    rasa.core.lock_store  - Deleted lock for conversation '4ee795e639a240fb9e704d9f7dc76db4'.
2020-04-21 22:30:49 DEBUG    rasa.core.agent  - Requesting model from server http://rasa-x:5002/api/projects/default/models/tags/production...
2020-04-21 22:30:49 DEBUG    rasa.core.agent  - Model server returned 204 status code, indicating that no new model is available. Current fingerprint: db2b82541045249a934006386e2423c8
2020-04-21 22:30:49 DEBUG    rasa.core.agent  - No new model found at URL http://rasa-x:5002/api/projects/default/models/tags/production
2020-04-21 22:30:50 DEBUG    rasa.core.tracker_store  - Recreating tracker from sender id '4ee795e639a240fb9e704d9f7dc76db4'
2020-04-21 22:30:50 DEBUG    rasa.core.processor  - Received user message 'hello' with intent '{'name': 'greet', 'confidence': 0.9669525027275085}' and entities '[]'
2020-04-21 22:30:50 DEBUG    rasa.core.processor  - Logged UserUtterance - tracker now has 55 events.
2020-04-21 22:30:50 DEBUG    rasa.core.policies.memoization  - Current tracker state [{'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'prev_utter_greet': 1.0, 'intent_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_switch': 1.0}, {'intent_switch': 1.0, 'prev_switch_form': 1.0, 'active_form_switch_form': 1.0}, {'prev_action_listen': 1.0, 'intent_greet': 1.0, 'active_form_switch_form': 1.0}]
2020-04-21 22:30:50 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2020-04-21 22:30:50 DEBUG    rasa.core.policies.mapping_policy  - The predicted intent 'greet' is mapped to  action 'utter_greet' in the domain.
2020-04-21 22:30:50 DEBUG    rasa.core.policies.form_policy  - There is an active form 'switch_form'
2020-04-21 22:30:50 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.6).
2020-04-21 22:30:50 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_2_MappingPolicy
2020-04-21 22:30:50 DEBUG    rasa.core.processor  - Predicted next action 'utter_greet' with confidence 1.00.
2020-04-21 22:30:50 DEBUG    rasa.core.processor  - Action 'utter_greet' ended with events '[BotUttered('hello', {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, {}, 1587508250.169049)]'.
2020-04-21 22:30:50 DEBUG    rasa.core.policies.memoization  - Current tracker state [None, {}, {'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'prev_utter_greet': 1.0, 'intent_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_switch': 1.0}]
2020-04-21 22:30:50 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2020-04-21 22:30:50 DEBUG    rasa.core.policies.mapping_policy  - The mapped action, 'utter_greet', for this intent, 'greet', was executed last so MappingPolicy is returning to action_listen.
2020-04-21 22:30:50 DEBUG    rasa.core.policies.form_policy  - There is an active form 'switch_form'
2020-04-21 22:30:50 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.6).
2020-04-21 22:30:50 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_2_MappingPolicy
2020-04-21 22:30:50 DEBUG    rasa.core.processor  - Predicted next action 'action_listen' with confidence 1.00.
2020-04-21 22:30:50 DEBUG    rasa.core.processor  - Action 'action_listen' ended with events '[]'.
2020-04-21 22:30:50 DEBUG    rasa.core.tracker_store  - Recreating tracker from sender id '4ee795e639a240fb9e704d9f7dc76db4'
2020-04-21 22:30:50 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "user", "timestamp": 1587508250.1453593, "text": "hello", "parse_data": {"intent": {"name": "greet", "confidence": 0.9669525027275085}, "entities": [], "intent_ranking": [{"name": "greet", "confidence": 0.9669525027275085}, {"name": "feedback", "confidence": 0.006551859434694052}, {"name": "goodbye", "confidence": 0.006071192678064108}, {"name": "deny", "confidence": 0.005854527931660414}, {"name": "help_import_data", "confidence": 0.005793100688606501}, {"name": "switch", "confidence": 0.0046393536031246185}, {"name": "affirm", "confidence": 0.003065054304897785}, {"name": "abilities", "confidence": 0.0010723192244768143}], "text": "hello"}, "input_channel": "rasa", "message_id": "0939d6836feb4feb83cdb703eede3834", "metadata": {}}
2020-04-21 22:30:50 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "action", "timestamp": 1587508250.169188, "name": "utter_greet", "policy": "policy_2_MappingPolicy", "confidence": 1}
2020-04-21 22:30:50 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "bot", "timestamp": 1587508250.169195, "text": "hello", "data": {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, "metadata": {}}
2020-04-21 22:30:50 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "action", "timestamp": 1587508250.1925836, "name": "action_listen", "policy": "policy_2_MappingPolicy", "confidence": 1}
2020-04-21 22:30:50 DEBUG    rasa.core.tracker_store  - Tracker with sender_id '4ee795e639a240fb9e704d9f7dc76db4' stored to database
2020-04-21 22:30:50 DEBUG    rasa.core.lock_store  - Deleted lock for conversation '4ee795e639a240fb9e704d9f7dc76db4'.
2020-04-21 22:30:53 DEBUG    rasa.core.tracker_store  - Recreating tracker from sender id '4ee795e639a240fb9e704d9f7dc76db4'
2020-04-21 22:30:53 DEBUG    rasa.core.processor  - Received user message 'no' with intent '{'name': 'deny', 'confidence': 0.9855871796607971}' and entities '[]'
2020-04-21 22:30:53 DEBUG    rasa.core.processor  - Logged UserUtterance - tracker now has 59 events.
2020-04-21 22:30:53 DEBUG    rasa.core.policies.memoization  - Current tracker state [{'prev_action_listen': 1.0, 'intent_switch': 1.0}, {'intent_switch': 1.0, 'prev_switch_form': 1.0, 'active_form_switch_form': 1.0}, {'prev_action_listen': 1.0, 'intent_switch': 1.0, 'active_form_switch_form': 1.0}, {'prev_utter_greet': 1.0, 'intent_switch': 1.0, 'active_form_switch_form': 1.0}, {'prev_action_listen': 1.0, 'intent_deny': 1.0, 'active_form_switch_form': 1.0}]
2020-04-21 22:30:53 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2020-04-21 22:30:53 DEBUG    rasa.core.policies.form_policy  - There is an active form 'switch_form'
2020-04-21 22:30:53 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.6).
2020-04-21 22:30:53 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_3_FormPolicy
2020-04-21 22:30:53 DEBUG    rasa.core.processor  - Predicted next action 'switch_form' with confidence 1.00.
2020-04-21 22:30:53 DEBUG    rasa.core.actions.action  - Calling action endpoint to run action 'switch_form'.
2020-04-21 22:30:53 DEBUG    rasa.core.processor  - Action 'switch_form' ended with events '[BotUttered('How can I help you then?', {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, {}, 1587508253.2980564), <rasa.core.events.SlotSet object at 0x7f5d990c4588>, <rasa.core.events.SlotSet object at 0x7f5d991c9240>, <rasa.core.events.FollowupAction object at 0x7f5d991c9160>, <rasa.core.events.Form object at 0x7f5d991c9278>, <rasa.core.events.SlotSet object at 0x7f5d991c9198>]'.
2020-04-21 22:30:53 DEBUG    rasa.core.processor  - Current slot values:
        fallback_count: None
        requested_slot: None
        subj_mail: None
        text_mail: None
        want_mail: None
        want_switch: None
2020-04-21 22:30:53 DEBUG    rasa.core.processor  - Predicted next action 'action_listen' with confidence 1.00.
2020-04-21 22:30:53 DEBUG    rasa.core.processor  - Action 'action_listen' ended with events '[]'.
2020-04-21 22:30:53 DEBUG    rasa.core.tracker_store  - Recreating tracker from sender id '4ee795e639a240fb9e704d9f7dc76db4'
2020-04-21 22:30:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "user", "timestamp": 1587508253.2633317, "text": "no", "parse_data": {"intent": {"name": "deny", "confidence": 0.9855871796607971}, "entities": [], "intent_ranking": [{"name": "deny", "confidence": 0.9855871796607971}, {"name": "help_import_data", "confidence": 0.004615915007889271}, {"name": "switch", "confidence": 0.004103547893464565}, {"name": "greet", "confidence": 0.003192598931491375}, {"name": "feedback", "confidence": 0.0012685724068433046}, {"name": "goodbye", "confidence": 0.00048018860979937017}, {"name": "affirm", "confidence": 0.0004039329069200903}, {"name": "abilities", "confidence": 0.0003480692976154387}], "text": "no"}, "input_channel": "rasa", "message_id": "dd8f1bcfefea4217a2cfcd1a01a02497", "metadata": {}}
2020-04-21 22:30:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "action", "timestamp": 1587508253.2983303, "name": "switch_form", "policy": "policy_3_FormPolicy", "confidence": 1.0}
2020-04-21 22:30:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "bot", "timestamp": 1587508253.298337, "text": "How can I help you then?", "data": {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, "metadata": {}}
2020-04-21 22:30:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "slot", "timestamp": 1587508253.2983403, "name": "want_switch", "value": false}
2020-04-21 22:30:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "slot", "timestamp": 1587508253.2983441, "name": "want_switch", "value": null}
2020-04-21 22:30:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "followup", "timestamp": 1587508253.2983468, "name": "action_listen"}
2020-04-21 22:30:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "form", "timestamp": 1587508253.2983508, "name": null}
2020-04-21 22:30:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "slot", "timestamp": 1587508253.2983534, "name": "requested_slot", "value": null}
2020-04-21 22:30:53 DEBUG    rasa.core.brokers.pika  - Published Pika events to exchange 'rasa-exchange' on host 'rabbit':
{"sender_id": "4ee795e639a240fb9e704d9f7dc76db4", "event": "action", "timestamp": 1587508253.299268, "name": "action_listen", "policy": null, "confidence": 1.0}
2020-04-21 22:30:53 DEBUG    rasa.core.tracker_store  - Tracker with sender_id '4ee795e639a240fb9e704d9f7dc76db4' stored to database
2020-04-21 22:30:53 DEBUG    rasa.core.lock_store  - Deleted lock for conversation '4ee795e639a240fb9e704d9f7dc76db4'.

Hope someone can help me.

I have some other questions regarding forms as well. If someone is proficient with it, I would be pleased to hear your thoughts about them.

So what I found in changelog is that in version 1.9.0 there is a bugfix when Form Policy was “overwriting” Mapping Policy.

5205: Fixed the bug when FormPolicy was overwriting MappingPolicy prediction (e.g. /restart). 
Priorities for Mapping Policy and Form Policy are no longer linear: 
FormPolicy priority is 5, but its prediction is ignored if MappingPolicy is used for prediction.

I assume that this is not the behaviour that was intended, am I right, or form policy is actually lower than mapping policy now? If so, could you please change documentation regarding policies.

2 Likes

@erohmensing Sorry for tagging, I couldn’t find a way to write you PM here, but I believe this might be important for rasa, e.g. it might a bug. Could you please look into it?

that’s intended behavior, priority of mapping policy is lower due to implementation details (it has to be lower than fallback policy). However, mapping policy prediction will be taken over form policy prediction

First, thank you very much for your reply!

I was expecting the same thing, hope you change the documentation about that, if you haven’t yet.

Now, I faced some other issue. Say I want to send an email, that’s why I take text using FormActions’ self.from_text. But what if I say something which I have triggers: for, then instead of taking text, it will reply, which is not really cool.

Also, assume I’m in the middle of the form number one, and I trigger the form number two. Then, when I finish with form number two, I assume I’m not back in the middle of form one, until I trigger it again somehow. The ways of solving this that comes to my mind is to revert all actions done in the form two, but for that I would have to make multiple UtteranceReverted, do you or someone else knows ways of solving this? Activating form again looks okay, but I wonder if it is possible to do so differently, i.e. like I described.

Thank you again for your reply!

UtteranceReverted would remove all the effects of the form two including setting the slots. I’m not sure what your problem is about but if you add triggers it means it is the rule and will be executed regardless of where you’re in the story.

I know how the UtteranceReverted works, I mean first, if I want to revert whole form action, how do I do that since I’m not sure if I can add multiple UtteranceReverted in one submit.

Second, what’s the point in picking up Mapping policy when I ask the user for self.from_text(None) which should just take user input instead of parsing intent.

And speaking in general, is there a way to make Mapping policy to have priority lower than Form policy, because this is really counterintuitive behaviour, which is for example the case with from_text and some other cases. Let’s say I have intent advice, and I have a mapping for an advice. And let’s say I ask something in a form, and expect the user to ask advice in this specific case. What should you expect me to do in that case?

if you have the cases when intents doesn’t always trigger the same action, then you shouldn’t use mapping policy