Nlu fallback gets executed before stories

Hi guys! I have a situation where I have these 2 stories defined:

stories:

- story: delete item when affirmed
  steps:
  - intent: ItemDelete
  - action: ask_yes_no
  - intent: Affirm
  - action: delete_item

- story: do not delete item when denied
  steps:
  - intent: ItemDelete
  - action: ask_yes_no
  - intent: Deny
  - action: no_worries

Basically, if we have the intent ItemDelete, we need to ask if the user is sure about it, and depending on the answer, we get the second intent Affirm/Deny and choose which story to follow. However, even that the ItemDelete intent gets recognized with a confidence ~1, the stories are never executed and the custom nlu_fallback action is called instead. I tried moving this logic to the rules, since I want this behaviour to be static, but instead got the message: Rules are not meant to hardcode a state machine. Please use stories for these cases. Any ideas what might be the problem?

I don’t have enough info to figure out the nlu fallback issue. Using rules is a good idea, try:

rules:
- rule: item delete
  steps:
  - intent: ItemDelete
  - action: ask_yes_no
  wait_for_user_input: false

- rule: item delete affirm
  - action: ask_yes_no
  - intent: Affirm
  - action: delete_item

- rule: item delete deny
  - action: ask_yes_no
  - intent: Deny
  - action: no_worries
1 Like