Handle story if categorical slots if value is incorrect

How to handle story for categorical slots if somehow rasa parse incorrect value of the entity. For example in below snippet if rasa found value yellow for colour slot how to handle that?

intents:

  • which_is_your_color

slots: colour: type: categorical values: - tech - care - sales

##Story1 nlu identify intent which_is_your_color but no entity extracted

  • which_is_your_color
    • utter_which_color

##Story2 nlu identify intent which_is_your_color and extracted entity color with value red

  • which_is_your_color{“colour:” : “red”}
    • utter_red_color

##Story2 nlu identify intent which_is_your_color and extracted entity color with value black

  • which_is_your_color{“colour:” : “black”}
    • utter_black_color

hi @patilpooja ! what you want to do is create a form and add a validation method for the ‘color’ slot, see Forms

Alan, I would like to try without form. Something with “other” parameter for categorical slots?

yes, you could also do that. Probably the best way to do that is to set auto_fill to False for your colour slot, and then implement the logic in a custom action to check whether the colour is valid and return a SlotSet event