Natural Language Understanding (NLU) topic discovery in Virtual Agent

  • Release version: Xanadu
  • Updated August 1, 2024
  • 7 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 Natural Language Understanding (NLU) topic discovery in Virtual Agent

    Natural Language Understanding (NLU) enhances Virtual Agent by enabling it to interpret user statements in conversations and determine user intent. This capability allows Virtual Agent to offer more natural, engaging, and efficient interactions by understanding what users want to do and extracting relevant information from their input.

    Show full answer Show less

    ServiceNow’s NLU uses data from your instance to learn company-specific language and context through components like model groups, intents, utterances, and entities.

    Key Components and Concepts

    • Model Groups: Collections of intents supporting specific applications, roles, and languages.
    • Intents: Represent user actions or goals, such as password resets or ordering items; each intent corresponds to a Virtual Agent conversation topic.
    • Utterances: Natural language examples that help NLU interpret varied user expressions for intents.
    • Entities: Contextual data extracted from user input, such as dates, case numbers, or domain-specific terms, enabling slot-filling and reducing the need for additional user prompts.

    Integration with Virtual Agent

    When creating or updating Virtual Agent topics, you specify the NLU model and intent to match user utterances with the correct conversation topic. Virtual Agent supports multiple NLU providers including ServiceNow NLU, IBM Watson, Microsoft LUIS, and Google Dialogflow, but only one provider per instance.

    Capabilities Enabled by NLU Models

    • Topic Discovery: Automatically matches user utterances to intents/topics, handling single matches, multiple matches (offering user choice), or no matches (triggering AI Search fallback).
    • Backup Keywords: Optional keywords help determine topics when NLU fails to find a match or language support is limited; AI Search fallback ensures relevant results when both methods do not match.
    • Entity Extraction: Virtual Agent identifies and extracts key information from conversations to fulfill tasks, using entities linked to intents to automate slot-filling and improve efficiency.
    • Conversation Switching: Users can switch topics mid-conversation, with Virtual Agent dynamically matching and launching the appropriate topic, while optionally allowing resumption of the original conversation.

    ServiceNow NLU Specific Features

    ServiceNow NLU tightly integrates with Virtual Agent Designer, allowing you to map model groups and intents to topics, as well as update, train, and test NLU models directly within the interface. It supports primary and secondary languages within model groups to facilitate multilingual Virtual Agent conversations, with tools for previewing and localizing topics in different languages.

    Apply Natural Language Understanding (NLU) models that enable Virtual Agent to process user statements in automated conversations. An NLU model provides information that your virtual agent uses to determine what users want to do and to extract relevant values from their input. With NLU, Virtual Agent can offer a more natural and engaging conversational experience.

    NLU components

    ServiceNow NLU can learn the syntax, semantics, and vocabulary of your company using the data in your ServiceNow instance. Use NLU Workbench, the NLU model builder, and the NLU inference service to enable the system to learn and respond to user intent.

    The following elements work together to identify what the user wants to do so that a solution can be found:
    Model groups
    A model group supports a given application, user roles, and languages. For example, you may have a model that supports the Search feature and another model that supports Virtual Agent. Typically, a model group contains multiple intents.
    For more information, see Model management.
    Intents
    Intents represent actions. They describe what the user wants to do or what your application can handle. Intents can pertain to any of the following:
    • Functions, such as resetting a password or ordering an item.
    • Domains, such as healthcare, financial, or government.
    • Customers, such as the US Army, Wells Fargo, or Boeing.
    In Virtual Agent, a single intent is mapped to one conversation topic.
    For more information, see NLU intents.
    Utterances
    Instead of keywords, you enter natural language examples, called utterances. Utterances help NLU to evaluate word meanings and contexts so it can infer user or system actions. Example utterances might include the following:
    • Reset my password.
    • Change password.
    • I don't remember my password.
    • Forgot my password.
    • My password needs to be reset.
    Entities
    Entities represent the object of (or context for) the action. You can define them for individual intents. NLU can match defined entities with user input to slot-fill the values. Slot-filling can eliminate the need to ask some questions within a topic flow. There are three basic types of entities that you can define:
    • Common or system entities, such as date, time, currency, location, quantity, people, or organization.
    • Entities based on ServiceNow records, such as a case number.
    • Company- or domain-specific entities, such as meeting rooms, company policies, and so forth.

    For more information, see NLU entities.

    Figure 1. Example intent definition in an NLU model group
    The Check IT Ticket Status intent contains utterances that include the many ways a user asks a question. The terms "ticket," "issue," and "request" refer to the same thing.

    How NLU models work in Virtual Agent

    When you create or update topics in Virtual Agent Designer, you specify the NLU model and intent that Virtual Agent uses to find the appropriate conversation topic for fulfilling the intent.

    Virtual Agent supports models from different services. You can use the following providers:
    • ServiceNow NLU models that you create using NLU Workbench.

      ServiceNow provides pre-built (read-only) NLU models and topics for various ServiceNow business applications, such as Customer Service Management, HR Service Delivery, and ITSM. You can use the intents defined in these pre-built models and reuse them when you create your own models.

    • If you're using IBM Watson Assistant as your NLU service provider, NLU intents and entities are created in IBM Watson Assistant.
    • If you're using Microsoft LUIS as your NLU service provider, NLU intents and entities are defined in the Microsoft Language Understanding Intelligent Service (LUIS).
    • If you're using Google Dialogflow ES as your NLU service provider, NLU intents and entities are defined in the Google Cloud platform.
    Note:
    Virtual Agent supports only one NLU service provider per instance.

    With NLU models, your virtual agent can do the following:

    • Perform topic discovery.
    • Designate backup keywords in case an intent is not matched.
    • Extract entity values.
    • Handle conversation switching in a conversation session.

    These capabilities are explained in the following sections.

    Topic discovery

    When users provide an utterance, the utterance is a statement that is associated with a specific intent. Virtual Agent processes these utterances to launch the appropriate conversation topic. Each topic has a single intent that you specify in Virtual Agent Designer.

    During the topic discovery process, intents are matched to topics. Virtual Agent returns the most relevant topics for a user's request. The topic discovery process returns the following results to a user:
    • Single match: When a user utterance directly matches an intent (topic), the topic runs automatically.
      Figure 2. A user request matches an utterance in an intent
      In Virtual Agent, the user asks, "What is the status of my request?" This matches the utterances entered in the Check IT Ticket Status topic.
    • Multiple matches: When a user utterance matches more than one intent, Virtual Agent returns a choice list of the relevant matches so that the user can choose the appropriate topic.
      Figure 3. A user request matches utterances in multiple intents
      If multiple possible intents are matched, Virtual Agent returns a list of choices. For a ticket request, options might include IT Ticket Status, CSM Ticket Status, or Create IT Ticket.
      Note:
      If there are multiple matches, Virtual Agent returns three intents by default. You can change the number of topics returned by using the com.glide.cs.max_number_display_topics system property.
    • No matches: When Virtual Agent can't find a matching intent, it uses AI Search to generate search results that display relevant links to Q&A knowledge articles, Service Catalog items, or person (user) records.

      This feature is controlled by the AI Search Fallback setup topic and the Virtual Agent search configurations, which are enabled by default in chat experiences. To learn more about the AI Search results generated, see Virtual Agent integration with AI Search.

      If you disable the AI Search Fallback setup topic, Virtual Agent automatically displays a fallback error message that enables the user to select a topic or enter a different request.

      Figure 4. Example fallback message
      Virtual Agent responds with, "I am sorry, but I didn't understand your request." The user can type a new utterance or select Show Me Everything.

      For details about how the AI Search Fallback setup topic and the fallback response (the fallback setup topic) work, see Setting up chat experiences for Virtual Agent users.

    For detailed information about NLU topic discovery, see Natural Language Understanding topic discovery logic in Virtual Agent.

    Topic discovery with backup keywords

    When you create or update topics, you can also optionally specify keywords that Virtual Agent uses to determine the topic if NLU doesn't return a matching intent and topic. Virtual Agent uses keywords in the following situations:
    • No topics (intents) are discovered.
    • The appropriate topic (intent) can't be determined because too many topics (intents) are discovered.
    • The language of the topic and intent is not currently supported in NLU.
    Note:
    If Virtual Agent can't determine the topic based on NLU or the keyword, it falls back on the AI Search capability to deliver relevant results. The AI Search capability must be enabled.

    Entity extraction

    With NLU models, Virtual Agent can determine when user statements in a conversation contain important information to fulfill a task or goal. Entities identify the information that Virtual Agent can extract from the conversation, such as an object or a person's name. To extract the appropriate values, Virtual Agent uses the entity information that is associated with an intent that is defined in the NLU model.

    When designing your topic, you can use entities as follows:

    Conversation switching

    Users engaged in a Virtual Agent conversation can switch topics anytime during the conversation. For example, a user might be updating an item in the user's employee profile. But before completing the update, that user might ask to order an item instead. Virtual Agent can find and run the appropriate topic based on the user's request. You can enable users who switched topics to resume the original conversation.

    Another example is when a user might ask a casual question or engage in small talk. The question might be unrelated to the original request. By reviewing the intents defined in the NLU model, Virtual Agent can match and launch the appropriate conversation for the switched topic.

    ServiceNow NLU multi-language support and integration with Virtual Agent Designer

    If you're using ServiceNow NLU, you can map an NLU model group and an associated intent to a topic. You can also update, train, and test the associated NLU model from within Virtual Agent Designer. As you work on a topic, you can also improve or modify the utterances and the associated entities for an intent without leaving the interface.

    ServiceNow NLU model groups contain a primary language and secondary languages. Use the primary language to author your topic, which can then be translated into the secondary languages within the group. For more information, see Multilingual model management.

    As you work on your topics, Virtual Agent Designer provides language-mapping views for previewing and testing topics with their associated language-specific models. For more information, see Localizing Virtual Agent conversations.