Let’s say the user is looking for a document.
The bot correctly finds one matching the user’s criteria and provides a link to it, as it should based on the story created.
But then the user says they want another one.
I can write a function that provides the next document in the bot’s results, but I also have to extend the story to make sure the bot can respond correctly.
But then the user says they want another one - once again.
Obviously I can’t write stories to match every number of rejection by the user. How can I make the program understand that this is a loop and go back to the previous stage of the story?
And what happens if the user says “okay, the one before the previous one was the best, give me that”? Can I store all the elements in the slots without defining in advance how many of these elements will appear in a loop like this?