Slot filling in form action

Hi everyone,

I have a question about slot filling in form actions. In my case I want the bot to ask for a datetime for an appointment and the number of persons invited. First I ask for the number of persons which works fine and than I use duckling for the datetime which works fine too except of the case someone say “Tuesday at 6 o’clock” for example. In this case datetime is set correctly but the number of persons is overwritten by 6 from “6 o’clock”. Is there a way to avoid this?


As an example I would like to add this conversation part:

(slots {‘person’:‘None’, ‘time’:‘None’})

Bot: How many people are invited?
User: 7 people will come
(slots {‘person’:‘7’, ‘time’:‘None’})\

Bot: When would they like to come?
User: Tuesday at 18 o’clock
(slots {‘person’:‘18’, ‘time’:‘06-10-2020 18:00:00’})

Adding enough training examples in for both entities should solve your problem. Then the bot will start understanding the context both entities generally occur in.

Hi @gaushh thanks for answering,

As I’m using Duckling for the time slot I don’t need examples for this entity if I’m understanding this correct. So would it be sufficient to collect enough examples for the person slot filling? Or do I have somehow train the bot to NOT fill the person slot with a sentence like “Tuesday at 6 o’clock” (would be weird I think).

I am sorry, I don’t know how duckling extracts entities and hence can’t answer you on that.

I would like to know your reasoning behind switching from the default and recommended Diet Classifier for entity extraction.

I’m still using Diet Classifier for most entity recognition but especially for date and time I use Duckling because all I read about it and from what I saw in examples. This is pretty old in rasa terms but was also a trigger for me:

you’re using auto_fill: false in your domain file??

Yes, I tried both. Same behaviour

hi @thinkinnet - this makes sense. I guess it’s because your slot is being filled from_entity with the entity being ‘number’. One idea would be to use the new entity roles and groups, see NLU Training Data and forum thread for this. So you would add the role ‘num_people’ to the relevant examples of the ‘number’ entity to your NLU data Then you can add the ‘role’ attribute to the from_entity call.