I am building a bot for a business knowledge graph (in neo4j). Since a node/type has so many properties (like a person can have a name, age, sex, etc.), I have a categorical slot named queried_item whose values can be age, sex. I am trying to handle the case when the user asks both a person’s age and sex at the same time as in “What are X’s age and sex?”
I don’t think that is the right way to approach this problem. You should have two different slots (age and sex) and train them or use duckling ,
sex is a categorical slot ( M/F/X)
while age is a number or a range
you can set a min-max value for age in rasa core as well
From a NLU perspective( you can use duckling to extract age, given the user is mentioning the age as a number )
Keep in mind what NLU is, it is trying to extract meaningful information from parsed sentences. not keeping mapping of such data.
Users don’t say - I am age years old. Users will say I am 20 years old. Now given how you have trained your model, 20 in this case means it is an age not a queried item. it is upto you as a developer to understand that age is a queried item.