Stories are not working at all

Hello,

I have created a chatbot and the stories from interactive mode. I added at least 20 stories (it is the same since it is a questionnaire). At start it was working, then after the second question it didn’t procceed. I erases all stories and I create new ones through interactive mode again. And now it doesn’t proceed after greet intent.

I train it like this:

rasa train -c config.yml -d domain.yml --data data/

Here is my config file:

 language: "en"

pipeline:
 - name: "SpacyNLP"
 - name: "SpacyTokenizer"
- name: "RegexFeaturizer"
- name: "SpacyFeaturizer"
- name: "CRFEntityExtractor"
- name: "EntitySynonymMapper"
- name: "SklearnIntentClassifier"
- name: "DucklingHTTPExtractor"
  # url of the running duckling server
  url: "http://localhost:8000"
  # dimensions to extract
  dimensions: ["amount-of-money", "distance", "duration", "email", "number", "ordinal", "phone-number",         "quantity", "temperature", "time", "unit", "unit-of-duration", "url", "volume"]
  # allows you to configure the locale, by default the language is
  # used
  locale: "en_EN"
  # if not set the default timezone of Duckling is going to be used
  # needed to calculate dates from relative expressions like "tomorrow"
  timezone: "Europe/Athens"
policies:
  - name: MemoizationPolicy
    max_history: 6
  - name: KerasPolicy
    epochs: 50
    max_history: 6
  - name: FallbackPolicy
    nlu_threshold: 0.8
    core_threshold: 0.3

And an example of my stories:

## happy path
* greet
  - utter_greet
 * mood_great
   - utter_happy

## Generated Story 345208213390230114
* greet
    - utter_greet
* affirm{"affirm": "yes"}
    - slot{"affirm": "yes"}
    - utter_question1
* ask_question{"answer": "quite a bit"}
    - slot{"answer": "quite a bit"}
    - action_store_response2
    - slot{"response2": "quite a bit"}
* ask_question{"answer": "quite a bit"}
    - slot{"answer": "quite a bit"}
    - action_store_response3
    - slot{"response3": "quite a bit"}
* ask_question{"answer": "not at all"}
   - slot{"answer": "not at all"}
   - action_store_response4
   - slot{"response4": "not at all"}
* ask_question{"answer": "not at all"}
    - slot{"answer": "not at all"}
    - action_store_response5
    - slot{"response5": "not at all"}
* ask_question{"answer": "quite a bit"}
    - slot{"answer": "quite a bit"}
    - action_store_response6
    - slot{"response6": "quite a bit"}
* ask_question{"answer": "very much"}
    - slot{"answer": "very much"}
    - action_store_response7
    - slot{"response7": "very much"}

Finally I run the server through a webpage like this:

 python3 -m rasa_core_sdk.endpoint --actions actions --port 8005 &
 python3 -m rasa run -m ./models --endpoints endpoints.yml --port 8890 --log-file new_log.log -vv --enable-api --debug

and the error i get is:

   rasa.core.policies.memoization  - Current tracker state [None, None, None, {}, {'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'prev_utter_greet': 1.0, 'intent_greet': 1.0}]
 2019-07-04 12:43:59 DEBUG    rasa.core.policies.memoization  - There is a memorised next action '0'
 2019-07-04 12:43:59 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.8).
 2019-07-04 12:43:59 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_0_MemoizationPolicy
 2019-07-04 12:43:59 DEBUG    rasa.core.processor  - Predicted next action 'action_listen' with confidence 1.00.
 2019-07-04 12:43:59 DEBUG    rasa.core.processor  - Action 'action_listen' ended with events '[]'
 2019-07-04 12:43:59 DEBUG    rasa.core.agent  - Deleted lock for conversation '755c4338-a5e0-4637-ab4a-a953a136206d' (unused)

Thank you

Can you post an example of how the whole conversation is going? Maybe the full logs? At this step the tracker history looks strange. it’s possible your webpage isn’t sending the correct information. Do you have the same problem in rasa shell?

Also, if you are using rasa run, it means you’re on rasa — you should be using rasa_sdk, not rasa_core_sdk.

I changed the rasa_core_sdk to rasa_sdk. I believe my webpage is sending the information correctly because some days before I could speak until question 10. Then I added more questions and stopped working. I checked rasa shell and it keeps repeating answer 4.

These are the last logs before crashing when I using webpage and an example:

2019-07-05 09:28:48 INFO     root  - Starting Rasa Core server on http://localhost:8890
2019-07-05 09:28:48 INFO     root  - Enabling coroutine debugging. Loop id 80515416.
2019-07-05 09:28:48 DEBUG    rasa.model  - Extracted model to '/tmp/tmp9kca0hl7'.
2019-07-05 09:28:52 INFO     rasa.nlu.components  - Added 'SpacyNLP' to component cache. Key 'SpacyNLP-en'.
2019-07-05 09:28:52 DEBUG    rasa.model  - Extracted model to '/tmp/tmplrct6exf'.
2019-07-05 09:30:26 DEBUG    rasa.core.agent  - Created a new lock for conversation 'cea224a7-9801-4e9a-b5e9-6d858bb641da'
2019-07-05 09:30:26 DEBUG    rasa.core.tracker_store  - Creating a new tracker for id 'cea224a7-9801-4e9a-b5e9-6d858bb641da'.
2019-07-05 09:30:26 DEBUG    rasa.core.processor  - Received user message 'hi' with intent '{'name': 'greet', 'confidence': 0.9277166001716511}' and entities '[]'
2019-07-05 09:30:26 DEBUG    rasa.core.processor  - Logged UserUtterance - tracker now has 2 events
2019-07-05 09:30:26 DEBUG    rasa.core.policies.memoization  - Current tracker state [None, None, None, None, {}, {'prev_action_listen': 1.0, 'intent_greet': 1.0}]
2019-07-05 09:30:26 DEBUG    rasa.core.policies.memoization  - There is a memorised next action '43'
2019-07-05 09:30:26 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-07-05 09:30:26 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_0_MemoizationPolicy
2019-07-05 09:30:26 DEBUG    rasa.core.processor  - Predicted next action 'utter_greet' with confidence 1.00.
2019-07-05 09:30:26 DEBUG    rasa.core.processor  - Action 'utter_greet' ended with events '['BotUttered(text: Hey! I would like to ask you some questions!Are you ready?, data: {"elements": null, "quick_replies": null, "buttons": [{"payload": "/affirm{\\"affirm\\": \\"yes\\"}", "title": "Yes"}, {"payload": "/deny{\\"deny\\": \\"no\\"}", "title": "No"}], "attachment": null, "image": null, "custom": null}, metadata: {})']'
2019-07-05 09:30:26 DEBUG    rasa.core.policies.memoization  - Current tracker state [None, None, None, {}, {'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'intent_greet': 1.0, 'prev_utter_greet': 1.0}]
2019-07-05 09:30:26 DEBUG    rasa.core.policies.memoization  - There is a memorised next action '0'
2019-07-05 09:30:26 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-07-05 09:30:26 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_0_MemoizationPolicy
2019-07-05 09:30:26 DEBUG    rasa.core.processor  - Predicted next action 'action_listen' with confidence 1.00.
2019-07-05 09:30:26 DEBUG    rasa.core.processor  - Action 'action_listen' ended with events '[]'
2019-07-05 09:30:26 DEBUG    rasa.core.agent  - Deleted lock for conversation 'cea224a7-9801-4e9a-b5e9-6d858bb641da' (unused)
2019-07-05 09:30:28 DEBUG    rasa.core.agent  - Created a new lock for conversation 'cea224a7-9801-4e9a-b5e9-6d858bb641da'
2019-07-05 09:30:28 DEBUG    rasa.core.tracker_store  - Recreating tracker for id 'cea224a7-9801-4e9a-b5e9-6d858bb641da'
2019-07-05 09:30:28 DEBUG    rasa.core.processor  - Received user message 'Yes' with intent '{'name': 'affirm', 'confidence': 0.9076192753443898}' and entities '[]'
2019-07-05 09:30:28 DEBUG    rasa.core.processor  - Logged UserUtterance - tracker now has 6 events
2019-07-05 09:30:28 DEBUG    rasa.core.policies.memoization  - Current tracker state [None, None, {}, {'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'intent_greet': 1.0, 'prev_utter_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_affirm': 1.0}]
2019-07-05 09:30:28 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2019-07-05 09:30:28 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-07-05 09:30:28 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_1_KerasPolicy
2019-07-05 09:30:28 DEBUG    rasa.core.processor  - Predicted next action 'utter_question1' with confidence 0.42.
2019-07-05 09:30:28 DEBUG    rasa.core.processor  - Action 'utter_question1' ended with events '['BotUttered(text: Do you have any trouble doing strenuous activities, like carrying a heavy shopping bag or suitcase?, data: {"elements": null, "quick_replies": null, "buttons": [{"payload": "/ask_question{\\"answer\\": \\"not at all\\"}", "title": "Not at all"}, {"payload": "/ask_question{\\"answer\\": \\"a little\\"}", "title": "A little"}, {"payload": "/ask_question{\\"answer\\": \\"quite a bit\\"}", "title": "Quite a bit"}, {"payload": "/ask_question{\\"answer\\": \\"very much\\"}", "title": "Very much"}], "attachment": null, "image": null, "custom": null}, metadata: {})']'
2019-07-05 09:30:28 DEBUG    rasa.core.policies.memoization  - Current tracker state [None, {}, {'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'intent_greet': 1.0, 'prev_utter_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_affirm': 1.0}, {'prev_utter_question1': 1.0, 'intent_affirm': 1.0}]
2019-07-05 09:30:28 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2019-07-05 09:30:28 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-07-05 09:30:28 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_1_KerasPolicy
2019-07-05 09:30:28 DEBUG    rasa.core.processor  - Predicted next action 'action_listen' with confidence 0.96.
2019-07-05 09:30:28 DEBUG    rasa.core.processor  - Action 'action_listen' ended with events '[]'
2019-07-05 09:30:28 DEBUG    rasa.core.agent  - Deleted lock for conversation 'cea224a7-9801-4e9a-b5e9-6d858bb641da' (unused)
2019-07-05 09:30:30 DEBUG    rasa.core.agent  - Created a new lock for conversation 'cea224a7-9801-4e9a-b5e9-6d858bb641da'
2019-07-05 09:30:30 DEBUG    rasa.core.tracker_store  - Recreating tracker for id 'cea224a7-9801-4e9a-b5e9-6d858bb641da'
2019-07-05 09:30:30 DEBUG    rasa.core.processor  - Received user message 'Not at all' with intent '{'name': 'ask_question', 'confidence': 0.9563834879370218}' and entities '[{'start': 0, 'end': 10, 'value': 'not at all', 'entity': 'answer', 'confidence': 0.9958939689555446, 'extractor': 'CRFEntityExtractor'}]'
2019-07-05 09:30:30 DEBUG    rasa.core.processor  - Current slot values:
        affirm: None
        answer: not at all
        deny: None
        response1: None
        response10: None
        response11: None
        response12: None
        response13: None
        response14: None
        response15: None
        response16: None
        response17: None
        response18: None
        response19: None
        response2: None
        response20: None
        response21: None
        response22: None
        response23: None
        response24: None
        response25: None
        response26: None
        response27: None
        response28: None
        response29: None
        response3: None
        response30: None
        response4: None
        response5: None
        response6: None
        response7: None
        response8: None
        response9: None
        symptoms: None
2019-07-05 09:30:30 DEBUG    rasa.core.processor  - Logged UserUtterance - tracker now has 11 events
2019-07-05 09:30:30 DEBUG    rasa.core.policies.memoization  - Current tracker state [{}, {'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'intent_greet': 1.0, 'prev_utter_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_affirm': 1.0}, {'prev_utter_question1': 1.0, 'intent_affirm': 1.0}, {'prev_action_listen': 1.0, 'slot_answer_0': 1.0, 'intent_ask_question': 1.0, 'entity_answer': 1.0}]
2019-07-05 09:30:30 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2019-07-05 09:30:30 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-07-05 09:30:30 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_1_KerasPolicy
2019-07-05 09:30:30 DEBUG    rasa.core.processor  - Predicted next action 'action_store_response2' with confidence 0.61.
2019-07-05 09:30:30 DEBUG    rasa.core.actions.action  - Calling action endpoint to run action 'action_store_response2'.
127.0.0.1 - - [2019-07-05 09:30:30] "POST /webhook HTTP/1.1" 200 273 0.005297
2019-07-05 09:30:30 DEBUG    rasa.core.processor  - Action 'action_store_response2' ended with events '['BotUttered(text: Do you have any trouble taking a SHORT walk?, data: {"elements": null, "quick_replies": null, "buttons": [{"payload": "/ask_question{\\"answer\\": \\"not at all\\"}", "title": "Not at all"}, {"payload": "/ask_question{\\"answer\\": \\"a little\\"}", "title": "A little"}, {"payload": "/ask_question{\\"answer\\": \\"quite a bit\\"}", "title": "Quite a bit"}, {"payload": "/ask_question{\\"answer\\": \\"very much\\"}", "title": "Very much"}], "attachment": null, "image": null, "custom": null}, metadata: {})', 'SlotSet(key: response2, value: not at all)']'
2019-07-05 09:30:30 DEBUG    rasa.core.processor  - Current slot values:
        affirm: None
        answer: not at all
        deny: None
        response1: None
        response10: None
        response11: None
        response12: None
        response13: None
        response14: None
        response15: None
        response16: None
        response17: None
        response18: None
        response19: None
        response2: not at all
        response20: None
        response21: None
        response22: None
        response23: None
        response24: None
        response25: None
        response26: None
        response27: None
        response28: None
        response29: None
        response3: None
        response30: None
        response4: None
        response5: None
        response6: None
        response7: None
        response8: None
        response9: None
        symptoms: None
2019-07-05 09:30:30 DEBUG    rasa.core.policies.memoization  - Current tracker state [{'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'intent_greet': 1.0, 'prev_utter_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_affirm': 1.0}, {'prev_utter_question1': 1.0, 'intent_affirm': 1.0}, {'prev_action_listen': 1.0, 'slot_answer_0': 1.0, 'intent_ask_question': 1.0, 'entity_answer': 1.0}, {'slot_answer_0': 1.0, 'prev_action_store_response2': 1.0, 'intent_ask_question': 1.0, 'slot_response2_0': 1.0, 'entity_answer': 1.0}]
2019-07-05 09:30:30 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2019-07-05 09:30:30 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-07-05 09:30:30 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_1_KerasPolicy
2019-07-05 09:30:30 DEBUG    rasa.core.processor  - Predicted next action 'action_listen' with confidence 0.96.
2019-07-05 09:30:30 DEBUG    rasa.core.processor  - Action 'action_listen' ended with events '[]'
2019-07-05 09:30:30 DEBUG    rasa.core.agent  - Deleted lock for conversation 'cea224a7-9801-4e9a-b5e9-6d858bb641da' (unused)
2019-07-05 09:30:32 DEBUG    rasa.core.agent  - Created a new lock for conversation 'cea224a7-9801-4e9a-b5e9-6d858bb641da'
2019-07-05 09:30:32 DEBUG    rasa.core.tracker_store  - Recreating tracker for id 'cea224a7-9801-4e9a-b5e9-6d858bb641da'
2019-07-05 09:30:32 DEBUG    rasa.core.processor  - Received user message 'Not at all' with intent '{'name': 'ask_question', 'confidence': 0.9563834879370218}' and entities '[{'start': 0, 'end': 10, 'value': 'not at all', 'entity': 'answer', 'confidence': 0.9958939689555446, 'extractor': 'CRFEntityExtractor'}]'
2019-07-05 09:30:32 DEBUG    rasa.core.processor  - Current slot values:
        affirm: None
        answer: not at all
        deny: None
        response1: None
        response10: None
        response11: None
        response12: None
        response13: None
        response14: None
        response15: None
        response16: None
        response17: None
        response18: None
        response19: None
        response2: not at all
        response20: None
        response21: None
        response22: None
        response23: None
        response24: None
        response25: None
        response26: None
        response27: None
        response28: None
        response29: None
        response3: None
        response30: None
        response4: None
        response5: None
        response6: None
        response7: None
        response8: None
        response9: None
        symptoms: None
2019-07-05 09:30:32 DEBUG    rasa.core.processor  - Logged UserUtterance - tracker now has 17 events
2019-07-05 09:30:32 DEBUG    rasa.core.policies.memoization  - Current tracker state [{'intent_greet': 1.0, 'prev_utter_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_affirm': 1.0}, {'prev_utter_question1': 1.0, 'intent_affirm': 1.0}, {'prev_action_listen': 1.0, 'slot_answer_0': 1.0, 'intent_ask_question': 1.0, 'entity_answer': 1.0}, {'slot_answer_0': 1.0, 'prev_action_store_response2': 1.0, 'intent_ask_question': 1.0, 'slot_response2_0': 1.0, 'entity_answer': 1.0}, {'prev_action_listen': 1.0, 'slot_answer_0': 1.0, 'intent_ask_question': 1.0, 'slot_response2_0': 1.0, 'entity_answer': 1.0}]
2019-07-05 09:30:32 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2019-07-05 09:30:32 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-07-05 09:30:32 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_2_FallbackPolicy
2019-07-05 09:30:32 DEBUG    rasa.core.processor  - Predicted next action 'action_default_fallback' with confidence 0.30.
2019-07-05 09:30:32 DEBUG    rasa.core.processor  - Action 'action_default_fallback' ended with events '['UserUtteranceReverted()']'
2019-07-05 09:30:32 DEBUG    rasa.core.processor  - Current slot values:
        affirm: None
        answer: not at all
        deny: None
        response1: None
        response10: None
        response11: None
        response12: None
        response13: None
        response14: None
        response15: None
        response16: None
        response17: None
        response18: None
        response19: None
        response2: not at all
        response20: None
        response21: None
        response22: None
        response23: None
        response24: None
        response25: None
        response26: None
        response27: None
        response28: None
        response29: None
        response3: None
        response30: None
        response4: None
        response5: None
        response6: None
        response7: None
        response8: None
        response9: None
        symptoms: None
2019-07-05 09:30:32 DEBUG    rasa.core.policies.memoization  - Current tracker state [{'prev_action_listen': 1.0, 'intent_greet': 1.0}, {'intent_greet': 1.0, 'prev_utter_greet': 1.0}, {'prev_action_listen': 1.0, 'intent_affirm': 1.0}, {'prev_utter_question1': 1.0, 'intent_affirm': 1.0}, {'prev_action_listen': 1.0, 'slot_answer_0': 1.0, 'intent_ask_question': 1.0, 'entity_answer': 1.0}, {'slot_answer_0': 1.0, 'prev_action_store_response2': 1.0, 'intent_ask_question': 1.0, 'slot_response2_0': 1.0, 'entity_answer': 1.0}]
2019-07-05 09:30:32 DEBUG    rasa.core.policies.memoization  - There is no memorised next action
2019-07-05 09:30:32 DEBUG    rasa.core.policies.fallback  - NLU confidence threshold met, confidence of fallback action set to core threshold (0.3).
2019-07-05 09:30:32 DEBUG    rasa.core.policies.ensemble  - Predicted next action using policy_1_KerasPolicy
2019-07-05 09:30:32 DEBUG    rasa.core.processor  - Predicted next action 'action_listen' with confidence 0.96.
2019-07-05 09:30:32 DEBUG    rasa.core.processor  - Action 'action_listen' ended with events '[]'
2019-07-05 09:30:32 DEBUG    rasa.core.agent  - Deleted lock for conversation 'cea224a7-9801-4e9a-b5e9-6d858bb641da' (unused)

thank you

@chatz I wouldn’t define my stories like that. I think you’re really over-using slots. Slots are to store key info in the convo. Instead, you want to define an intent “affirm”, which consists of many examples like ‘very much so’, ‘yes’, ‘a little’, etc, and and intent “deny”, which consists of many examples like ‘no’, ‘no, not at all’, etc.

Then, you define your stories based on the intents recognised. That would be a much better and cleaner approach, and I think it would solve your problem.

Happy coding!

Ali.

@chatz Also, I don’t think you need that many pipelines.

Hi. I am facing similar issue. How did u solve it?

Hello, I don’t remember exactly since it is a year ago. But for sure I didn’t use all these pipelines and changed the way I was using slots. So for example I created more general slots as erohmensing described. I think it didn’t work because I was overusing slots so it couldn’t decide how to proceed. So I removed response1, response2, response3 etc and I created a more general slot for example “question_answered”.

Hope that helps