I have a question about the TwoStageFallbackPolicy: I used the Rasa demo as a template for the defaultAskAffirmation action: rasa-demo/actions.py at master · RasaHQ/rasa-demo · GitHub, and extracted present entities in the user message to tailor button titles and payloads.
When the NLU does not reach the treshold, the buttons are correctly filled, but upon selecting a button, my fallback bot utterance gets triggered. I assume this happens in the ‘action_revert_fallback’, where UserUttered is filled with my button payload, but seems to get reverted afterwards? How to prevent this behaviour, do I need to override action_revert_fallback?
Action 'action_default_ask_affirmation' ended with events '[]'
Bot utterance 'BotUttered(text: Sorry, I'm not sure I've understood you correctly. Do you mean ... , data: {
"elements": null,
"buttons": [
{
"payload": "/get_help{\"course\": \"programming\"}",
"title": "I want to get in touch with the helpdesk."
},
{
"payload": "/get_description{\"course\": \"programming\"}",
"title": "What is programming about?"
},
{
"payload": "/affirm{\"course\": \"programming\"}",
"title": "Agreed."
},
{
"payload": "/out_of_scope",
"title": "Something else"
}
],
"attachment": null
})'
Current tracker state [None, None, None, None, None, None, None, {}, {'intent_get_help': 1.0, 'prev_action_listen': 1.0, 'slot_course_0': 1.0, 'entity_course': 1.0}, {'intent_get_help': 1.0, 'prev_action_default_ask_affirmation': 1.0, 'slot_course_0': 1.0, 'entity_course': 1.0}]
There is no memorised next action
There is no active form
Predicted next action using policy_1_TwoStageFallbackPolicy
Predicted next action 'action_listen' with prob 1.00.
Action 'action_listen' ended with events '[]'
Recreating tracker for id 'default'
Received user message '/get_description{"course":"programming"}' with intent '{'name': 'get_description', 'confidence': 1.0}' and entities '[{'entity': 'course', 'start': 16, 'end': 40, 'value': 'programming'}]'
Logged UserUtterance - tracker now has 18 events
Current slot values:
booking-type: None
booking_confirmed: None
cancellation_confirmed: None
categories: None
course: programming
date: None
date-period: None
dates: None
display-option: None
employee_id: None
given-name: None
last-name: None
location: None
locations: None
other_date: None
other_location: None
requested_slot: None
seminar_id: None
time: None
title: None
user-level: None
user_verified: None
User 'default' affirmed intent 'get_description'
Current tracker state [None, None, None, None, None, None, {}, {'intent_get_help': 1.0, 'prev_action_listen': 1.0, 'slot_course_0': 1.0, 'entity_course': 1.0}, {'intent_get_help': 1.0, 'prev_action_default_ask_affirmation': 1.0, 'slot_course_0': 1.0, 'entity_course': 1.0}, {'prev_action_listen': 1.0, 'slot_course_0': 1.0, 'intent_get_description': 1.0, 'entity_course': 1.0}]
There is no memorised next action
There is no active form
Predicted next action using policy_1_TwoStageFallbackPolicy
Predicted next action 'action_revert_fallback_events' with prob 1.00.
Action 'action_revert_fallback_events' ended with events '['UserUtteranceReverted()', 'UserUtteranceReverted()', 'ActionExecuted(action: action_listen, policy: None, confidence: None)', 'UserUttered(text: /get_description{"course":"programming"}, intent: {\'name\': \'get_description\', \'confidence\': 1.2}, entities: [{\'entity\': \'course\', \'start\': 16, \'end\': 40, \'value\': \'programming\'}])']'
Current tracker state [None, None, None, None, None, None, None, None, {}, {'prev_action_listen': 1.0, 'intent_get_description': 1.0, 'entity_course': 1.0}]
There is no memorised next action
There is no active form
Predicted next action using policy_0_EmbeddingPolicy
Predicted next action 'action_provide_description' with prob 0.50.
Calling action endpoint to run action 'action_provide_description'.
Action 'action_provide_description' ended with events '[]'
Bot utterance 'BotUttered(text: You need to specify a course for your request, data: {