Hello, We are facing some intermittent issues during our conversations where the conversations go unresponsive or clueless as rasa is predicting “action_listen” instead of the appropriate form action. Please provide us suggestions or corrections in our implementations (if any) to resolve the issue at earliest. This is impacting our business as customers are facing these issues frequently.
Current configurations in our implementation:
- Rasa 1.10.3.
- Policy Configurations:
- {“name”: “app.custom.custom_keras_policy.CustomKerasPolicy”,“priority”:1,“epochs”: 300,“batch_size”: 64,“random_seed”: 42,“validation_split”: 0,“featurizer”: [{“name”: “MaxHistoryTrackerFeaturizer”,“max_history”: 5,“state_featurizer”: [{“name”: “BinarySingleStateFeaturizer”}]}]}
- {“name”: “AugmentedMemoizationPolicy”,“priority”:2,“max_history”: 6}
- {“name”: “FallbackPolicy”,“priority”:3,“nlu_threshold”: 0.3,“core_threshold”: 0.3,“ambiguity_threshold”: 0,“fallback_action_name”: “action_default_fallback”}
- {“name”:“FormPolicy”,“priority”:4}
- {“name”:“MappingPolicy”,“priority”:5}
- We are using MySQL for storing the tracker states and which we are cleaning past 1hr events for every 1hr. (Means at 2’O clock we clean all events before 1’O clock).
- Not configuring anything related to Session (Defaults session_config holds).
- All our stories are simple form based stories looks similar to below
- new_trash_can
- form_action_new_trash_can
- form{“name”:“form_action_new_trash_can”}
- form{“name”:null}
- new_trash_can
Scenario1: Start a new conversation (using /) and rasa predicts “action_listen” instead of the form “form_action_ootb_welcome”
Story Definition:
- ootb_welcome
- form_action_ootb_welcome
- form{“name”:“form_action_ootb_welcome”}
- form{“name”:null}
Below are the logs where we observed action_listen was predicted instead of form_action_ootb_welcome. Here the AugmentedMemoizationPolicy does not predict the form action (may be due to max_history setting, we are okay here), but we expect Keras policy to predict the form action
rasa.core.processor | DEBUG | [processor.py:471-_parse_message()] | Received user message '/ootb_welcome' with intent '{'name': 'ootb_welcome', 'confidence': 1.0}' and entities '[]'
rasa.core.processor | DEBUG | [processor.py:507-_handle_message_with_tracker()] | Logged UserUtterance - tracker now has 43 events.
rasa.core.policies.fallback | DEBUG | [fallback.py:171-predict_action_probabilities()] | NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
rasa.core.policies.form_policy | DEBUG | [form_policy.py:165-predict_action_probabilities()] | There is no active form
rasa.core.policies.mapping_policy | DEBUG | [mapping_policy.py:159-predict_action_probabilities()] | There is no mapped action for the predicted intent, 'ootb_welcome'.
rasa.core.policies.memoization | DEBUG | [memoization.py:195-predict_action_probabilities()] | Current tracker state [None, None, None, {'slot_sys_dialog_interaction_state_1': 1.0}, {'prev_action_listen': 1.0, 'slot_sys_dialog_interaction_state_1': 1.0}, {'prev_form_action_ootb_what_can_you_do': 1.0, 'slot_sys_dialog_interaction_state_1': 1.0, 'intent_ootb_welcome': 1.0}]
rasa.core.policies.memoization | DEBUG | [memoization.py:299-_recall_using_delorean()] | Launch DeLorean...
rasa.core.policies.memoization | DEBUG | [memoization.py:319-_recall_using_delorean()] | Current tracker state [None, None, None, None, {'slot_sys_dialog_interaction_state_1': 1.0}, {'prev_form_action_ootb_what_can_you_do': 1.0, 'slot_sys_dialog_interaction_state_1': 1.0, 'intent_ootb_welcome': 1.0}]
rasa.core.policies.memoization | DEBUG | [memoization.py:211-predict_action_probabilities()] | There is no memorised next action
rasa.core.policies.ensemble | DEBUG | [ensemble.py:538-probabilities_using_best_policy()] | Predicted next action using policy_2_CustomKerasPolicy
rasa.core.processor | DEBUG | [processor.py:308-predict_next_action()] | Predicted next action 'action_listen' with confidence 1.00.
rasa.core.processor | DEBUG | [processor.py:711-_log_action_on_tracker()] | Action 'action_listen' ended with events '[]'.
Working scenario logs where form action “'form_action_ootb_welcome” is predicted using AugmentedMemoizationPolicy
rasa.core.processor | DEBUG | [processor.py:471-_parse_message()] | Received user message '/ootb_welcome' with intent '{'name': 'ootb_welcome', 'confidence': 1.0}' and entities '[]'
rasa.core.processor | DEBUG | [processor.py:507-_handle_message_with_tracker()] | Logged UserUtterance - tracker now has 4 events.
rasa.core.policies.fallback | DEBUG | [fallback.py:171-predict_action_probabilities()] | NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
rasa.core.policies.form_policy | DEBUG | [form_policy.py:165-predict_action_probabilities()] | There is no active form
rasa.core.policies.memoization | DEBUG | [memoization.py:195-predict_action_probabilities()] | Current tracker state [None, None, None, None, {'slot_sys_dialog_interaction_state_1': 1.0}, {'prev_action_listen': 1.0, 'slot_sys_dialog_interaction_state_1': 1.0, 'intent_ootb_welcome': 1.0}]
rasa.core.policies.memoization | DEBUG | [memoization.py:199-predict_action_probabilities()] | There is a memorised next action 'form_action_ootb_welcome'
rasa.core.policies.ensemble | DEBUG | [ensemble.py:538-probabilities_using_best_policy()] | Predicted next action using policy_4_AugmentedMemoizationPolicy
rasa.core.processor | DEBUG | [processor.py:308-predict_next_action()] | Predicted next action 'form_action_ootb_welcome' with confidence 1.00.
rasa.core.actions.action | DEBUG | [action.py:546-run()] | Calling action endpoint to run action 'form_action_ootb_welcome'.
rasa.core.processor | DEBUG | [processor.py:711-_log_action_on_tracker()] | Action 'form_action_ootb_welcome' ended with events '[BotUttered('utter_intent_ootb_what_can_you_do', {"elements": null, "quick_replies": null, "buttons": null, "attachment": null, "image": null, "custom": null}, {}, 1615370693.4402285), <rasa.core.events.Form object at 0x0000023ED4ADEE08>, <rasa.core.events.Form object at 0x0000023ED4ADE1C8>, <rasa.core.events.SlotSet object at 0x0000023ED4ADE948>]'.
Scenario2: Start a new conversation (using /), rasa predicts the form properly and during the slot filling it predicts “action_listen” instead of the form action “form_action_new_trash_can” even though a form was already active.
Story Definition:
- new_trash_can
- form_action_new_trash_can
- form{“name”:" form_action_new_trash_can"}
- form{“name”:null}
Below are the logs we observed where action_listen was predicted instead of form_action_new_trash_can. Here the Form policy did not choose the intended form action though the form is active where as in working scenario shown further below it did predict the form action appropriately.
rasa.core.processor | DEBUG | | [processor.py:471-_parse_message()] | Received user message 'Yes' with intent '{'name': 'smalltalk_confirmation_yes', 'confidence': 0.954254686832428}' and entities '[]'
rasa.core.processor | DEBUG | | [processor.py:507-_handle_message_with_tracker()] | Logged UserUtterance - tracker now has 40 events.
rasa.core.policies.memoization | DEBUG | | [memoization.py:195-predict_action_probabilities()] | Current tracker state [None, None, None, None, {'slot_sys_dialog_interaction_state_1': 1.0}, {'intent_new_trash_can': 1.0, 'slot_sys_dialog_interaction_state_1': 1.0, 'prev_action_listen': 1.0, 'entity_trash_can_type_entity': 1.0}]
rasa.core.policies.memoization | DEBUG | | [memoization.py:299-_recall_using_delorean()] | Launch DeLorean...
rasa.core.policies.memoization | DEBUG | | [memoization.py:311-_recall_using_delorean()] | Current tracker state [None, None, None, None, None, {'slot_sys_dialog_interaction_state_1': 1.0}]
rasa.core.policies.memoization | DEBUG | | [memoization.py:199-predict_action_probabilities()] | There is a memorised next action 'action_listen'
rasa.core.policies.fallback | DEBUG | | [fallback.py:171-predict_action_probabilities()] | NLU confidence threshold met, confidence of fallback action set to core threshold (0.35).
rasa.core.policies.form_policy | DEBUG | | [form_policy.py:147-predict_action_probabilities()] | There is an active form 'form_action_new_trash_can'
rasa.core.policies.mapping_policy | DEBUG | | [mapping_policy.py:159-predict_action_probabilities()] | There is no mapped action for the predicted intent, 'smalltalk_confirmation_yes'.
rasa.core.policies.ensemble | DEBUG | | [ensemble.py:538-probabilities_using_best_policy()] | Predicted next action using policy_3_FormPolicy
rasa.core.processor | DEBUG | | [processor.py:308-predict_next_action()] | Predicted next action 'action_listen' with confidence 1.00.
rasa.core.processor | DEBUG | | [processor.py:711-_log_action_on_tracker()] | Action 'action_listen' ended with events '[]'.
Working scenario logs where form action “'form_action_new_trash_can” is predicted using FormPolicy.
rasa.core.processor | DEBUG | | [processor.py:471-_parse_message()] | Received user message 'Yes' with intent '{'name': 'smalltalk_confirmation_yes', 'confidence': 0.954254686832428}' and entities '[]'
rasa.core.processor | DEBUG | | [processor.py:507-_handle_message_with_tracker()] | Logged UserUtterance - tracker now has 14 events.
rasa.core.featurizers | DEBUG | | [featurizers.py:121-encode()] | Feature 'intent_smalltalk_confirmation_yes' (value: '1.0') could not be found in feature map. Make sure you added all intents and entities to the domain
rasa.core.policies.memoization | DEBUG | | [memoization.py:195-predict_action_probabilities()] | Current tracker state [None, None, {'slot_sys_dialog_interaction_state_1': 1.0}, {'intent_new_trash_can': 1.0, 'slot_sys_dialog_interaction_state_1': 1.0, 'prev_action_listen': 1.0, 'entity_trash_can_type_entity': 1.0}, {'slot_sys_dialog_interaction_state_12': 1.0, 'prev_form_action_new_trash_can': 1.0, 'intent_new_trash_can': 1.0, 'active_form_form_action_new_trash_can': 1.0, 'entity_trash_can_type_entity': 1.0}, {'slot_sys_dialog_interaction_state_12': 1.0, 'intent_smalltalk_confirmation_yes': 1.0, 'prev_action_listen': 1.0, 'active_form_form_action_new_trash_can': 1.0}]
rasa.core.policies.memoization | DEBUG | | [memoization.py:299-_recall_using_delorean()] | Launch DeLorean...
rasa.core.policies.memoization | DEBUG | | [memoization.py:319-_recall_using_delorean()] | Current tracker state [None, None, None, None, {'slot_sys_dialog_interaction_state_1': 1.0}, {'intent_smalltalk_confirmation_yes': 1.0, 'slot_sys_dialog_interaction_state_1': 1.0, 'prev_action_listen': 1.0}]
rasa.core.policies.memoization | DEBUG | | [memoization.py:211-predict_action_probabilities()] | There is no memorised next action
rasa.core.policies.fallback | DEBUG | | [fallback.py:171-predict_action_probabilities()] | NLU confidence threshold met, confidence of fallback action set to core threshold (0.35).
rasa.core.policies.form_policy | DEBUG | | [form_policy.py:147-predict_action_probabilities()] | There is an active form 'form_action_new_trash_can'
rasa.core.policies.ensemble | DEBUG | | [ensemble.py:538-probabilities_using_best_policy()] | Predicted next action using policy_3_FormPolicy
rasa.core.processor | DEBUG | | [processor.py:308-predict_next_action()] | Predicted next action 'form_action_new_trash_can' with confidence 1.00.
rasa.core.actions.action | DEBUG | | [action.py:546-run()] | Calling action endpoint to run action 'form_action_new_trash_can'.
rasa.core.processor | DEBUG | | [processor.py:711-_log_action_on_tracker()] | Action 'form_action_new_trash_can' ended with events '[<rasa.core.events.SlotSet object at 0x7f04200cca90>, <rasa.core.events.SlotSet object at 0x7f03d2aef550>, <rasa.core.events.SlotSet object at 0x7f03d2aeff50>]'.