How to avoid mixing stories with shared utters and actions

Hello there,

I would need some help so that Rasa does not mix similar stories. Example: imagine that I hold an apple shop and I host a chatbot in my website tha enables to buy apples and to report the rotten ones that a user may recieve. I’m using the following structure in stories.md:

## Buy apples
* intent_buy_apples                             
  - utter_ask_for_website_user                   
* say_user_name{"user": "Johnny"}   
  - action_check_user
  - slot{"valid_user" : true}
  - utter_ask_for_quantity
* say_quantity{"quantity": "two"}   
  - action_order_items
  - utter_anything_else
* say_no      
  - utter_goodbye

## Report rotten apples
* intent_report_issue                             
  - utter_ask_for_website_user                   
* say_user_name{"user": "Johnny"}   
  - action_check_user
  - slot{"valid_user" : true}
 - utter_ask_for_issue
* say_no_of_rotten_apples{"no_of_rotten": "one"}   
  - action_solve_the_issue
  - utter_anything_else
* say_no      
  - utter_goodbye

So setting aside the apple metaphor, the problem is: both stories work fine separately (considering also no-happy-paths) but the behaviour of the chatbot is confusing when both examples appear together in the same stories.md. It seems to be clear that the workflow of the chat is mixed between examples since they share “intents”, “actions” and “utters”.

Is there any option to solve this undesirable behaviour while taking advantage of shared “components”?

Many thanks in advance!

Hi @sergioalisys ,

I am not sure if this helps , but from my understanding , you want to avoid mixing of stories, when NLU model is trained.

If that is the case then , I think what you need is to do is to set

–augmentation 0

When NLU model is trained , Rasa will combine bunch of stories together to create augmented stories to better train the model. This by default is 20 , which means it resulting in a maximum of 200 augmented stories.

Usually if you want that for an intent have one answer irrespective of past or present , --augmentation can be set to 0.

Please refer Data augmentation in documentation.

:slight_smile:

Hi @ _sanjay_r!

Many thanks for your quick reply. Training with --augmentation 0 doesn’t seem to solve the issue. I got a more reasonable graph.html (using rasa visualize) but different stories are still mixed. In other words,if you start a conversation with the first intent of a certain story, you finally get stucked at one point of a different story.

Could anybody else provide any suggestion?

Thanks,