logo

NJP

Virtual Agent Academy: Getting Started with Entity Recognition

Import · Sep 30, 2020 · video

hello everyone good morning good evening welcome to virtual agent academy um today we are joined by an esteemed colleague david who is a product manager on the nlu side so david did you want to go ahead and get us started hey marcel thank you very much yes good morning good afternoon good evening everyone um so i'll today i'll be focusing on let's say getting started with entity recognition this is part of the va nlu technology and um before i dive into the exercise i want to quickly go over the goals for today and focus on basically an update to the getting started pages on the community that's upcoming and um also with some extra set of references to good practice i actually changed that name to uh recommended practices um then we will i'll be talking a little bit about understanding virtual agent entity recognition so getting giving you the background on what is entity recognition and why would you want to use it then i will basically give you an exercise on on how to use entity recognition inside va and finish off with what you should know please note that there are always a lot of resources for you to get trained and updated and improve your skills and knowledge like now learning developer and the community website i'll hint on some of these in the couple in next couple of minutes as well all right get started and recommended practices all right so um as we have a growing community and a lot of new articles or articles that come in from time to time it becomes quickly a little bit challenging to find the right resources for the right level and that's why we're going to introduce like an index article which basically contains all the references um uh let's say the essentials so that basically is uh mandatory uh food for for anyone that uh is going to use let's say the virtual agent slash nyu technologies inside their environments and it will focus giving you basically a good getting started set up for beginners and focuses on some basically recommended practices for the experts so um and it's not focused just on the community right that's also important it it has references to the entire ecosystem where you find good resources which is now learning the developer community youtube and the docs and last but not least right we encourage every each and every one of you to ask questions in the community and also provide answers because communities only as best as the folks that are actually providing answers and asking questions having said that let's move on to the topic of today entity recognition to give you a little bit of background because just to make sure that we're all starting from the same page uh this piece the entity recognition piece uh mainly comes from the interaction between va and niu and natural language understanding right is the the part where you with let's say with normal conversational language you can ask questions and you should get a better response or a more fluid response uh by the va agent so uh we talk about intents which are part of utterances so utterances and intent need to utterance drive the intent and the entity is part of an utterance if it's not part of an utterance it's ignored if it is part of utterance and it's not mapped it is also ignored if it is part of an utterance and it is mapped then you get a better user flow and we're going to demonstrate that using the in the exercise okay just an example to basically clarify what i just said in this case i'm uttering need a printer installed and the intent basically follows up as immediately picking up that apparently the the va topic knows that uh the printer is not available so it immediately grabs the right topic and goes to the right part of the flow in the topic and determines that it's an unavailable printer in the system and provides some guidance on it so why did that happen well that happened because of some magic no it happened because of entity recognition it it no it found out that used installed with printer is a combination which is both matching to the entity and to the intent so in this case we had an utterance which matched an intent and the intent matched obviously a topic inside va and as part of the utterance we also had an entity and the entity value was installed and that matches the can't find the printer entity okay um this may sound a little bit daunting at this point in time but i assure you that in the exercise it will become crystal clear uh just a reiterance like if you want to see what an utterance is so here's a collection of those utterance examples something critical broke can it help asap and new crucial engine those are utterances they all map to an intent and then you could have an entity or you could not have an entity that's part of that utterance and for example in this case the the entity is urgency which means which translates into let's say critical that's an urgent urgency entity value asap is an urgency entity value and crucial is an urgency entity value that is how it's broken up and we'll see a different example going back to the printer coming up so what are the benefits of using entity recognition well a it improves the flow by reducing interactions you create it once and you reuse it for many intents so it's it's a reusable object and not something you have to recreate for each and every uh utterance and it sharpens the nlu model improving accuracy and that's a a welcome improvement obviously to make sure that you basically a get a better match between the topic and the intents and also that your end users have to do less uh basically clicking or less answering the the questions that that get replied by the agent to basically zoom in on what is actually intended um how does it work well you have to do some leg work because you have to identify the entities right there no there's currently no one going to do it for you in this case you could see that everything that's underlined is an entity and we see that there are basically entity values like no ink that's the that's the entity and the entity value uh that we map is no ink to no ink ink to no ink and toner is low is also a no ink entity mapping and we have three here we also have no paper and can't find the printer and again that that has to do with basically the fact that we can reuse the entities the entities sit at the model level and not at the intent level so you can use them in the various intents as well okay an example a use case where you could actually see how we can improve the flow using entity recognition you have the um the non nlu version which is the before state and when you then ask the the chat bot or the workbot a question need a printer installed it first wants you to match it with an existing topic in this case you want to match it to printer issue using nlu and then it asks you another question after you've basically asked answer this first question once you're in the topic it wants to pinpoint what kind of issue you're experiencing whether that's a no paper issue with no ink or i can't find the printer issue if you use entity recognition you can actually skip those two steps and once you ask the question it immediately is able to identify much like i showed you earlier in that example that neither printer installed basically directly goes to the right endpoint inside the topic right uh enough said uh marcel if there are any questions i can quickly pause here no questions at this time but i would encourage the audience to ask their questions we will be taking brief pauses throughout so we would love to hear from you so please you know don't be shy post your questions all right let me zoom out here okay so um this before i step into basically doing the full demo i want to make sure that everybody is on the same page and by saying that i mean let's look at the general settings uh my nlu settings are uh at this point in time enabled right so i'm using servicenow nlu in the backend for my virtual agent and in my studio i have a oops that's the wrong file no it's a write file there we go sorry about that i have an nlu model for it in which i have four intents get password reset link email issues open it ticket printer issues and we're going to focus on printer issues today so as you can see we have the out of the box utterances these are just imported from the out of the box itsm nou model which is basically which is something that's always read only so you have to create your own model which is a good practice as well in this case i just imported those four and i got it started i'm going to make sure that i train this model so that we're ready for the connection to the virtual agent i'm going to publish so that i know for sure that and i'm going to ask a first question my printer is out of paper i'm just going to use my cheat sheet down there to quickly test okay so i can see that in this case the published model will pick up it as printer issues and also has found an entity no paper value the entities that i can see is here printer issue as you can see here and we can quickly dive into the list that i just showed you in the powerpoint slide okay so i'm good on this end for now just gonna go back here i'm gonna go to my designer and i'm gonna um search for that print topic the print topics that come all the topics that come with itsm out of the box are also read only so it's also a recommended practice to basically create a duplicate of that so i'm just going to create a duplicate printer issues there's another benefit of creating a duplicate because it allows you to basically test in your environment without disrupting the production environment the production system right so you're able to start creating a new flow in this case we're trying to move from keyword based virtual agent to nlu based virtual agent and by creating duplicates i'm able to not disturb the the current way of working but gradually as soon as we were entirely ready and confident that we can make a successful switch we can just switch to the new set of topics okay i'm just going to select nlu for it printer issues as my associated intent i'm going to save this for now and then i'm going to go into the topic flow okay this is the duplicate and typically you would start here and i'm going to make a small change here because this is a very large um topic as you can see it's very complicated so i'm quickly just wanted to highlight that you it's set it makes a ton of sense to create a duplicate but that's not what we want to do here so i'm just going to pop out and make a simple one so i'm just going to go back to print and i'm just going to add a topic actually i'm going to say printer issues you just saw the the what you're supposed to do create a clone of the original and then start modifying that but in the interest of simplicity i'm going to uh create a simple model first so there we go printer issues all right this has nothing um and uh similar to the the large already full-blown topic that you just saw i'm going to fill that in starting with a static choice and i'm going to make sure that i start with printer issues there we go oops make sure that we type in the prompt you can't really save because you need a label that is the first choice that you need to add so in this case i'm going to add no paper as a label and that does not seem like a human readable paper i'll get back to that towards as we progress but this is no paper and then i'm going to add a decision tree so add a text where basically we say no paper and in the condition we want to make sure that no paper is selected and as a response we're going to go for a non-paper response no paper response save that and that's it now we have created our first set it's hooked up okay i'm happy with that and it's published so it's active okay i'm just gonna start off the agent to make sure we have a fresh start and then obviously i'm gonna use my utterance to test i'm still going to ask the question that's interesting no paper as paper issues press printer issues ah okay i see what i forgot um so what i did do is i created all the nice links um but i forgot to enable nou and the entity recognition skip confirmation step so i'm going to go back in into my flow and i'm going to point you to the area where i missed so what i forgot was to enable nlu at the input node make sure that skip confirmation for recognized entity because we want to make sure that if we type a test utterance around something that we don't have any paper is that we actually can quickly go into this no paper response so now i've selected the entity i've enabled i've activated both and i'm going to save again publish start a new conversation and now we can see that we're immediately moving to that little text piece that i had down here so no thank you i'm good so that works like a charm so if we want to expand we can just expand like like we would right we would just create another one we could do like this we could say no ink for example add no ink to the and then have a no ink response maybe we should have a little text for the no ink response and as you can guess we do need another choiceless setting here so i'm just going to add no ink here oops no ink here nothing here again not really a human readable label we'll get to that so now we have two choices and the only thing that i need to do now is make sure that this decision driven through to the no ink actually only takes place if printer issues is no ink okay so that's important right you need a condition on on these leaves all right i'm going to start a new conversation my test endurance will now be obviously my printer is out of ink oops i did something wrong i forgot to publish as you can imagine so no i don't want to continue yes it's correct and there's nothing you can help with i forgot to publish so um the step that i always want to make sure and emphasize is that you make sure that you publish so having said that i need to do it myself as well let's try that again all right now we're seeing the as you can as you're experiencing ink related issues with the printer please check all that compartments are closed all right we've got that one covered so this is working pretty nicely and last but not least we also want to make sure that we have one where we can't find the printer there is just no printer installed so i'm going to add a response here and actually this one is human readable and i'm going to show you what we should do about that moving forward just going to add a leaf here and make sure that we select can't find the printer right type there and do that all right that should be it and don't forget to publish okay um need a printer installed is my test utterance so i'm gonna ask that to this to my bot hey and he's not able to make the connection so let's have a look in studio why that could be so i'm going to go into printer issues i'm going to look into the utterances and make sure that my entities are good so i'm going to look at my properties can't find the printer okay so can't find the printer is indeed part of the list and actually there is where is can't find the printer cannot find the printer where is the printer um okay so there may be two things that i need to do i can't see anything with installed so i might need to improve the um the utterances that are part of the intent so i'm going to add printer needs to be installed as an utterance so that we can train the model and then before i publish i'm actually going to test and uh yes it's going to find but it's only got a 65 percent uh on the entity can't find the printer still so if i try this in the virtual agent again it's not going to return because it doesn't meet the threshold now i could lower the threshold obviously but then i might get a lot of unwanted false positives which i don't want or i can make sure that printer needs to be installed installed is part of the printer issue can't find printer so now i basically said hey part of this utterance is actually a reference to an entity and the entity is the printer issue entity and within the printer oh let me just type that like this because then it won't be updated um printer needs to be installed is now tied to can't find the printer all right so let's train again and test again and now we have a hundred percent match on can't find the printer value all right so i'm going to publish this make sure that i close off no [Music] start a new conversation and need a printer installed and now it has a direct match to the printer that's not available that's it in a nutshell um let me quickly go back to my notes that was the exercise so if there are any questions fire away um what you do should know is not exactly the same training is available but there is a free lab available through now learning where you can register your instance will be provided and you will go through all the steps that includes also entity recognition on in that course so if you want to know more about entity recognition you want to basically get some exercise go to now learning and register yourself for this lab all right that ends my presentation any questions all right so no questions in the chat um but if you find you have questions after this presentation i would encourage everyone to post those out to our community forum so that everyone gets the benefit of seeing the question and you know it's a great way to crowdsource the answers um but david thank you again for a great presentation it really shows the power of entity recognition on the user experience um so really awesome job and i would encourage everybody just to continue visiting the community and post your questions out there okay actually i spoke too soon um we do have a question so um what the the question is what's the biggest advantage of using nlu over keywords so david did you want to take that one or um yes i think the the slide in the middle basically showed it right instead of having your end users first pick the right topic and then from the topic um provide or basically pick the the next choice whether that when there is a choice list skipping all those asks if you already have an utterance where you basically ask something which is obvious like i need a new external monitor to replace my old one then without let's say entity recognition you would not be able to immediately get a response like okay um okay you want the new external monitor same as your old one it's on its way it should be there by end of night no you would first have to answer a series of follow-up questions so that's the biggest difference okay great well i think that wraps up our questions and i think we can wrap up for today

View original source

https://www.youtube.com/watch?v=2WFaoFD8eL8