Build and train your model

  • Release version: Yokohama
  • Updated January 30, 2025
  • 3 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Build and train your model

    This guide explains how to build and train a Natural Language Understanding (NLU) model in ServiceNow by adding key components such as intents, entities, vocabulary, and test utterances. These elements define how your model interprets user inputs and triggers system actions, enabling more accurate and context-aware responses in Virtual Agent and Search applications.

    Show full answer Show less

    Key Features

    • Intents: Represent the user's desired action. Training utterances—examples of user inputs—are added to improve intent detection accuracy. Linking intents to Virtual Agent topics enables automated responses and workflows.
    • Entities: Provide additional context within intents by identifying objects or parameters in user inputs. System-defined entities like DATE or LOCATION are available by default, and you can create user-defined entities tailored to your 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 terms by allowing you to define alternate words or phrases. Vocabulary sources such as tables or lists enable the model to recognize diverse expressions, improving intent prediction.
    • Test Set: Contains utterances paired with expected intents to evaluate model performance. You can build and manage this set over time to ensure ongoing accuracy.
    • Test Panel: Allows you to train the model with new content and manually test utterances to verify intent predictions. Feedback functionality helps refine the model by correcting mispredictions.
    • Settings: You can configure basic model details such as name, description, and confidence threshold. Language and purpose settings are fixed.

    Practical Application for ServiceNow Customers

    By following these steps, you can create an NLU model that accurately interprets user requests in your ServiceNow environment. Properly defined intents and entities ensure that Virtual Agent and Search features respond correctly, improving user satisfaction and operational efficiency. Using vocabulary and test sets helps your model handle diverse language and maintain accuracy as your application evolves. The test panel supports iterative improvements by allowing real-time testing and feedback integration.

    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.

    Models are made up of the following content:
    • 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 NLU Workbench > Models. 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.

    The phase for Build and train your model

    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.

    Settings tab of an example model.

    For more information on the confidence threshold, see Test and publish your model. For more information on Settings, see NLU model settings.