Testing NLU/Keyword topics
Summarize
Summary of Testing NLU/Keyword Topics
The chat test window in ServiceNow allows users to preview, test, and debug Natural Language Understanding (NLU) and Keyword topics within the Virtual Agent Designer. This feature enables testing in different environments, including the web client and Microsoft Teams, ensuring that conversations function correctly across various platforms.
Show less
Key Features
- Chat Test Window: Run and debug topics directly in the test window by selecting the Test option. Incomplete topics will display badges indicating issues that need correction.
- Analyze Test Phrases Tab: View intent matching and entity recognition results based on test phrases entered, with the ability to modify utterances and retrain the model as necessary.
- Variables Tab: Monitor all variables used in a conversation, including input, script, and live agent variables, to understand how data flows during interactions.
- Context Tab: Specify context variables to control intent recognition and chat routing, enhancing the relevance of the interactions.
- Logs Tab: Access processing and error messages logged during conversations for troubleshooting and performance tracking.
Key Outcomes
Upon thorough testing and refinement of NLU topics, users can expect improved accuracy in intent recognition and a smoother user experience. The process encourages continuous improvement through retesting and adjustments based on feedback from the test results. Additionally, automated testing through the ServiceNow Automated Test Framework ensures that topic flows function as intended after changes are made.
Use the chat test window to preview, test, and debug Natural Language Understanding (NLU)/Keyword topics.
As you work on a topic in Virtual Agent Designer, you can run your conversation in a chat test window. The default test window is the web (Service Portal) chat client. If it's configured for your instance, you can also run the test window in the Microsoft Teams application.
If you're using the Virtual Agent integrations with third-party messaging apps, elements in your conversation might appear differently in third-party messaging applications. Test your conversations in any third-party applications where you want to deploy Virtual Agent.
Testing your NLU/Keyword topic in the chat test window
- Analyze Test Phrases - The results for intent matching and entity recognition appear based on what you entered in the conversation.
- Variables - List of all the variables used in the conversation, such as input and Live Agent variables.
- Context - Options for specifying the context (using context variables) in which a topic is run.
- Logs - A list of the processing performed.
By default, the Include Topic Discovery option is enabled. This option automatically performs topic discovery and generates prediction results for NLU topics using test phrases that you enter in the test window. The conversation begins with the Virtual Agent greeting and the button for the menu of available topics.
If you're using the Test Active Topics option or sub-options from the Topics page, topic discovery is enabled, so it's not listed as an option. Testing active topics behaves the same as testing from a topic except that test cases can't be created.
Analyze test phrases tab
For NLU enabled topics, the Analyze test phrases tab provides an analysis of the possible intents that match the test phrase (utterance) that you entered in the chat test window. The tab lists the prediction results, which include matched intents and their prediction scores, along with any entity recognition and slot-filling results. The top match is listed first. The predicted intents depend on the prediction confidence threshold set in the NLU service.
If an utterance doesn't match a current intent, you can add or change utterances in Virtual Agent Designer. For more information, see Modify NLU utterances and entities for a Virtual Agent topic.
Make changes, train the model again, and then retest until you're satisfied with the results. When the topic is ready, you can publish both the topic and the model from Virtual Agent Designer.
Variables tab
- Input variables
- Script variables
- Live Agent variables
- Variables passed between a calling topic and topic block
- "Nodeless" NLU entities declared as a slot-filled variable for the topic
The following example shows the Input variables section for the grouped list control. This variable information appears similar to the static list control, but the variables are separated by each group of the grouped choice.
Context tab
Use the Context tab to specify a different context for the chat. Choose a context variable from the list. These variables contain contextual information that can be used to determine topic intent or control how chats are routed to live agents. For example, you could select portal from the list of variables and enter the portal name IT Express. The Context tab is unavailable when creating test cases.
For more information about defining context variables, see Configure context variables for storing chat-related information. For more information about live agent variables that are included with Virtual Agent, see Live agent chat context variables.
Logs tab
The Logs tab displays the processing and error messages that are recorded while running your conversation. If you're using scripts in Virtual Agent Designer, use gs.log, gs.print, and gs.warn statements in your scripts to output information in this log.
Next steps
When you're done testing your topic, close the test chat window. If needed, you can use the test information to fine-tune your conversation. For example, if the results on the Analyze test phrases tab return multiple possible matches for your utterance, you could update the utterances for your intent and NLU model on the NLU Intent tab for your topic.