I can't get Entities to work in my NLU Intent

Matt Lodge
Tera Expert

I have built an intent that contains 161 utterances. I then created an entity that will point to a response further down the conversational flow of my topic. I then went to the VA Designer to link the new Entity to the Static choice node in my topic and I linked the utterance to the mapped entity i just created. Finally I trained the model and published  changes to the NLU model and topic.

When I now enter the utterance that should take me to the response further down the topic flow, it doesn't work. Instead, it takes me right to the beginning of the flow where I have my first static choice node.

I must be missing something somewhere, can anyone help?

6 REPLIES 6

Brian Bakker
ServiceNow Employee
ServiceNow Employee

Hello @Matt Lodge 

 

When testing the utterance in the NLU Workbench does it correctly return the entity? If it does return the entity as expected, then the issue is within Virtual Agent and you may need to map the entity, as per this solution.

 

Otherwise, if it is not returning the entity in the NLU Workbench, please review the intent, as with 161 utterances, you will most likely have many duplicate utterances and over annotated the entity. I suggest you also review the article In-depth guide to building good NLU Models.

 

Hope this helps.

 

Regards,

Brian

chipt
Tera Contributor

Hey Matt,

 

I'm having this issue as well. I'm distinguishing between Android phones and Apple phones, and I have a few utterances ("Android phone", "Android", "Samsung Phone", "iOS", "iPhone") mapped to each of those. Sometimes Apple phone will trigger correctly if I type iPhone, but I can't get Android to trigger.

 

Were you able to find a solution? I know it was a few months ago. Thanks.

Tricia Cornish
ServiceNow Employee
ServiceNow Employee

Hi chipt - 
Some screenshots might help. I'll share my solution and you can see if it helps you resolve yours. "Phone" is synonymous with any of your types so that might be your issue. (more people just say "Android" without adding the word phone)
I created a vocabulary source for "phonetype" and added synonyms phone, device, handheld. 

TriciaCornish_0-1689865002130.png

In my vocab source list, I added iPhone, Android, Samsung, Blackberry with alternate values (Apple, Google, etc) for those users who might ask "i'm having a problem with my apple device" 

TriciaCornish_1-1689865035455.png

When I use my vocabulary sources, I don't have to use the product names - I can just reference the vocab source. I will also want my utterances to have generic utterances too ("I can't connect from my device" v I can't connect from my @phonetype")
Where you have referenced your vocabulary source, map your vocab source reference to a mapped entity. Go to mapped entities and highlight "phonetype" to select. 

TriciaCornish_11-1689866098201.png

 


The first time you try to map the entity to the vocab source, you'll have to "Create New Entity" (this is where you can decide if it's available for all intents in the model).
Click Save to create the new entity.  

TriciaCornish_4-1689865284459.png

After mapping my entities to my vocabulary source, my utterances will look like this: 

TriciaCornish_5-1689865551476.png

Train and try your model. 

TriciaCornish_6-1689865666509.png

If you're not seeing your intent above your confidence threshold or your entity identified, then the issue is in your intent/entity mapping. 
Once you're happy with this testing, you can connect it to your Virtual Agent topic to see your utterances with entities in action.
Publish the model so the intent can be assigned to the topic and the entity mapped to the component.  (If you're not seeing the intent in your VA Properties, you need to publish)

TriciaCornish_7-1689865756561.png

Here's my sample topic with the prompt for the phone type mapped to my entity. 

TriciaCornish_8-1689865800346.png

When I test this topic, i'll check the box "include topic discovery" and try utterances that might or might not have different phone types. No phone type? I should get a prompt for the user to select an option but if it recognizes my entity, then skip the prompt. 

 

TriciaCornish_10-1689865963251.png

 

Hope that helps! 

Perfect, thanks so much! I've successfully used this on 2 topics, but for some reason my 3rd topic is still having trouble. 

 

I have a topic for checking open tickets & making new tickets, and for both, I would like to slot-fill the type of ticket: IT, HR, etc.

 

I have 2 slightly different (for internal reasons) vocabulary sources that I added as mapped entities: @checktickettype and @createtickettype. Check ticket type always triggers correctly, but when I do the same for create ticket type, it won't recognize. The entity & vocab source settings are about identical, and the same issue persists even when I make new intents, vocab sources, and entities to reproduce this. The entities aren't model-available, so they shouldn't be interfering with each other.

 

Not sure what I did differently this time. Any steps I can use to troubleshoot?