Rasa does not follow the defined path of stories [how to add fixed logic to dialog]?

Hi I am facing an issue with rasa core. I want a part of my dialog is always fixed logic, no ML involved. can this be done?

I hope the dialog should be:

initial
    |
action1
    |
user confirm
    |
 action 2

and I have bunch of other chi-chat stories, which I hope they wont affect this dialog.

However, the current behavior of my bot is: after action1, if I say something else like “hi”, which is not a “user confirm”, the bot will do action2.

What is a proper way to do this?

How does your config.yml look like? What next action is chosen depends on the policy you chose (Policies).

Just to clarify, if the user says something different than “user confirm” your bot should nevertheless react with “action 2” or should it break out of the fixed story?

Hi Tanja thanks for reply. my config.yml is:

language: en

pipeline:

- name: "SpacyNLP"

case_sensitive: true

- name: "SpacyTokenizer"

- name: "SpacyFeaturizer"

- name: "RegexFeaturizer"

- name: "CRFEntityExtractor"

- name: "EntitySynonymMapper"

- name: "SklearnIntentClassifier"

policies:
  - name: MemoizationPolicy
  - name: KerasPolicy
  - name: "FallbackPolicy"
    nlu_threshold: 0.2
    core_threshold: 0.2
    fallback_action_name: 'action_default_fallback'

Yes. I hope the action 2 triggers only when user’s intent is “user confirm”

You config file looks good. Normally, the behaviour you desire should also happen. How does your training data look like? Did you make sure to also include some unhappy paths in there? E.g. stories that say something different then “user confirm” after “action 1”? If you don’t include unhappy stories, your bot does not know how to handle those scenarios and will react the way he know.

Also what was the intent of “hi”? Was it classified as “user confirm” or something else? If it was detected as “user confirm”, you should update your NLU training data.