Design stories with N! permutations

Hi,

I am having trouble designing stories.yml with components arranged in all possible sequences (i.e. N! permutations of possible sequences for example N=4 then possible sequences are 1-2-3-4, 1-2-4-3, 1-3-2-4, 1-3-2-4 and so on until 4-3-2-1) and as the number N increases the number of stories becomes not manageable, for instance, if N=6, then there are 6!=720 stories to create and manage!

Now we managed to create 24 stories (i.e. 4!) for our case but to expand into more components we believe it is not codable with stories.yml.

We tried to configure RASA and let RASA generates stories at run time but realises there are many duplicate conversations so we decided to configure RASA to strictly follow the storylines we coded into RASA.

To elaborate above, these components are actually sessions of a story, for example, a chatbot is providing a casual conversation with user talking about where to go for a vacation and there are four sub-topics (components) within a story, namely

1-How To Get There
2-Where To Go In Paris
3-Food
4-How To Stay

And since these sub-topics (components) does not have to go at a particular sequence except that 4 does not goes first, so we created many stories in stories.yml like the followings

Start
1-How To Get There
2-Where To Go In Paris
3-Food
4-How To Stay
End
Start
1-How To Get There
2-Where To Go In Paris
4-How To Stay
3-Food
End
Start
1-How To Get There
3-Food
2-Where To Go In Paris
4-How To Stay
End

I understand RASA is a Machine Learning pipeline and the process to train an AI is to write a dataset inside story.yml giving it a lot of stories as examples, but is there a pragmatic way to code the stories such that we first define these components and write a program to simply generates all these permutations?

Hi,

  1. Please take a look at Forms. You can collect multiple pieces of information using Forms.

  2. You can use rasa interactive to create stories based on a conversation.