Categorical Slot Validation

Hi everyone, I am using a categorical slot that is defined like this:

 slot_abc:
    type: categorical
    influence_conversation: true
    mappings:
    - type: from_entity
      entity: entity_abc
    values:
    - a
    - b
    - c

This slot is used in several form. This makes the form validation complicated:

  1. categorical froms should only be able to take the listed values (a,b,c), but rasa is not inforcing that. There should be an automated enforcement of that without custom slot validation. So there is no difference between a text slot and a categorical slot, right?
  2. I implement the validate_slot_abc method inside ValidatePredefinedSlots. This only works outside of forms. I don’t understand why tha validation of this slot should be different inside of each form.
  3. Now I need to implement validate_slot_abc inside every ValidateFormA. This makes the cide realy long and hard to read.

Can you please share the intuition behind this steps. I feel like this is overcomplicating the process a lot.

Thank you in advance, Sören

This slot is used in several form. This makes the form validation complicated: categorical forms should only be able to take the listed values. Subway Live IQ

Can you give me an example, where the categorical form is not filled with a value that is not listed? For me that doesn’t work (the slot is always filled)

but rasa is not inforcing that

That’s correct. The slot types like Categorical are used for featurization, not for data typing or validation.

@stephens That basicly means that a categorical slot that does not influence the conversation behaves like a text slot, right.

No. Both slot types can be used to influence the conversation.

The docs on Text slots state: If influence_conversation is set to true , the assistant’s behavior will change depending on whether the slot is set or not. Different texts do not influence the conversation any further

For categorical slots the assistant’s behavior will change depending on the concrete value of the slot.