Hi everyone -
So I’ve been back and forth for awhile with a design consideration regarding the organization of intents and entities in my chatbot. I thought this would be a cool topic to post and to open a discussion about in case anyone else has encountered this dilemma. I think proper intent distinction and organization is key in building a good, scalable chatbot.
I will use my situation as an example, and hopefully everyone can relate it back to their own use cases. One component of the bot I am building will be to search specific foods, cuisines, and drinks, with the ultimate goal of the chatbot being to recommend a restaurant or bar/lounge/pub/etc. for the user to get the requested thing. For example, if the user says “I want to get a pizza”, it would recommend a restaurant that has pizza on the menu. Easy enough!
The dilemma I have been having is how to organize the intents effectively to put as little strain on the NLU as possible, while making sure to fulfill the request at hand. Originally, I had two separate intents: search_food and search_drink. The reason for separating these initially was to ensure that if the user said something generic like “I’m hungry” or “I want to party”, they could be associated with search_food and search_drink accordingly.
The problem I am facing now is that the NLU doesn’t see a difference between “burger” and “beer” unless every food and drink is tagged as a food or drink entity in the training. So for example, if “whiskey” isn’t tagged in the training, it may simply think “whiskey” is a food if the user says “I want a whiskey” because there is no difference between that and “I want a burger” besides the entity. Just to be clear, I didn’t expect the NLU to pick up on this difference - it just made me realize that I may need to revisit the way I’m organizing intents.
Assuming I combine into one intent, search_food_drink, I just now have to consider generic requests. Right now, my thought is to just make keywords like “hungry” and “starving” synonyms of “eat” so with a little bit of logic, the backend can understand to recommend a restaurant. On the other side, I would make things like “drunk” a synonym for “drink” to recommend a bar, lounge, etc. I just don’t know if this would be considered a good practice or if it is a stretch for synonyms!
I originally thought I could have some sort of “feeling” or “desire” intent with things like “I’m hungry” or “I want to grab a drink”, but I imagine that getting messy and really confusing to handle.
Any thoughts / similar encounters? I’m interested to hear how others have tackled situations like this regarding the scope of intents.
Thanks! - Chris