{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":5298,"path":"conversational-interfaces/virtual-agent/va-topic-discovery-issues.md","title":"Resolve Natural Language Understanding \\(NLU\\) topic discovery issues","bundle":null,"doc_type":null,"release":"australia","body":"\n# Resolve Natural Language Understanding \\(NLU\\) topic discovery issues\n\nIf an intent is not being chosen when expected, you can troubleshoot NLU prediction errors.\n\n## Quick troubleshooting tips\n\nIf a Virtual Agent is not being discovered, check the following:\n\n-   **Is NLU enabled for the session language?**\n\n    Enable the language in Natural Language Understanding \\(NLU\\) settings for Virtual Agent. For details, see [Enable NLU languages in Virtual Agent settings](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/enable-langs-va-gen-settings.md).\n\n-   **Is the NLU Model trained and published for the session language?**\n\n    Your topic may not be using the latest changes to your model. For ServiceNow® NLU, see [Train and try your NLU model](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/test-train-nlu-model.md) and [Publish a Virtual Agent topic](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/publish-virtual-agent-topic.md).\n\n-   **Is the Virtual Agent topic published, discoverable, and bound to a published NLU Model and Intent for the session language?**\n\n    The topic should be bound to a single model and intent for a given language. Ensure there are no duplicate intents bound to other topics. Make sure that the topic, model, and intent are in the same domain. For more information, see [Publish a Virtual Agent topic](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/publish-virtual-agent-topic.md).\n\n-   **Are any roles or conditions specified for the Virtual Agent topic on the Properties tab in Virtual Agent Designer?**\n\n    If the topic is shown only for certain roles or for certain conditions, this can impede topic discovery. For details, see [Topic Properties tab](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/vad-topic-properties-tab.md).\n\n-   **Why did Virtual Agent discover my topic in Spanish but not in French?**\n\n    There are several possibilities:\n\n    -   Not all languages are supported by all NLU providers. For details, see [Language support for NLU services](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/language-support-nlu-services.md).\n    -   Not all topics are bound to a language-specific NLU model and intent.\n\n        For example, Topic A may be mapped as follows:\n\n        -   Bound to Model A and Intent A for English\n        -   Bound to Model A and Intent A for Spanish\n        -   NOT bound to a model or intent for French\n        In this scenario, create a French model and intent for the topic. For more information, see [Multilingual model management](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/intelligent-experiences/multilingual-model-managent.md).\n\n-   **Why did a topic variable NOT slot fill?**\n\n    Check the following:\n\n    -   The topic's user input node was not configured with an associated entity. Use the **NLU entity** property for the node in Virtual Agent Designer.\n\n        \\[Omitted image \"input-node-nlu-entity-field.png\"\\] Alt text: Specify an existing entity in the NLU entity list.\n\n    -   The prediction result contained an NLU entity with a confidence score that was less than the configured confidence threshold.\n    -   The NLU entity value for the node was invalid. For example, you can't apply the word \"red\" to a Date/Time entity type.\n-   **Test discovery from the topic.**\n\n    Do one of the following:\n\n    -   In the Asset library, slide the discovery type toggle switch to **NLU/Keyword**, then select **Test NLU/Keyword Topics**. Enter your utterance, and watch the **Analysis** tab.\n    -   Open the topic in Virtual Agent Designer, then select **Test**. In the Test window, select the **Include topic discovery** check box. Enter your utterance, and watch the **Analysis** tab.\n    For details, see [Testing NLU/Keyword topics](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/va-designer-testing.md). For an understanding of how topic discovery works, see [Natural Language Understanding topic discovery logic in Virtual Agent](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/how-topic-discovery-works.md).\n\n-   **Is \"Setup Topic\" the topic in question?**\n\n    If so, it needs to be configured in Conversational Interfaces Chat Settings for it to be discovered. For details, see [Configure a Virtual Agent chat experience](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/configure-default-chat-experience.md).\n\n-   **Questions or issues with mid-topic switching.**\n    -   **Why did the conversation return to Topic A after Virtual Agent switched to Topic B?**\n\n        The **Resume topic flow after topic switching** attribute is enabled on the topic. You can find this toggle switch on the **Properties** tab under **Advanced properties** &gt; **Additional**.\n\n    -   **Why did the conversation NOT return to Topic A after Virtual Agent switched to Topic B?**\n\n        The **Resume topic flow after topic switching** attribute is disabled on the topic. You can find this toggle switch on the **Properties** tab under **Advanced properties** &gt; **Additional**.\n\n    -   **If Virtual Agent doesn't find an intent, will it use a keyword search in mid-topic?**\n\n        No.\n\n    -   **Are Topic A's variables available to Topic B after switching?**\n\n        No.\n\n    -   **Are Topic B's variables available to Topic A when Topic A resumes?**\n\n        No.\n\n\nFor additional troubleshooting, check the information in the following tables.\n\n## Check NLU prediction information in the Open NLU tables\n\nWhen reviewing or debugging topics that use Natural Language Understanding \\(NLU\\), you can use various Open NLU tables to view the NLU prediction results for your topics. For example, the Open NLU Predict Intent Feedbacks and Open NLU Predict Entity Feedbacks tables provide detailed information on the NLU processing performed by applications \\(such as Virtual Agent\\) to determine topic intent and entities \\(slot filling\\).\n\n-   **Open NLU Predict Intent Feedbacks table**\n\n    The Open NLU Predict Intent Feedbacks \\[open\\_nlu\\_predict\\_intent\\_feedback\\] table shows the intent processing that an application \\(in this case Virtual Agent\\) performs in response to an NLU intent prediction result. The goal for Virtual Agent is to map a predicted NLU intent to a Virtual Agent topic. Whenever Virtual Agent suggests a topic, a record of the prediction result is added to this table. If Virtual Agent doesn't find a topic, no prediction occurs, and a record marked **Skipped** is added to this table.\n\n    To view the table, navigate to **All**, and then enter `open_nlu_predict_intent_feedback.list` in the navigation filter.\n\n<table id=\"table_ojs_j3y_vjb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nApp\n\n</td><td>\n\nApplication using NLU. For example: **VA** \\(Virtual Agent\\).\n\n</td></tr><tr><td>\n\nApp Document\n\n</td><td>\n\nsys\\_id of the application record. For example: **sys\\_cs\\_topic.sys\\_id**.\n\n</td></tr><tr><td>\n\nApp document table\n\n</td><td>\n\nTable of the application record. For example: **sys\\_cs\\_topic** \\(Topics table\\).\n\n</td></tr><tr><td>\n\nAuto-Selected\n\n</td><td>\n\nBoolean indicating whether the system detected only one intent above the prediction threshold, and therefore the application chose to run the topic that matched the same intent: **true** or **false**.\n\n</td></tr><tr><td>\n\nCurrent Intent\n\n</td><td>\n\nNLU intent that was used by the application when the NLU prediction was submitted. This field can be empty \\(blank\\). For example, an intent used in the Virtual Agent application could be **Change password**.\n\n</td></tr><tr><td>\n\nDomain\n\n</td><td>\n\nThe intent's domain. For example, Global or ITSM.\n\n</td></tr><tr><td>\n\nExternal Model Display Name\n\n</td><td>\n\nName of the external NLU model. For example, the name of the IBM Watson Assistant NLU application.\n\n</td></tr><tr><td>\n\nIntent Switch Causer\n\n</td><td>\n\nName of the originating topic that prompts the user for confirmation. There are two possible scenarios for values in this column:-   The user is prompted for confirmation on the initial intent match for their utterance \\(**Ask user if topic VA chose is correct** toggle switch is enabled in [NLU Settings](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/configure-nlu-settings.md)\\).\n\nIf the user is prompted for an initial utterance, this value may be the Greetings topic. If the value is **empty**, the user either was not prompted for the initial match, or the user rejected the initially matched topic intent.\n\n-   The user is prompted for confirmation for an intent switch in mid-topic \\(**Ask user if switched topic is correct** toggle switch is enabled in [NLU Settings](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/configure-nlu-settings.md)\\).\n\nIf the user is prompted for a switch in mid-topic, this value is the name of the topic they were viewing at the time of the switch.\n\n **Note:** System tasks may also display here, which you can ignore. For example: **\\_\\_silent\\_TerminateGoal\\_a3817a5f7ca7439b8**.\n\n</td></tr><tr><td>\n\nIntent Switch Causer current Task\n\n</td><td>\n\nName of the task \\(node\\) that the user switches from.**Note:** System tasks may also display here, which you can ignore. For example: **\\_\\_silent\\_TerminateGoal\\_a3817a5f7ca7439b8**.\n\n</td></tr><tr><td>\n\nMapped\n\n</td><td>\n\nBoolean indicating whether the application \\(Virtual Agent\\) considered the prediction to be usable by matching the intent to an available topic: **true** or **false**.\n\n</td></tr><tr><td>\n\nModel Display Name\n\n</td><td>\n\nName of the ServiceNow NLU model.\n\n</td></tr><tr><td>\n\nModel ID\n\n</td><td>\n\nID of the NLU model that the prediction was submitted for.\n\n</td></tr><tr><td>\n\nModel Name\n\n</td><td>\n\nName of the NLU model that the prediction was submitted for.\n\n</td></tr><tr><td>\n\nNLU Topic Discovery Outcome\n\n</td><td>\n\nPrediction result for initial utterance in a conversation as part of topic discovery:-   **AI Search Fallback**: No prediction was made. AI Search was used as the fallback.\n-   **Correct**: A single prediction was made. The user confirmed the topic was correct.\n-   **Correct Among Multiple**: Multiple predictions were made. This result indicates that the user selected this prediction. Other prediction records are marked as Uncategorized.\n-   **Exited with no confirmation**: The user exits with no confirmation.\n-   **Incorrect**: A single prediction was made. The user confirmed the topic was incorrect.\n-   **Incorrect Among Multiple**: Multiple predictions were made, but the user did not select any of the suggested topics. This result indicates that this prediction had the highest Prediction Confidence value. The other prediction records are marked as Uncategorized.\n-   **Setup Topic Prediction**: Setup topic related prediction was made without using AI Search.\n-   **Skipped**: No prediction was made.\n-   **Skipped with New Utterance**: When the Topic menu displayed, the user typed a new utterance.\n-   **Uncategorized**: None of the above conditions were met, or the user abandoned the conversation.\n\n\n</td></tr><tr><td>\n\nNLU Model Language\n\n</td><td>\n\nLanguage of the NLU model used for the prediction.\n\n</td></tr><tr><td>\n\nPrediction\n\n</td><td>\n\nName of the predicted intent.\n\n</td></tr><tr><td>\n\nPrediction Audit Log\n\n</td><td>\n\nReference to the Open NLU Predict Logs \\[open\\_nlu\\_predict\\_log\\] table.\n\n</td></tr><tr><td>\n\nPrediction Confidence\n\n</td><td>\n\nConfidence value of the prediction.\n\n</td></tr><tr><td>\n\nRequester Session Language\n\n</td><td>\n\nLanguage code of the requester session language when Dynamic Translation is enabled.For example, if the user types in French, the code **fr** is stored. If language detection is enabled and the user enters text in a language that is not the default, Virtual Agent asks the user to confirm their language. If confirmed, the detected language becomes the default value for the session.\n\n</td></tr><tr><td>\n\nSelected\n\n</td><td>\n\nBoolean indicating whether the multiple predicted intents shown to end users as matched topics were actually selected by the end users: **true** or **false**.\n\n</td></tr><tr><td>\n\nShown\n\n</td><td>\n\nBoolean indicating whether the application \\(Virtual Agent\\) displayed the predicted intent as a choice for the end user to select: **true** or **false**.\n\n</td></tr><tr><td>\n\nTopic Switched\n\n</td><td>\n\nName of the topic, if the user was prompted for confirmation \\(regardless of their choice, yes or no\\).\n\n</td></tr><tr><td>\n\nUtterance\n\n</td><td>\n\nPhrase entered by the end user in the chat client window.\n\n</td></tr></tbody>\n</table>-   **Open NLU Predict Entity Feedbacks table**\n\n    The Open NLU Predict Entity Feedbacks \\[open\\_nlu\\_predict\\_entity\\_feedback\\] table shows the entity \\(slot-filling\\) processing that an application \\(in this case Virtual Agent\\) performs in response to an NLU entity prediction result. For example, the goal of Virtual Agent is to map a predicted NLU entity to a Virtual Agent topic input variable.\n\n    To view the table, enter `open_nlu_predict_entity_feedback.list` in the navigation filter.\n\n<table id=\"table_u1p_kyx_vjb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nApp\n\n</td><td>\n\nApplication using NLU. For example, VA \\(Virtual Agent\\).\n\n</td></tr><tr><td>\n\nApp Document\n\n</td><td>\n\nsys\\_id of the application record. For example: **sys\\_cs\\_topic.sys\\_id**.\n\n</td></tr><tr><td>\n\nApp Document Table\n\n</td><td>\n\nTable of the application record. For example: **sys\\_cs\\_topic**.\n\n</td></tr><tr><td>\n\nAuto Selected\n\n</td><td>\n\nBoolean indicating whether the application automatically chose to use the entity without notifying the user: **true** or **false**.\n\n</td></tr><tr><td>\n\nExternal Model Display Name\n\n</td><td>\n\nName of the external NLU model. For example, the name of the IBM Watson Assistant NLU application.\n\n</td></tr><tr><td>\n\nMapped\n\n</td><td>\n\nBoolean indicating whether the application \\(Virtual Agent\\) considered the prediction to be usable: **true** or **false**.\n\n</td></tr><tr><td>\n\nMapped to\n\n</td><td>\n\nItem in the application that the entity was mapped to.\n\n</td></tr><tr><td>\n\nModel Display Name\n\n</td><td>\n\nName of the ServiceNow NLU model.\n\n</td></tr><tr><td>\n\nModel ID\n\n</td><td>\n\nID of the NLU model that the prediction was submitted for.\n\n</td></tr><tr><td>\n\nModel Name\n\n</td><td>\n\nName of the NLU model that the prediction was submitted for.\n\n</td></tr><tr><td>\n\nPrediction\n\n</td><td>\n\nName of the predicted entity.\n\n</td></tr><tr><td>\n\nPrediction Audit Log\n\n</td><td>\n\nReference to the Open NLU Predict Logs \\[open\\_nlu\\_predict\\_log\\] table.\n\n</td></tr><tr><td>\n\nPrediction Confidence\n\n</td><td>\n\nConfidence value for the prediction.\n\n</td></tr><tr><td>\n\nSelected\n\n</td><td>\n\nBoolean indicating whether the application selected to use the entity: **true** or **false**.\n\n</td></tr><tr><td>\n\nShown\n\n</td><td>\n\nBoolean indicating whether the application displayed the predicted entity to the end user as a choice to select: **true** or **false**.\n\n</td></tr><tr><td>\n\nUtterance\n\n</td><td>\n\nUser phrase entered in the chat client window.\n\n</td></tr><tr><td>\n\nValue\n\n</td><td>\n\nValue of the predicted entity.\n\n</td></tr></tbody>\n</table>-   **Open NLU Predict Logs**\n\n    The Open NLU Predict Logs \\[open\\_nlu\\_predict\\_log\\] table provides a consolidated overview of the NLU prediction records for topics. Each record in the log identifies the utterance and corresponding intents \\(topics\\) and entities determined by the NLU service. Each record also includes the NLU prediction scores calculated during topic discovery \\(intent matching\\) and entity extraction.\n\n    **Note:** NLU prediction node logs are generated automatically. If you're using node logs for debugging but you want to suppress the automatic generation of NLU prediction node logs, add the **com.glide.opennlu.predict.node\\_logging\\_enabled** system property and set the value to false.\n\n    To view the Open NLU Predict Logs, enter `open_nlu_predict_log.list` in the navigation filter.\n\n<table id=\"table_ns3_fmg_yhb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAsync\n\n</td><td>\n\nIndicator for asynchronous prediction processing: **true** or **false**. True indicates that the prediction was performed asynchronously, allowing Virtual Agent worker threads to continue.\n\n</td></tr><tr><td>\n\nCreated\n\n</td><td>\n\nDate and time the NLU prediction record was created.\n\n</td></tr><tr><td>\n\nDuration\n\n</td><td>\n\nLength of processing time for the prediction to return intent and entity values.\n\n</td></tr><tr><td>\n\nLanguage\n\n</td><td>\n\nThe language of the NLU prediction request.\n\n</td></tr><tr><td>\n\nLevel\n\n</td><td>\n\nType of message: Information level.\n\n</td></tr><tr><td>\n\nMessage\n\n</td><td>\n\nPrediction results returned: number of intents and entities.\n\n</td></tr><tr><td>\n\nRequest\n\n</td><td>\n\nNLU prediction parameter that contains the utterance and NLU model for the recognized intent.\n\n</td></tr><tr><td>\n\nResponse\n\n</td><td>\n\nNLU prediction results, which contain 0 \\(none\\) or more scored intents and scored entities.\n\n</td></tr><tr><td>\n\nSource\n\n</td><td>\n\nProcess or area: **OpenNLU - Predict**.\n\n</td></tr><tr><td>\n\nUtterance\n\n</td><td>\n\nUser statement recognized by the bot, which maps to an intent defined in an NLU model.\n\n</td></tr></tbody>\n</table>    **Note:** You can view the detailed intent and entity results in the Open NLU Predict Intent Feedbacks and Open NLU Predict Entity Feedbacks tables.\n\n\n## Review HTTP connection information for Open NLU integrations\n\nUse the Open NLU Driver HTTP Connection \\[open\\_nlu\\_driver\\_http\\_connection\\] table to quickly check the HTTP credentials, connection details, and methods for the intents, entities, NLU models, and predictions for your NLU service provider.\n\nTo view the table, enter `open_nlu_driver_http_connection.list` in the navigation filter.\n\n**Parent Topic:**[Debug a Virtual Agent topic](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/conversational-interfaces/virtual-agent/virtual-agent-troubleshooting-guide.md)\n\n"}}