How can I begin my story with an intent that begins a form?
This is how I posit it in my stories.md, however, it never fills the correct slot and begins the form with this story:
## firstReportCount
* inform_vehicleCount
- count_episode
- form{"name": "count_episode"}
- slot{"requested_slot": "vehicleCount"}
- slot{"vehicleCount": "9"}
- utter_hello
- slot{"vehicleCount": "9"}
- slot{"requested_slot": "peopleCount"}
* form: inform{"number": "3"}
- slot{"vehicleCount": "9"}
- slot{"peopleCount": "3"}
- form: count_episode
- slot{"vehicleCount": "9"}
- slot{"peopleCount": "3"}
- slot{"requested_slot": "partyVehics"}
* form: inform{"number": "six"}
- slot{"vehicleCount": "9"}
- slot{"peopleCount": "3"}
- slot{"partyVehics":"6"}
- form: count_episode
- slot{"vehicleCount": "9"}
- slot{"peopleCount": "3"}
- slot{"partyVehics":"6"}
- slot{"requested_slot": "trailVisits"}
* form: inform{"number": "2"}
- slot{"vehicleCount": "9"}
- slot{"peopleCount": "3"}
- slot{"partyVehics":"6"}
- slot{"trailVisits": "2"}
- form{"name": null}
- slot{"requested_slot": null}
- utter_goodbye
Even if the intent of my first utterance is correctly identified off the first utterance, it prompts for default_fallback, which I affirm. However, then the bot simply stops, with the form “count_episode” never being initialized at all:
Bot loaded. Type a message and press enter (use '/stop' to exit):
2
2019-01-27 13:10:48 DEBUG rasa_core.tracker_store - Creating a new tracker for id 'default'.
2019-01-27 13:10:48 DEBUG rasa_core.processor - Received user message '2' with intent '{'name': 'inform_vehicleCount', 'confidence': 0.5854668617248535}' and entities '[{'start': 0, 'end': 1, 'value': '2', 'entity': 'number', 'confidence': 0.9959514824179376, 'extractor': 'ner_crf'}, {'start': 0, 'end': 1, 'text': '2', 'value': 2, 'confidence': 1.0, 'additional_info': {'value': 2, 'type': 'value'}, 'entity': 'number', 'extractor': 'ner_duckling_http'}]'
2019-01-27 13:10:48 DEBUG rasa_core.processor - Logged UserUtterance - tracker now has 2 events
2019-01-27 13:10:48 DEBUG rasa_core.processor - Current slot values:
age: None
can_use_spacy: None
countTime: None
current_api: None
data_stored: None
entity_extractor: None
feedback_message: None
feedback_value: None
language: None
name: None
nlu_part: None
onboarding: None
package_manager: None
partyVehics: None
peopleCount: None
problem_description: None
product: None
requested_slot: None
returnStatus: None
search_results: None
shown_privacy: None
source: None
step: None
suggestion: None
trailVisits: None
unknown_nlu_part: None
unknown_product: None
vehicleCount: None
yearBorn: None
zipCode: None
2019-01-27 13:10:48 DEBUG rasa_core.policies.memoization - Current tracker state [None, None, None, None, None, None, {}, {'intent_inform_vehicleCount': 1.0, 'prev_action_listen': 1.0, 'entity_number': 1.0}]
2019-01-27 13:10:48 DEBUG rasa_core.policies.memoization - There is no memorised next action
2019-01-27 13:10:48 DEBUG rasa_core.policies.two_stage_fallback - User 'default' has to affirm intent 'inform_vehicleCount'.
2019-01-27 13:10:48 DEBUG rasa_core.policies.form_policy - There is no active form
2019-01-27 13:10:48 DEBUG rasa_core.policies.ensemble - Predicted next action using policy_2_TwoStageFallbackPolicy
2019-01-27 13:10:48 DEBUG rasa_core.processor - Predicted next action 'action_default_ask_affirmation' with prob 1.00.
2019-01-27 13:10:48 DEBUG rasa_core.processor - Action 'action_default_ask_affirmation' ended with events '[]'
2019-01-27 13:10:48 DEBUG rasa_core.processor - Bot utterance 'BotUttered(text: Did you mean 'inform_vehicleCount'?, data: {
"buttons": [
{
"title": "Yes",
"payload": "/affirm"
},
{
"title": "No",
"payload": "/deny"
}
]
})'
Did you mean 'inform_vehicleCount'?
Buttons:
1: Yes (/affirm)
Buttons:
2: No (/deny)
2019-01-27 13:10:49 DEBUG rasa_core.policies.memoization - Current tracker state [None, None, None, None, None, {}, {'intent_inform_vehicleCount': 1.0, 'prev_action_listen': 1.0, 'entity_number': 1.0}, {'intent_inform_vehicleCount': 1.0, 'prev_action_default_ask_affirmation': 1.0, 'entity_number': 1.0}]
2019-01-27 13:10:49 DEBUG rasa_core.policies.memoization - There is no memorised next action
2019-01-27 13:10:49 DEBUG rasa_core.policies.form_policy - There is no active form
2019-01-27 13:10:49 DEBUG rasa_core.policies.ensemble - Predicted next action using policy_2_TwoStageFallbackPolicy
2019-01-27 13:10:49 DEBUG rasa_core.processor - Predicted next action 'action_listen' with prob 1.00.
2019-01-27 13:10:49 DEBUG rasa_core.processor - Action 'action_listen' ended with events '[]'
127.0.0.1 - - [2019-01-27 13:10:49] "POST /webhooks/rest/webhook?stream=true&token= HTTP/1.1" 200 293 0.247089
1
2019-01-27 13:11:06 DEBUG rasa_core.tracker_store - Recreating tracker for id 'default'
2019-01-27 13:11:06 DEBUG rasa_core.processor - Received user message '1' with intent '{'name': 'inform_vehicleCount', 'confidence': 0.5854668617248535}' and entities '[{'start': 0, 'end': 1, 'value': '1', 'entity': 'number', 'confidence': 0.99130678024477, 'extractor': 'ner_crf'}, {'start': 0, 'end': 1, 'text': '1', 'value': 1, 'confidence': 1.0, 'additional_info': {'value': 1, 'type': 'value'}, 'entity': 'number', 'extractor': 'ner_duckling_http'}]'
2019-01-27 13:11:06 DEBUG rasa_core.processor - Logged UserUtterance - tracker now has 6 events
2019-01-27 13:11:06 DEBUG rasa_core.processor - Current slot values:
age: None
can_use_spacy: None
countTime: None
current_api: None
data_stored: None
entity_extractor: None
feedback_message: None
feedback_value: None
language: None
name: None
nlu_part: None
onboarding: None
package_manager: None
partyVehics: None
peopleCount: None
problem_description: None
product: None
requested_slot: None
returnStatus: None
search_results: None
shown_privacy: None
source: None
step: None
suggestion: None
trailVisits: None
unknown_nlu_part: None
unknown_product: None
vehicleCount: None
yearBorn: None
zipCode: None
2019-01-27 13:11:06 DEBUG rasa_core.policies.memoization - Current tracker state [None, None, None, None, {}, {'intent_inform_vehicleCount': 1.0, 'prev_action_listen': 1.0, 'entity_number': 1.0}, {'intent_inform_vehicleCount': 1.0, 'prev_action_default_ask_affirmation': 1.0, 'entity_number': 1.0}, {'intent_inform_vehicleCount': 1.0, 'prev_action_listen': 1.0, 'entity_number': 1.0}]
2019-01-27 13:11:06 DEBUG rasa_core.policies.memoization - There is no memorised next action
2019-01-27 13:11:06 DEBUG rasa_core.policies.form_policy - There is no active form
2019-01-27 13:11:06 DEBUG rasa_core.policies.ensemble - Predicted next action using policy_2_TwoStageFallbackPolicy
2019-01-27 13:11:06 DEBUG rasa_core.processor - Predicted next action 'action_default_fallback' with prob 1.00.
2019-01-27 13:11:06 DEBUG rasa_core.processor - Action 'action_default_fallback' ended with events '['UserUtteranceReverted()']'
2019-01-27 13:11:06 DEBUG rasa_core.policies.memoization - Current tracker state [None, None, None, None, None, {}, {'intent_inform_vehicleCount': 1.0, 'prev_action_listen': 1.0, 'entity_number': 1.0}, {'intent_inform_vehicleCount': 1.0, 'prev_action_default_ask_affirmation': 1.0, 'entity_number': 1.0}]
2019-01-27 13:11:06 DEBUG rasa_core.policies.memoization - There is no memorised next action
2019-01-27 13:11:06 DEBUG rasa_core.policies.form_policy - There is no active form
2019-01-27 13:11:06 DEBUG rasa_core.policies.ensemble - Predicted next action using policy_2_TwoStageFallbackPolicy
2019-01-27 13:11:06 DEBUG rasa_core.processor - Predicted next action 'action_listen' with prob 1.00.
2019-01-27 13:11:06 DEBUG rasa_core.processor - Action 'action_listen' ended with events '[]'
127.0.0.1 - - [2019-01-27 13:11:06] "POST /webhooks/rest/webhook?stream=true&token= HTTP/1.1" 200 122 0.030831
The second problem is that this behavior extends to interactive mode, where it seems any triggering of “action_default_ask_affirmation” seems to derail the flow of the chat. How do I disable “action_default_ask_affirmation” in interactive mode? For example, here is a log of me trying to train a story that the first utterance from the user is to fill a slot:
# Bot You
────────────────────────────────────
1 action_listen
Current slots:
age: None, can_use_spacy: None, countTime: None, current_api: None, data_stored: None, entity_extractor: None, feedback_message: None, feedback_value: None, language: None, name: None, nlu_part: None, onboarding: None, package_manager: None, partyVehics: None, peopleCount: None, problem_description: None, product: None, requested_slot: None, returnStatus: None, search_results: None, shown_privacy: None, source: None, step: None, suggestion: None, trailVisits: None, unknown_nlu_part: None, unknown_product: None, vehicleCount: None, yearBorn: None, zipCode: None
------
? Next user input (Ctr-c to abort): 2
? Is the NLU classification for '[2](number)[2](number:2)' with intent 'inform_vehicleCount' correct? Yes
------
Chat History
# Bot You
──────────────────────────────────────────────────────────
1 action_listen
──────────────────────────────────────────────────────────
2 [2](number)[2](number:2)
intent: inform_vehicleCount 0.59
Current slots:
age: None, can_use_spacy: None, countTime: None, current_api: None, data_stored: None, entity_extractor: None, feedback_message: None, feedback_value: None, language: None, name: None, nlu_part: None, onboarding: None, package_manager: None, partyVehics: None, peopleCount: None, problem_description: None, product: None, requested_slot: None, returnStatus: None, search_results: None, shown_privacy: None, source: None, step: None, suggestion: None, trailVisits: None, unknown_nlu_part: None, unknown_product: None, vehicleCount: None, yearBorn: None, zipCode: None
------
? The bot wants to run 'action_default_ask_affirmation', correct? (Y/n)
N
____
Then it asks me what intent, with all intents besides action_default_ask_affirmation as 0 probability.
Can somehow please give guidance as to how to resolve this?