{"id":17929,"date":"2016-10-28T17:12:45","date_gmt":"2016-10-28T17:12:45","guid":{"rendered":"https:\/\/developer.kore.com\/?post_type=docs&#038;p=8561"},"modified":"2021-03-26T05:29:02","modified_gmt":"2021-03-26T05:29:02","slug":"testing-your-bot-with-nlp","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v8-0\/docs\/bots\/test-your-bot\/testing-your-bot-with-nlp\/","title":{"rendered":"Utterance Testing"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>To make sure your bot responds to user utterances with related tasks, it is important that you test the bot with a variety of user inputs. Evaluating a bot with a large sample of expected user inputs not only provides insights into bot responses but also gives you a great opportunity to train the bot in interpreting diverse human expressions.<\/p>\n<p>You can perform all the training-related activities for a bot from the <i>Utterance Testing<\/i>\u00a0module. We will use a sample <i>Flight<\/i><i>\u00a0Booking\u00a0<\/i>bot consisting of the following tasks for use as examples across the Test and Train article.<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/Bot-tasks.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12871 alignnone\" src=\"\/wp-content\/uploads\/sites\/16\/Bot-tasks.jpg\" alt=\"\" width=\"1047\" height=\"625\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Testing_the_Bot\">Testing the Bot<\/span><\/h2>\n<p>Simply put, testing a bot refers to checking if the bot can respond to a user utterance with the most relevant task. Given the flexibility of language, users will use a wide range of phrases to express the same intent.<\/p>\n<p>For example, you can rephrase <em>I want to change my ticket from San Francisco to Los Angeles on Jan 1<\/em> as <i>Please change my travel date. Can\u2019t make it on Jan 1. <\/i>The trick is to train the bot to map both of these utterances with the same intent or <i>Modify Booking<\/i> task.<\/p>\n<p>So, the first step to start testing a bot is to identify a representative sample of user utterances to test the bot responses. Look for sources of data that reflect real-world usage of the language, such as support chat logs, online communities, FAQ pages of relevant portals.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"How_to_test_the_bot\">How to test the bot<\/span><\/h3>\n<p>Follow these steps to test a bot:<\/p>\n<ol>\n<li>Open the bot that you want to test.<\/li>\n<li>From the left navigation panel hover over <strong>Testing<\/strong> and click <strong>Utterance Testing<\/strong>.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/testntrain-navigation.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21321\" src=\"\/wp-content\/uploads\/sites\/16\/testntrain-navigation.png\" alt=\"\" width=\"245\" height=\"756\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100030\/testntrain-navigation.png 245w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100030\/testntrain-navigation-97x300.png 97w\" sizes=\"auto, (max-width: 245px) 100vw, 245px\" \/><\/a><\/li>\n<li>In the <b>Type a user utterance<\/b> field, enter the utterance that you want to test. Example: Rescheduling my plan. Cancel my ticket to LA.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/mark-as-incorrect.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-12873 alignnone\" src=\"\/wp-content\/uploads\/sites\/16\/mark-as-incorrect.jpg\" alt=\"\" width=\"971\" height=\"219\" \/><\/a><\/li>\n<li>The result appears with a single, multiple, or no matching intents.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/reschedule-booking.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13023 size-full\" src=\"\/wp-content\/uploads\/sites\/16\/reschedule-booking.jpg\" alt=\"\" width=\"344\" height=\"648\" \/><\/a><\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Types_of_Test_Results\">Types of Test Results<\/span><\/h3>\n<p>When you test a user utterance against a bot, the NLP engine tries to find the bot tasks that match the intent. The NLP engine uses a hybrid approach using Machine Learning, Fundamental Meaning, and Knowledge Graph (if the bot has one) models to score the matching intents on relevance. The model classifies user utterances as either being <i>Possible Matches<\/i> or <i>Definitive Matche<\/i>s.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/definitive-match.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13037\" src=\"\/wp-content\/uploads\/sites\/16\/definitive-match.jpg\" alt=\"\" width=\"349\" height=\"540\" \/><\/a><br \/>\n<i>Definitive Matches<\/i> get high confidence scores and are assumed to be perfect matches for the user utterance. In published bots, if user input matches with a single <i>Definitive Match<\/i>, the bot directly executes the task. If the utterances match with multiple <i>Definitive Matches<\/i>, they are sent as options for the end user to choose one.<\/p>\n<p>On the other hand, <i>Possible Matches<\/i> are intents that score reasonably well against the user input but do not inspire enough confidence to be termed as exact matches. Internally the system further classifies possible matches into good and unsure matches based on their scores. If the end user utterances were generating possible matches in a published bot, the bot sends these matches as <i>\u201cDid you mean?\u201d<\/i> suggestions for the end user.<\/p>\n<p>Below are the possible outcomes of a user utterance test:<\/p>\n<ul>\n<li><b>Single Match (Possible or Definitive)<\/b>: The NLP engine finds a match for the user utterance with a single intent or task. The intent is displayed below the User Utterance field. If it is a correct match, you can move on to test the next utterance or you can also further train the task to improve its score. If it is an incorrect match, you can mark it as incorrect and select the appropriate intent.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/analysis-1-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13033 size-large alignnone\" src=\"\/wp-content\/uploads\/sites\/16\/analysis-1-1-1024x492.png\" alt=\"\" width=\"835\" height=\"401\" \/><\/a><\/li>\n<li><b>Multiple Matches (Possible or Definitive or Both)<\/b>: NLP engine identifies multiple intents that match with the user utterance. From the results, select the radio button for the matching task and train it.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/multiple-matches.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21904\" src=\"\/wp-content\/uploads\/sites\/16\/multiple-matches.png\" alt=\"\" width=\"1366\" height=\"768\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100015\/multiple-matches.png 1366w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100015\/multiple-matches-300x169.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100015\/multiple-matches-1024x576.png 1024w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/li>\n<li><b>Unidentified Intent<\/b>: The user input did not match any task in any of the linked bots. Select an intent and train it to match the user utterance.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/no-match.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21905\" src=\"\/wp-content\/uploads\/sites\/16\/no-match.png\" alt=\"\" width=\"1366\" height=\"768\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100014\/no-match.png 1366w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100014\/no-match-300x169.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100014\/no-match-1024x576.png 1024w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Entity_Match\">Entity Match<\/span><\/h3>\n<p>During testing of the bot, the matched entities are displayed. The entities from the utterance are processed in the following order &#8211; first NER and pattern entities and then the remaining entities.<\/p>\n<p>Post rel8.0 of the platform, the details of how the entity was matched, and with what confident scores are also displayed. The details include:<\/p>\n<ul>\n<li>Identification Engine &#8211; Machine Learning or Fundamental Meaning;<\/li>\n<li>Training Type &#8211; match can be from NER, pattern training, entity name, system concept, etc.. In case of pattern match, click the row to get the details for the same;<\/li>\n<li>Confidence Score identified by the ML engine using NER training (only when Conditional Random Field is selected as the NER model)<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201020095320\/UT_entityMatch.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24701\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201020095320\/UT_entityMatch.png\" alt=\"\" width=\"883\" height=\"501\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201020095320\/UT_entityMatch.png 883w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v8-0\/wp-content\/uploads\/sites\/16\/20201020095320\/UT_entityMatch-300x170.png 300w\" sizes=\"auto, (max-width: 883px) 100vw, 883px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Analyzing_the_Test_Results\">Analyzing the Test Results<\/span><\/h2>\n<p>When you test a user utterance, in addition to the matching intents you will also see an NLP Analysis box that provides a quick overview of the shortlisted intents, the NLP models using which they were shortlisted, corresponding scores, and the final winner.<\/p>\n<p>Under the <em>Fundamental Meaning<\/em> tab, you can see the scores of all the intents even if they aren\u2019t shortlisted.<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/analyze-results.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21907\" src=\"\/wp-content\/uploads\/sites\/16\/analyze-results.png\" alt=\"\" width=\"1366\" height=\"768\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100014\/analyze-results.png 1366w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100014\/analyze-results-300x169.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100014\/analyze-results-1024x576.png 1024w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/p>\n<p>As mentioned above, the Kore.ai NLP engine uses Machine Learning, Fundamental Meaning, and Knowledge Graph (if any) models to match intents. If the NLP engine finds a single <i>Definitive Match <\/i>through one of the underlying models, you will see the task as the matching intent. If the test identifies more than one definitive matches, you will receive them as options to pick the right intent.<\/p>\n<p>If the models shortlist more than one possible matches, all the shortlisted intents are re-scored by the <i>Ranking and Resolver<\/i> using the <i>Fundamental Meaning <\/i>model to determine the final winner.<\/p>\n<p>Sometimes, multiple <i>Possible Matches<\/i> secure the same score even after the rescoring in which case they are presented as multiple matches to the developer to select one. You can click the tab with the name of the learning model in the NLP Analysis box to view the intent scores.<\/p>\n<div class=\"alert alert-info\"><b>Note<\/b>: The NLP score is an absolute value and can only be used to compare against other tasks with the same input. Task scores cannot be compared across different utterances.<\/div>\n<p>From each model dialog, clicking the icon on the top right will display the configurations and thresholds in place for the corresponding engines.<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/testntrain-thresholds.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21319\" src=\"\/wp-content\/uploads\/sites\/16\/testntrain-thresholds.png\" alt=\"\" width=\"800\" height=\"714\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100030\/testntrain-thresholds.png 800w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100030\/testntrain-thresholds-300x268.png 300w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"ML_Model\">ML Model<\/span><\/h3>\n<p>The ML model tries to match the user input with the task label and the training utterances of each task. If the user input consists of multiple sentences, each sentence is run separately against the task name as well as the task utterances.<\/p>\n<p>Click on the Machine Learning Model button to open the Machine Learning Model section of NLP Analysis. This shows only the names of the tasks that secure a positive score. In general, the more the number of training utterances that you add to a task, the greater are its chances for discovery. For more information, read <a href=\"\/docs\/bots\/bot-builder\/optimizing-bots\/user-utterances\/\" target=\"_blank\" rel=\"noopener noreferrer\">Machine Learning<\/a>.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/analysis-ML.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13034 alignnone\" src=\"\/wp-content\/uploads\/sites\/16\/analysis-ML.png\" alt=\"\" width=\"827\" height=\"624\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"FM_Model\"><b>FM Model<\/b><\/span><\/h3>\n<p>Apart from the ML model, each task in the bot is also scored against the user input using a comprehensive custom NLP algorithm that involves different combinations of task names, synonyms, and patterns.<\/p>\n<p>The Fundamental Meaning (FM) Model tab shows the analysis for all the intents in the bot. Click the tab to view the scores of each task.<\/p>\n<p>Clicking the\u00a0<strong>Processed Utterance<\/strong> shows how the user utterance was analyzed and processed.<\/p>\n<p>From rel 7.2, the FM engine generates the model in two ways, depending upon the language of the Bot.<\/p>\n<p><strong>Approach 1<\/strong>: Supported for German and French languages.<\/p>\n<p>The <strong>word analysis<\/strong> factors pertaining to Original Word, Universal Parts of Speech, Dependency Relation and Related Word are elaborated.<\/p>\n<p>Next, the <strong>score breakup<\/strong> for each of the intents processed is displayed. Selecting a scored intent (matched or eliminated) displays the details of the scoring for each word. This includes the words from the utterance and score assigned to each based upon the dependency parsing.<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/FMModel_ge.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22882\" src=\"\/wp-content\/uploads\/sites\/16\/FMModel_ge.png\" alt=\"\" width=\"801\" height=\"715\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p><strong>Approach 2<\/strong>: Supported for languages, other than the ones mentioned above.<\/p>\n<p>The <strong>word analysis<\/strong> factors pertaining to Original Word, Role in the sentence and Processed word (in case of spell correction) are elaborated.<\/p>\n<p>Next, the <strong>score breakup<\/strong> for each of the intents processed is displayed. Selecting a scored intent (matched or eliminated) displays the details of the scoring for each word. The detailed breakdown is given below.<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/FMModel_en.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22885\" src=\"\/wp-content\/uploads\/sites\/16\/FMModel_en.png\" alt=\"\" width=\"803\" height=\"717\" \/><\/a><\/p>\n<ul>\n<li>Words Matched: The score given for the number of words in the user input that matched words in the task name or a trained utterance for the task.<\/li>\n<li>Word Coverage: The score given for the ratio of the words matched with that of the overall words in the task, including task name, field names, utterances, and synonyms.<\/li>\n<li>Exact Words: The score given for the number of words that matched exactly and not by synonyms.<\/li>\n<li>Bonus\n<ul>\n<li>Sentence Structure: Bonus for the sentence structure match to the user input.<\/li>\n<li>Word Position: Score given to a word based on its position in a sentence Individual words towards the start of the sentence are given higher preference. Extra credit if the word is near to the sentence start.<\/li>\n<li>Order Bonus: Bonus for the number of words in the same order as the task label.<\/li>\n<li>Role Bonus: Bonus for the number of primary and secondary roles (subject\/verb\/object) matched.<\/li>\n<li>Spread Bonus: Bonus for the difference between the position of first and last matched words in a pattern. The higher the difference, the greater the score.<\/li>\n<\/ul>\n<\/li>\n<li>Penalty: Penalty if there are several phrases before the task name or if there is a conjunction in the middle of the task label.<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Knowledge_Graph\"><b>Knowledge Graph<\/b><\/span><\/h3>\n<p>If the bot consists of a Knowledge Graph, the user utterances are processed to extract the terms and are mapped with the Knowledge Graph to fetch the relevant paths. All the paths containing more than a preset threshold of the number of terms get shortlisted for further screening. Path with 100% terms covered and having a similar FAQ in the path is considered a perfect match.<\/p>\n<p>In case the utterance triggers a dialog (as per run a dialog option in KG), the same is displayed as\u00a0<em>matched intent<\/em> and\u00a0<em>matched utterance<\/em>. You can further train the bot as you would for an intent from ML or FM engine as detailed in the <a href=\"#Training_the_Bot\">train section below<\/a>.<\/p>\n<p><a href=\"\/docs\/bots\/nlp\/knowledge-graph\/\" target=\"_blank\" rel=\"noopener noreferrer\">Know more about Knowledge Graph Training from here<\/a>.<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/testntrain-kg.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21910\" src=\"\/wp-content\/uploads\/sites\/16\/testntrain-kg.png\" alt=\"\" width=\"1366\" height=\"768\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100014\/testntrain-kg.png 1366w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100014\/testntrain-kg-300x169.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100014\/testntrain-kg-1024x576.png 1024w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Ranking_and_Resolver\"><b>Ranking and Resolver<\/b><\/span><\/h3>\n<p>Ranking and Resolver determines the final winner of the entire NLP computation. If either the ML model or the Knowledge Graph find a perfect match, the ranking and resolver doesn\u2019t re-score the intent and presents it as a matched intent. Even if there are multiple perfect matches, they will be presented as options to the developers from which they can choose.<\/p>\n<p>The Ranking and Resolver re-scores all the other good and unsure matches identified by the three models using the Fundamental Meaning model. After re-scoring, if the final score of an intent crosses a certain threshold, it too is considered as a match.<\/p>\n<p>Selecting the Ranking and Resolver tab gives the details.<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/testntrain-randr.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21324\" src=\"\/wp-content\/uploads\/sites\/16\/testntrain-randr.png\" alt=\"\" width=\"800\" height=\"716\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100029\/testntrain-randr.png 800w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100029\/testntrain-randr-300x269.png 300w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>The ranking and details for each match can be viewed by selecting the matched utterance.<\/p>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/testntrain-matchedutt.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-21325\" src=\"\/wp-content\/uploads\/sites\/16\/testntrain-matchedutt.png\" alt=\"\" width=\"800\" height=\"716\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100028\/testntrain-matchedutt.png 800w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/wp-content\/uploads\/sites\/16\/20221201100028\/testntrain-matchedutt-300x269.png 300w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>Depending upon the Bot language the scoring model can be:<\/p>\n<ul>\n<li>based on a mixture of word roles, sentence\/word positions and word order; or<\/li>\n<li>based on dependency parsing (supported for German and French languages)<\/li>\n<\/ul>\n<p>The basis for <strong>intent elimination<\/strong> by Ranking &amp; Reslover when the three engines return different definite\/possible matches is as follows:<\/p>\n<ul>\n<li>Intents matched based upon entity values like date, number etc., by the Machine Learning Model are eliminated.<\/li>\n<li>All possible matches identified by any of the three engines are eliminated if a definitive match was found.<\/li>\n<li>Definitive match eliminated if another definitive match was found prior to this in the user utterance \u2013 case when the user utterance includes two intents. For example, \u201cBook me a flight and then book a cab\u201d would match \u201cBook Flight\u201d and \u201cBook Cab\u201d but \u201cBook Cab\u201d is eliminated over \u201cBook Flight\u201d.<\/li>\n<li>Intent pattern matches following a definitive intent match are eliminated. For example, user utterance &#8220;create a task to send an email&#8221; can match the intents &#8220;create task&#8221; and &#8220;send email&#8221;, in such cases the &#8220;send email&#8221; will be eliminated since it follows the intent &#8220;create task&#8221;<\/li>\n<li>Intents with scores below the minimum value set in the Threshold and Configurations section are eliminated.<\/li>\n<li>Definitive matches which match a Negative Pattern.<\/li>\n<li>Intents for which the pre-conditions, in case defined, are not met are eliminated.<\/li>\n<li>If the definitive match was from Knowledge Graph Engine by Search In Answer and there is another matched intent.<\/li>\n<\/ul>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Training_the_Bot\">Training the Bot<\/span><\/h2>\n<p>Training is how you enhance the performance of the NLP engine to prioritize one bot task or user intent over another based on the user input. You should test and, if needed, train your bot for all possible user utterances and inputs.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Train_the_bot\">Train the bot<\/span><\/h3>\n<ol>\n<li>After you enter a User Utterance, depending on the test result do one of the following to open the training options:\n<ul>\n<li><b>For an unmatched intent<\/b>: From the <b>Select an Intent<\/b> drop-down list, select the intent that you want to match with the user utterance.<\/li>\n<li><b>For multiple matched intents<\/b>: Select the radio button for the intent you want to match.<\/li>\n<li><b>For a single matched intent<\/b>: Click the name of the matched intent.<\/li>\n<\/ul>\n<\/li>\n<li>The user utterance that you entered gets displayed in the field under the <i>ML Utterances <\/i>section. To add the utterance to the intent, click <b>Save &amp; Train<\/b>. You can add as many utterances as you want, one after another. For more information, read <a href=\"\/docs\/bots\/bot-builder\/optimizing-bots\/user-utterances\/\">Machine Learning<\/a>.<\/li>\n<li>Under the <i>Intent Synonyms<\/i> section, each word in the task name appears as a separate line item. Enter the synonyms for the words to optimize the NLP interpreter accuracy to recognize the correct task. For more information, read <a href=\"\/docs\/bots\/bot-builder-tool\/train-nlp-optimization\/fundamental-meaning\/fundamental-meaning\/#Managing_Synonyms\">Managing Synonyms<\/a>.<\/li>\n<li>Under the <i>Intent Patterns<\/i> section, enter task patterns for the intent. For more information, read <a href=\"\/docs\/bots\/bot-builder-tool\/train-nlp-optimization\/fundamental-meaning\/fundamental-meaning\/#Managing_Patterns\">Managing Patterns<\/a>.<\/li>\n<li>When you are done making the relevant training entries, click <b>Re-Run Utterance<\/b> to see if you have improved the intent to get a high confidence score.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/training.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13032 size-full alignnone\" src=\"\/wp-content\/uploads\/sites\/16\/training.jpg\" alt=\"\" width=\"949\" height=\"691\" \/><\/a><\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Train_with_FAQ\">Train with FAQ<\/span><\/h3>\n<p>In case you want the Bot to respond to user utterance with FAQs there are two ways to do it:<\/p>\n<ul>\n<li>set the terms, term configuration or classes from the FAQ page, train the KG and retest the utterance.<\/li>\n<li>add the utterance as an alternate question to the selected FAQ from the Knowledge Graph page, train the KG and retest the utterance.<\/li>\n<\/ul>\n<p><a href=\"\/docs\/bots\/nlp\/knowledge-graph\/\" target=\"_blank\" rel=\"noopener noreferrer\">Know more about Knowledge Graph Training<\/a>.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Mark_an_Incorrect_Match\">Mark an Incorrect Match<\/span><\/h3>\n<p>When a user input matches an incorrect task, do the following to match it with the right intent:<\/p>\n<ol>\n<li>Above the matched intent name, click the <b>Mark as incorrect match<\/b> link.<\/li>\n<li>It opens the Matched Intent drop-down list to select another intent.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/16\/mark-as-incorrect.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13024 size-full alignnone\" src=\"\/wp-content\/uploads\/sites\/16\/mark-as-incorrect.jpg\" alt=\"\" width=\"971\" height=\"219\" \/><\/a><\/li>\n<li>Select the corresponding intent for the user input and train the bot.<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<div class=\"w-post-elm post_navigation layout_simple inv_false\">\n\t<a class=\"post_navigation-item order_first to_prev\" href=\"https:\/\/developer.kore.ai\/v8-0\/docs\/bots\/test-your-bot\/talk-to-bot\/\"><\/p>\n<div class=\"post_navigation-item-arrow\"><\/div>\n<div class=\"post_navigation-item-meta\">Previous<\/div>\n<div class=\"post_navigation-item-title\"><span>Talk to Bot<\/span><\/div>\n<p><\/a><br \/><a class=\"post_navigation-item order_second to_next\" href=\"https:\/\/developer.kore.ai\/v8-0\/docs\/bots\/test-your-bot\/batch-testing\/batch-testing\/\"><\/p>\n<div class=\"post_navigation-item-arrow\"><\/div>\n<div class=\"post_navigation-item-meta\">Next<\/div>\n<div class=\"post_navigation-item-title\"><span>Batch Testing<\/span><\/div>\n<p><\/a><\/div>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"To make sure your bot responds to user utterances with related tasks, it is important that you test the bot with a variety of user inputs. Evaluating a bot with a large sample of expected user inputs not only provides insights into bot responses but also gives you a great opportunity to train the bot...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"class_list":["post-17929","post","type-post","status-publish","format-standard","hentry","category-test-your-bot"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/17929","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/comments?post=17929"}],"version-history":[{"count":19,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/17929\/revisions"}],"predecessor-version":[{"id":26297,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/17929\/revisions\/26297"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/media?parent=17929"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/categories?post=17929"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/tags?post=17929"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}