In Dialogflow, How to deal with multiple entities having the same reference values?

467 views Asked by At

I have 2 entities Entity A and Entity B. Entity A has a reference value called Walmart and Entity B also has a reference value called Walmart. Now when a user enters 'Show me sales for Walmart', and I want the bot to get me sales for the Walmart listed under Entity B only. How can I make the bot understand that ? Is there a way for the bot to return a prompt asking me which one of the 2 I want to look at ? Appreciate the help

1

There are 1 answers

0
fcagnola On

(since you added all dialogflow tags it's difficult to know what version you're using, so please choose only the ones that fit your needs next time.)

If you're using Dialogflow-cx, which I'm comfortable with, I'd suggest you to tie the entity recognition to an intent. This way, you control the way dialogflow matches your user's input.

So, in the case of a page where you ask questions create form parameters and add only the entity you're interested in, flag the "required" checkbox and provide a fulfilment which asks the user "Which is your favorite supermarket?".

Otherwise, if you're dealing with free user input create an intent and annotate the training phrases only with your desired entity. provide as many training phrases you can think of: this way every time that intent is matched you'll only see results for that specific entity.