How to diverge stories on the basis of user inputs in slots in forms without using custom actions and form validate action

I have an intent location containing 3 values e.g. a, b, c. I want to diverge the story on the basis of user inputs, eg if a user says “a” we go and execute a separate story, the user says “b” we go and execute a separate story and if a user says “c” another story is called, Now I don’t want to use checkpoints/or as they increase the training time and I don’t want to use the custom actions. Is there any way we can do this??

@stephens any input and suggestions from you would be highly appriciated

1 Like

Try something like this:

entities:
  - example_slot:
      influence_conversation: false

nlu:
  - intent: first_question
    examples: |
      - this is answer [a](example_slot)
      - i give answer [b](example_slot)
      - how about answer [c](example_slot)

rules:
- rule: first question
  - intent: first_question
  - action: initial_form
  - active_loop: initial_form

- rule: answer A > form_a
  condition:
  - active_loop: initial_form
  - slot_was_set:
    - example_slot: a
  steps:
  - active_loop: null   # to deactivate initial_form
  - action: form_a
  - active_loop: form_a
1 Like

@stephens the rule that you have written diverges the story during form execution I want to diverge stories on the values that are stored in the form after form is closed. I want to do something like this

stories:
- story: Greet and handle other intents
  steps:
  - intent: greet
  - action: utter_greet


- story: Greet and unlock account
  steps:
  - intent: greet
  - action: utter_greet
  - intent: unlocking_account
  - action: user_info_form



- story: Greet and unlock account in Lahore
  steps:
  - action: user_info_form
  - active_loop: null
  - slot_was_set:
    - requested_slot: null
  - slot_was_set:
    - location: Lahore
  - action: utter_contact_lahore

- story: Greet and unlock account in Islamabad
  steps:
  - action: user_info_form
  - active_loop: null
  - slot_was_set:
    - requested_slot: null
  - slot_was_set:
    - location: Islamabad
  - action: utter_cannot_unlock


- story: 
  steps:
  - action: user_info_form
  - active_loop: null
  - slot_was_set:
    - requested_slot: null
  - slot_was_set:
    - location: Karachi
  - action: favorite_color_form
  - active_loop: favorite_color_form
  - action: utter_favorite_color


- story: Unlock account without specifying location
  steps:
  - action: user_info_form
  - active_loop: null
  - slot_was_set:
    - requested_slot: null
  - slot_was_set:
    - location: __other__
  - action: utter_busy

Isn’t that the whole point of stories in combination with slots ? You can use 3 different stories to diverge via the set slot value. If it’s only 3 different stories, you shouldn’t expect your training time to have a dramatic increase.

@lumpidu the main issue that I am having right now is that my bot gets confused between the stories as they are very similar and due to that I am having issues in implementing this.