How to create stories independent of order


I’ve been going through the tutorial, and some other resources found by Googling, and put together a test project with Rasa. It works fine, and I can test it getting replies to questions as stated in the stories.

But here’s my question: From what I could see, I could only get it to work if I put the questions in exactly the order of the Stories. But how will that ever work? I can’t see how I would ever know the order of questions a user would ask, so if the bot only works if the questions are asked in exactly the order of a story, I would have to write an infinite number of stories… I must be missing something!

Say I have intents (questions) and utterances (responses) like this:

  • importcontent
  • utter_import
  • addusers
  • utter_addusers

There would be hundreds or thousands of such questions and answer in a finished bot. And I have no idea what order a user might ask the questions. But when I can’t see how to make the bot answer unless I ask them in the exact order of the story, then I don’t know how to make this work…

So I was thinking, what if I actually need to create a short story for every possible question. Seems strange, but I tried.

However, that failed too, because when a story ends, there’s no way (that I can see) to continue the chat. I.e even if I ask something else from another story, it’s just dead after the end of one story.

Again, I think I must be missing something, have just started to look at Rasa. But I would really appreciate any insight into how to make the bot answer questions regardless of the order of the questions.



I am having a similar issue trying to build a variable length list where different intents add a different type of item to a list. I thought checkpoints might support that but it does not seem so unless I am doing something wrong. Now I am thinking the answer might be related to Policies since it is all about picking the next action. I have a hunch memoization tries to predict based on the entire conversation and not chunks of it.

Progress: I think I am on the right track. Keras Policy seems to be giving me what I want.


If it’s simply Q&A:

  • You can use MappingPolicy, which bind a specific action to a corresponding intent. It means that whenever an intent A is predicted from the user, the bot will execute Action B (assume that you bound B to A): Policies

If you also need to extract information from the user’s answer:

  • You can use FormAction, basically you still assign a specific action to an intent. But with FormAction, the bot can ask the user multiple questions for multiple requested slot (which you defined beforehand) until all those slots are filled (the user provided all required information): Forms