Rasa form policy - how to train slot which accept names/dates

Hi,

I am trying to create a chatbot which will recommend based on user input. I am using a form policy for these purpose by following the tutorial Tutorial: Building Assistants.

The bot responding correctly if I fill the slot with the exact value which I added in my nlu.md.

If I input something different then it’s not predicting the next slot in the form.

For e.g. one of my slot in the form is to fill a actors name. It’s not possible to fill all actors names in the nlu.md. Another slot is date.

I was wondering how these issues handled in general?

Please throw some advice in this area.

Thanks in advance

For persons, I used spacy entity extractor in config.yml

  • name: “SpacyEntityExtractor” dimensions: [“PERSON”]

And in actions.py, did something like this

def slot_mappings(self):
        # type: () -> Dict[Text: Union[Dict, List[Dict]]]
        """A dictionary to map required slots to
            - an extracted entity
            - intent: value pairs
            - a whole message
            or a list of them, where a first match will be picked"""
    return {"location": [self.from_entity(entity="actor"),
                        
                         self.from_entity(entity="PERSON")]}

GOT THE IDEA FROM https://dzone.com/articles/conversational-ai-design-amp-build-a-contextual-as