How to define a story where intents can come in any sequence

Building a FAQ bot with, say, 16 types of questions (so, 16 intents). Got corresponding 16 utterances actions also. These questions can come from user in any order. How to define a single story for that? or do we need to do permutations and combinations manually and define those many stories? Example:

- story: happy path
  steps:
  - intent: greet
  - action: utter_greet
  - intent: ALP1
  - action: utter_ALP1
  - intent: ALP2
  - action: utter_ALP2
  - intent: ALP3
  - action: utter_ALP13
:
  - action: utter_ALP15
  - intent: ALP16
  - action: utter_ALP16
  - intent: mood_great
  - action: utter_happy

nlu.yml defines intents ALP1 to ALP6 with different examples. domain.yml defines utterance_ALP1 to utterance_ALP16 with corresponding texts.

Question is how to define the happy path story where any of the ALP* intent can come after initial “Hi”

1 Like

Why not use rules for the FAQ?

Looks like you want to build an FAQ bot, which should use a combination of ResponseSelector and rules?

You want to execute utter_happy only if all ALP intents were executed before it (in any order), right?

If yes, (I think) you can’t use individual rules or usual FAQ stuff.

Maybe use custom actions each time as a response, and count which ALPs have been executed by saving its number in a list slot.

Then, the final action (action_happy) will check if that slot contains all the numbers 1 through 16. Then do something (using utter_message() or FollowupAction) according to that.

1 Like

Yes, that could be one way. Thanks. An easy way should be there to group ALP1 to ALP16 intents/actions and let the Policy be such that anyone of the intent can come from user, and then once thats done, next action…this flow seems common in any FAQ bot, where QnAs are siblings and not parent-child.