Rasa is matching intent in active loop

Hi, I have a form that has two required_slots . The problem is in the active_loop when I insert a value for the requested_slot rasa is matching the inserted value to an intent and it get out of the form to go to that intent. This is wrong in my case because I just want the users to fill the form and keep following the story path. It should not to try to match an intent when the user is filling a slot.

slots:
  date:
    type: text
    mappings:
    - type: custom

  forms:
    date_from:
      required_slots:
        - date
        - time

The story path

- intent: cirujia
  - action: utter_cirujano
  - action: date_from      
  - active_loop: date_from 
  - active_loop: null
  - action: action_confirmation

You’re story doesn’t look right. Follow the examples in the forms docs and create two rules, one to activate the form and another to exit.

I don’t understand why the story doesn’t look right. I’m in the story. Why redirecting to a rule to then go back to the story? Even if it would be cool to have the form defined once because the form follow one path. And the rasa documentation is confusing because it doesn’t show the complete examples.

This a story I have:

- story: happy path
  steps:
  - intent: want_to_reserve # I want to reserve
  - action: utter_want_to_reserve # What do you want to reserve?
  - action: service_form      # form to fill the service
  - active_loop: service_form 
  - slot_was_set:
    - requested_slot: null
  - active_loop: null # Form is filled
  - action: action_describe_item # description of the service and ask for the date
  - action: date_from      # form to fill date and time
  - active_loop: date_from 
  - slot_was_set:
    - requested_slot: null
  - active_loop: null # Form is filled
  - action: action_confirmation # ask to confirm.
  - intent: confirmation
  - action: action_check_user
  - slot_was_set:
    - user_exists: true
  - action: action_make_appointment

So, how can I have the rules for the forms and make sure that Rasa will know it should go back to the story after?

Another problem I have is splitting the story so that I do not have to repeat the same parts again and again and to be able to change the stories easily in case of new changes. But I always have Unexpected intent trigger to find the next story to execute and sometimes it pick the wrong story to continue instead of following the right path. I just don’t want that to happen again if I split into rules. I think about creating a new post about this problem.

I also check out this example rasa/examples/formbot/data at main · RasaHQ/rasa · GitHub.

I just don’t understand it. They defined the rules to active and deactivate the forms. But in the stories the repeat the same form creation in the stories.

Rule activate:

- rule: activate restaurant form
    steps:
      - intent: request_restaurant
      - action: restaurant_form
      - active_loop: restaurant_form

A story:

- story: stop form + continue
    steps:
      - intent: request_restaurant
      - action: restaurant_form
      - active_loop: restaurant_form
      - intent: stop
      - action: utter_ask_continue
      - intent: affirm
      - action: restaurant_form
      - active_loop: null
      - action: utter_submit
      - action: utter_slots_values

What is the point having a rule defined the form and repeat the same form code in the story?

Any help?

Delete all the stories and use only rules to enter and complete the form.

Thanks, But I would like more explanation on why.