My simple question on Rules and stories

Hi Team, My simple question on rules and stories is when we go for rules, and when we prefer stories in rasa chatbot.

Is there any thumb rule to choose rules and stories. How to avoid errors while implementing forms.

What is the better way to implement forms.

Can any one help me on this. I already walkthrough the rasa doc, still getting confused on this.

Thanks, subbu.

The very important difference between them is

Rules are single turn conversation(Forms in it’s most basic flow is treated as a single turn, meaning a form when activated asks follow up questions to fill in slots and executes actions).

Stories are for multi turn dialogues where the conversation is not very straightforward.

when using forms, you need to put both, Rules for the form to behave accordingly and stories are based on real life dialogues that occurs when user interacts with the form. some flows are not so easy to apply simple rules and hence stories provides indicators about how the conversation should be driven.

i use rules to define simple flows like faqs, chitchat, greet, goodbye, basic form path and then use stories to define more complex paths where the user deviates from “normal” like breaking the form in the middle to ask another question then moving to another form for example. this is why testing the bot is very important to understand how stories can help you.

1 Like