Rule condition could be negatives?

Hello everyone,

We are using Rules inside a rasa model to manage forms completion. For each Form, we created a rule to manage faqs which looks like that :

- rule: Manage Faq in wake_meeting_form
  condition:
  - active_loop: wake_meeting_form
  steps:
  - intent: faq
  - action: utter_faq
  - action: wake_meeting_form
  wait_for_user_input: false

Actually, inside this form, there is a TextSlot which is filled by the whole text of the user message. We would like to desactivate the management of faqs during this slot completion to prevent bot from responding anything to the user uttered text if it falls in faq’s intent.

I thank in adding a condition of type “slot_was_set: REQUESTED_SLOT: (not _text_slot_to_fill)” but it doesn not seems that negativity can be taken into accont inside rules conditions.

Another solution would be to put all other form’s slots in a tab, would that be taken ? Does someone has a clean solution to manage negativity in rules conditions ?

Thanks for responding, Arnaud

Hello Arnaud!

I’m pretty sure you can’t do a negative condition.

What do you mean by “put all other form’s slots in a tab”?

Thanks for responding Chris !

Giving that the form fills 10 slots and that I don’t want the faqs to be managed for only one of those. May a condition like :

- rule: Manage Faq in wake_meeting_form
  condition:
  - active_loop: wake_meeting_form
  - slot_was_set: 
    - REQUESTED_SLOT : [s1, s2, s3... s9]

be working ? Or Using a ‘or’ statement on the slot_was_set to only validate the rule for 9 of the 10 slots of the form.

1 Like

Yup, as you said, you’d need to use “or” statements.

Can I ask what you’re trying to do though? There must be a cleaner way than that.

So I would have to write many Or statements 
 :upside_down_face: May be I could just unfeaturize the slot. :thinking:

My goal is to prevent faq premonition when filling a TextSlot. This slot is the response to a question written by our user and asked to other user by the bot. So what the question and even more the response can be anything, I don’t want the bot to manage it and go on in conversation but just keep the text.

I achieved that using that slot as last one from the form, but I now fear that slot to move because faq would be managed if form wasn’t ending.

1 Like

Ah I see