Help
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Asif
ServiceNow Employee
ServiceNow Employee

Step 4: Extending the OOTB NLU Models 

As mentioned in the NLU for the Virtual Agent article, ServiceNow offers several out of the box (OOTB) conversations for ITSM, HRSD, and CSM that are designed to get you up and running with little effort.  In this article, you’ll learn how to create an NLU Model, import an OOTB Intent, and extend it to meet your needs.

Before we dive in and talk about how to extend an NLU Model, let's first talk about why you would want to extend them. The OOTB NLU Models are trained on utterances that cover typical ways end-users’ express intents. This means that they will work for a majority of your use cases, but not all of them.  Specifically, use cases that require the Virtual Agent to know about your specific applications, acronyms, or lingo.

Let’s say you have a custom application called HelloWorld, and an end-user wants to report an issue they are experiencing with it to the Virtual Agent. If the end-user types in "I'm experiencing a problem with HelloWorld," the Virtual Agent would resort to a fall back topic instead of opening an IT ticket. Why? Well, it's because the OOTB OpenITTicket Intent isn't trained to know that "HelloWorld" is a word, let alone an application.

So let's talk about how you do train the OOTB Intents to know about your custom applications, acronyms, or lingo.  Below are two videos that walk you through copying and modifying an OOTB intent to account for a fictitious application called "HelloWorld."

Learn How to Extend the OOTB NLU Models
Create an NLU Model in Studio and import an OOTB Intent Extend and Test an OOTB Intent

 

Create an NLU Model in Workbench and Import an OOTB Intent

Creating an NLU is really simple.  But before we get to that, please take a moment to activate the necessary Virtual Agent, NLU, and out of the box topic store apps and plugins.  You can find more information on how to do that in our Activate the Virtual Agent and NLU Plugins article. Once you've activated the right plugins, you're ready to start:

Step 1: Create an NLU Model   

Within your instance, you’re going to start off by first searching for NLU Workbench in the search box. From there, you'll click on Models which will show the list of NLU models. You can create a model by copying a prebuilt model, importing data from CSV, or starting from blank. 

find_real_file.png 

Step 2: Import OOTB Intents  

Now that you’ve created an NLU model click on the "Import Intents" button which will pop up a new window.  Within the window you’ll see the list of OOTB NLU models. Expand the OOTB application: ITSM NLU Model for Virtual Agent Conversations and check the box next to "OpenITTicket."  Once you click on the green “Import” button, you’ll be brought back to the NLU Model with the OpenITTicket intent.

find_real_file.png

 

Extending and Test an OOTB Intent

When you extend the OOTB intents, keep an eye out for spelling mistakes and company-specific lingo.  If you have company-specific lingo, then you'll need to add them to the NLU Model.

Step 1: Adding Utterances, Vocabulary, and Entities  

Click on the OpenITTicket intent to start adding utterances. Add the five utterances below by typing them in and clicking on the green "Add" button.  

  1. I'm having issues with HelloWorld  
  2. Help with helloworld  
  3. Problem with helloworld  
  4. I need help with HelloWorld  
  5. Something is wrong with HelloWorld 

You'll notice red lines under the words "HelloWorld" and "helloworld.”  This is signifying that the NLU Model does not recognize “HelloWorld” as a word.  To add “HelloWorld” as a word, click on the it within any of the utterances to bring up the “Add Synonym” task.  Change the “Type” to “Pattern” and type in  “\b(?i)helloworld\b” in the “Regex” section to account for the variations in which an end-user might type in “HelloWorld.”  For more information on using regex expressions on entities, please visit our documentation. Finally, add "application" as a synonym for your newly added word.  

Note: You can only add one synonym. 

Finally, let's annotate the last utterance we added "I need help logging into HelloWorld today" with the "urgency" entity. To do that, click on "today" to bring up the entity's screen. Click on "List Entities" to bring up "@urgency" and the list of values. Go ahead and select "@1-high.” Clicking on “@1-high will return you to the Model Builder where you can proceed to the final step, Testing your NLU Model!   

 

Step 2: Testing your NLU Model  

Now that you’ve completed Step 4, it’s time to move onto training and testing your Model.  To do this you’ll need to click on the “Train” button in the upper right-hand corner.  Once the model is trained, go ahead and click on the “Try” button which will bring up the Test pane for you to test out sample utterances.  Test out the following utterances and note the confidence of the NLU Model Builder:  

  1. I need assistance with HelloWorld today  
  2. HelloWorld is not working  
  3. Can someone look at helloworld?  

  Now that you know how to extend the OOTB NLU Models, let's talk about how to tune your NLU Model.

Version history
Last update:
‎03-24-2023 10:28 PM
Updated by:
Contributors