Form does not run again

I have a story that includes a form similar to the example in the documentation:

* request_item
    - item_form
    - form{"name": "item_form"}
    - form{"name": null}
    - action_get_item

If I use this pathway once while running rasa shell, it works just fine – all of the slots are filled and action_get_item runs as expected. However, when I try to trigger the request_item intent again in the same session, rasa uses the fallback intent policy. When using the --debug flag, I see that rasa predicts the next intent in the first run, but not the second run. This is the only story that uses this intent.

Moreover, if I trigger any other intent before trying to trigger request_item, I cannot trigger request_item – any attempts to trigger request_item triggers the fallback intent.

I would like to be able to move from intent to intent or repeat intents (in this case, after the form is complete). Do I have to make stories to model these transitions? I can do this without specific stories for intents that do not have associated form actions.

Not sure were to proceed with these issues, I’d be very grateful for any help thanks!

I removed some duplicate stories and/or might have fixed a typo in other parts of stories.md, and now going from intent to intent works as expected. Odd…

Hey @ttlekich sorry for the late response. The reason for this is that rasa looks at a certain amount of previous steps when predicting the next action. You only have a story for one occurrence of this intent. You could for example add a story where it happens two times:

* request_item
   - item_form
   - form{"name": "item_form"}
   - form{"name": null}
   - action_get_item
* request_item
   - item_form
   - form{"name": "item_form"}
   - form{"name": null}
   - action_get_item

Another option is to add an action_restart at the end of your story.

Eventually as you add more stories, policies like the EmbeddingPolicy will learn to generalise to these things and be able to predict situations like this without having explicit stories for everything