Answer a random question in between of a story, and after that continue the story

Hi , I want to answer a random question that is asked by a user in between of a story and then coninue the story as it is?

User: I want to get account password? Bot What is your account type? User: How is the weather in Delhi? Bot. Weather in Delhi is soothing. What is your account type?

Hi @rohitiec,

You just need to write a story for that. It would look something like this:

form_account_weather

  • create_account
    • account_form
    • form{“name”:“account_form”}
  • ask_weather{“location”:“Delhi”}
    • slot{“location”:“Delhi”}
    • action_weather
    • utter_ask_continue
  • affirm
    • account_form
    • form{“name”:“account_form”}
    • form{“name”:“null”}

Hi @BrunoRoth95 , Thanks For your Reply . But it can be any random question , at any stage of the story. Should i write story for each of them or there’s some other way to handle it?

It also matters what policy you use to train Rasa Core. The REDP embedding policy (see https://rasa.com/docs/rasa/core/policies/#embedding-policy) was specifically developed to be able to learn such patterns. It is currently being replaced by a much faster transformer-based policy (see core_transformer branch), so make sure you update when it is fully released :slight_smile:

In any case, having a couple of example stories is necessary, of course. The more, the better. But one can hope that REDP (or TEDP) can learn to understand this pattern and generalise accordingly after seeing a few examples.