Build and train your model
Summarize
Summary of Build and train your model
This guide explains how to build and train a Natural Language Understanding (NLU) model within ServiceNow's NLU Workbench. After creating a model, you enhance its understanding by adding key content elements such as intents, entities, vocabulary, and test utterances. These components collectively enable the model to accurately interpret and respond to user inputs.
Show less
Key Features
- Intents: Represent the user’s desired action or system action to perform. Training utterances illustrate example user inputs that trigger these intents, which improves model accuracy. Intents can be linked to Virtual Agent topics to automate responses.
- Entities: Provide context by identifying objects or concepts related to an intent. There are system-defined entities (like DATE or LOCATION) available by default and user-defined entities you can create for custom business needs. Entities must be included in training utterances for each model that uses them.
- Vocabulary: Enhances the model’s understanding of synonyms and domain-specific terminology by defining vocabulary items and using tables or lists as vocabulary sources. This helps the model correctly interpret varied user expressions that refer to the same concept.
- Test Set: Consists of test utterances paired with their expected intents to evaluate model performance. Initially empty, it should be populated with realistic examples to assess and improve prediction accuracy.
- Test Panel: Allows you to train the model with new content, manually test utterances to see predicted intents, and provide feedback on predictions to refine model accuracy.
- Settings: Enables you to edit the model’s name, short description, and confidence threshold that governs prediction certainty. Note that language and purpose cannot be changed after creation.
How to Access and Use
Navigate to NLU Workbench > Models to view your models. Select the appropriate application tab and model name to open its details. From there, use the “Build and train your model” card and select “View phase” to add and manage model content. Use the Test panel to iteratively train and validate your model’s understanding.
Why This Matters
Building a well-trained NLU model ensures your Virtual Agent or application accurately interprets user requests, leading to more relevant automated responses and improved user satisfaction. Properly defining intents, entities, vocabulary, and test utterances helps minimize misunderstandings and increases the effectiveness of your conversational AI.
After creating a model, build the model's content by adding intents, entities, vocabulary, and test set utterances. Your NLU model content determines how the model responds to user inputs.
- Intents: An action the user wants to do or wants the application to do.
- Entities: Object or context for an action.
- Vocabulary: Add vocabulary to help your model understand the range of words in your users' utterances.
- Test set: To assess model performance, add test utterances and the intents that you expect to be predicted for those utterances.
To access the model content, navigate to . The Virtual Agent tab opens by default. Select the tab for your model's application and then select the name of the model to open the Model details page. In the Build and train your model card, select View phase.
Intents
When your model receives user input, it uses an intent to perform a system action. For example, a user types in I have a critical issue with a slow laptop. The model matches the utterance input to the intent #TroubleshootSlowComputer. If the intent is linked to a Virtual Agent topic, it triggers further action.
Intents contain training utterances, or examples of user inputs that would trigger the system action. Provide realistic utterances that the model might encounter from your users. The quality of training utterances affects the accuracy of your model.
For more information, see NLU intents.
Entities
Your intents use entities to provide additional context for the model when receiving inputs. In the computer example, the laptop is the entity, or object of, the action.
NLU entities fall into two categories: system-defined and user-defined. System entities such as DATE, TIME, and LOCATION are available by default in your instance. You can create your own user-defined entities to provide additional associations and meaning for your business requirements.
All entities are reusable across other NLU models. However, you must add them to a training utterance for each model to use them.
For more information, see NLU entities.
Vocabulary
Your users' input may contain a wide variety of words and phrases. Also, your model may not understand some terms used in specialized domains or business areas.
To improve your model's ability to understand a wide range of user input, you can define synonyms by creating vocabulary items.
For example, your model includes an entity for the term computer. When a user types in I need a new computer, the model knows how to respond. However, if a user enters laptop or workstation, the model might fail to predict the intent. You can add vocabulary to the model to train it to understand synonyms and variations.
You can also use tables and lists as vocabulary sources. Your models can look up the vocabulary sources when predicting intents.
For more information, see NLU vocabulary.
Test set
Your model contains a default test set that you can use to evaluate the model’s performance. Initially the test set is empty, ready to be populated with your content. Add test utterances and their expected intents to build the test set.
For more information, see Test set creation and management.
Test panel
Access the test panel by clicking Train model or Try model in the Build and train your model phase. Training incorporates new content into your model. With Try model, you can manually enter individual utterances to test what intents the model predicts for them.
For more information, see Train and try your NLU model.
You can also use the test panel to provide feedback on your model's predictions. Your feedback helps improve intent prediction. See Test panel feedback.
Settings
Use the Settings tab to edit the name, short description, and confidence threshold of the model. You can't change the language or purpose of the model.
For more information on the confidence threshold, see Test and publish your model. For more information on Settings, see NLU model settings.