{"id":20055,"date":"2019-05-06T08:20:07","date_gmt":"2019-05-06T08:20:07","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=20055"},"modified":"2023-01-23T06:38:22","modified_gmt":"2023-01-23T06:38:22","slug":"traits","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/nlp\/traits\/","title":{"rendered":"Traits"},"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\r\n\t\t<\/div>\r\n\t<\/div>\r\n\n<p><span style=\"font-weight: 400\">In natural conversations, it is very common that a user provides background\/relevant information while describing a specific scenario. <\/span><strong>Traits<\/strong><span style=\"font-weight: 400\"> are specific entities, attributes, or details that the users express in their conversations. The utterance may not directly convey any specific intent, but the traits present in the utterance are used in driving the intent detection and bot conversation flows.<\/span><\/p>\n<p><span style=\"font-weight: 400\">For example, the utterance: <\/span><em><span style=\"font-weight: 400\">My flight is late and I will miss my connection<\/span><\/em><span style=\"font-weight: 400\"> because of it expresses two traits: <\/span><em><span style=\"font-weight: 400\">flight delay <\/span><\/em><span style=\"font-weight: 400\">and <\/span><em><span style=\"font-weight: 400\">emergency<\/span><\/em><span style=\"font-weight: 400\">. In this scenario, the utterance does not convey any direct intent. However, the presence of the <\/span><em><span style=\"font-weight: 400\">emergency<\/span><\/em><span style=\"font-weight: 400\"> trait is used to directly assign the conversation to a human agent.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The <\/span><strong>Traits <\/strong><span style=\"font-weight: 400\">feature of the XO Platform is aimed at identifying such characteristics present in user utterances and use them for intent detection and in customizing the VA definition using these characteristics.<\/span><\/p>\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>\n<h1><span class=\"ez-toc-section\" id=\"How_Traits_work\"><span style=\"font-weight: 400\">How Traits work<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">Traits are entities that can be extracted from user input, before intent recognition. They can be used in multiple scenarios<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">They are involved in Indirect entity extraction, e.g.: gender or age-specific words can be inferred from the text.&nbsp; A phrase such as: &ldquo;Seat in front of the plane with extra legroom&rdquo; implies, for example, a <\/span><em><span style=\"font-weight: 400\">First Class<\/span><\/em><span style=\"font-weight: 400\"> seat.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Traits can be used for intent recognition, using rules. Any rule match for intent will be considered a definitive match.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Traits can be identified based on keywords\/phrases and their synonyms. For Example, <\/span><strong>Trait-Color: Blue <\/strong><span style=\"font-weight: 400\">&ndash; &ldquo;Blue&rdquo;, &ldquo;Sapphire&rdquo;, &ldquo;Teal&rdquo;; <\/span><strong>Trait-Color-Red<\/strong><span style=\"font-weight: 400\"> &ndash; Red, Maroon, Crimson <\/span><strong>Trait-Status: NotWorking: <\/strong><span style=\"font-weight: 400\">&ldquo;doesn&rsquo;t work&rdquo;, &ldquo;switched off&rdquo;;&nbsp; <\/span><strong>Trait-Status:Working<\/strong><span style=\"font-weight: 400\">: &ldquo;working&rdquo;, &ldquo;turned on&rdquo;<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Traits can also be inferred from a keyword or specific phrase in the sentence. There is no obvious association between certain words in the sentence and the value of the entity, but rather you need the sentence as a whole to determine the value. For example, <\/span><strong>Trait-Greeting-Emotion: Positive <\/strong><span style=\"font-weight: 400\">&ndash; &ldquo;Good Morning&rdquo;, &ldquo;How are you&rdquo;;<\/span><strong>&nbsp; Trait-Greeting-Emotion: Negative<\/strong><span style=\"font-weight: 400\"> &ndash; &ldquo;I hate to say&rdquo;, &ldquo;I am not having trouble&rdquo;.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Configuring Traits involves:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Trait Definition<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Trait Association Rules<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Trait Detection<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">We will discuss these in detail throughout this article, but first, let us look at a use case for traits.<\/span><\/p>\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>\n<h1><span class=\"ez-toc-section\" id=\"Use_Case\"><span style=\"font-weight: 400\">Use Case<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">A Travel Planning VA might have an added requirement to book a flight based on the cost preference.<\/span><\/p>\n<p><span style=\"font-weight: 400\">You might have the following user utterance: <\/span><em><span style=\"font-weight: 400\">I am looking for a low-cost option to London, which<\/span><\/em><span style=\"font-weight: 400\"> must result in ordering the available flights and picking the lowest-priced ticket.<\/span><\/p>\n<p><span style=\"font-weight: 400\">This can be achieved by:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Adding a <\/span><em><span style=\"font-weight: 400\">Trait Type<\/span><\/em><span style=\"font-weight: 400\"> called <\/span><em><span style=\"font-weight: 400\">Flight Fare<\/span><\/em><span style=\"font-weight: 400\"> with <\/span><em><span style=\"font-weight: 400\">Trait Economy<\/span><\/em><span style=\"font-weight: 400\"> trained with the utterance <\/span><em><span style=\"font-weight: 400\">low cost.<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Adding a <\/span><em><span style=\"font-weight: 400\">Rule <\/span><\/em><span style=\"font-weight: 400\">for <\/span><em><span style=\"font-weight: 400\">book flight<\/span><\/em><span style=\"font-weight: 400\"> to be triggered in the presence of <\/span><em><span style=\"font-weight: 400\">Economy Trait.<\/span><\/em><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Add transition conditions in case <\/span><em><span style=\"font-weight: 400\">Trait Economy<\/span><\/em><span style=\"font-weight: 400\"> is present in the context.<\/span><\/li>\n<\/ul>\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>\n<h1><span class=\"ez-toc-section\" id=\"Trait_Definition\"><span style=\"font-weight: 400\">Trait Definition<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">To define Traits:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Select the VA that you want to work with,<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Go to <\/span><strong>Build &gt; Natural Language &gt; Training &gt; Traits<\/strong><\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161106\/open-traits.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-46423\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161106\/open-traits-1024x456.png\" alt=\"\" width=\"640\" height=\"285\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161106\/open-traits-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161106\/open-traits-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161106\/open-traits.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-weight: 400\">Following are the key features to be considered while defining Traits:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><strong>Trait Type<\/strong><span style=\"font-weight: 400\"> is a collection of related traits like <\/span><em><span style=\"font-weight: 400\">Travel Class<\/span><\/em><span style=\"font-weight: 400\"> in the above example.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Trait Type can be <\/span><em><span style=\"font-weight: 400\">ML Based<\/span><\/em><span style=\"font-weight: 400\"> or <\/span><em><span style=\"font-weight: 400\">Pattern Based<\/span><\/em><span style=\"font-weight: 400\">. Each trait of a trait type can be trained using words, phrases, utterances, or patterns based on the type. <\/span><strong>Manage<\/strong><span style=\"font-weight: 400\"> Trait Type allows you to define the training configuration. <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/nlp\/traits\/#The_ML_Model_for_Traits\">See below<\/a> for ML-based trait configuration.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">A <em>Trait Type<\/em> can have one or more <em>Traits<\/em>.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161119\/trait-type-config.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-46432\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161119\/trait-type-config-1024x414.png\" alt=\"\" width=\"640\" height=\"259\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161119\/trait-type-config-1024x414.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161119\/trait-type-config-300x121.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161119\/trait-type-config.png 1661w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/><\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><strong>Traits<\/strong> <strong>names <\/strong><span style=\"font-weight: 400\">should be unique in a group. But traits with the same name can be present in multiple groups.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">For ML-based Traits, you can define the words, phrases, or utterances that identify the trait. One trait per trait type is detected for ML-based trait types.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">For Pattern-based Traits, you can define the patterns associated with the given trait. There is a possibility of multiple traits getting detected for pattern-based trait types. Ordering of Traits within the Trait Type signifies the importance of a trait in a trait type and detects only one trait.<\/span><\/li>\n<\/ol>\n<\/li>\n<p><b>Note<\/b>: The latest version of the Platform supports a <b>new patterns engine flag<\/b> for performance optimization. It offers better response times for pattern evaluation after the virtual assistant training is done.<\/p>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Once added, <\/span><strong>Train<\/strong><span style=\"font-weight: 400\"> the assistant for the Traits to be detected from user utterances.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161111\/train-va-traits.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-46426\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161111\/train-va-traits-1024x456.png\" alt=\"\" width=\"640\" height=\"285\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161111\/train-va-traits-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161111\/train-va-traits-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161111\/train-va-traits.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><span style=\"font-weight: 400\"><br \/><\/span><\/li>\n<\/ol>\n<table style=\"background-color: #fffbea;width: 100%\" width=\"100%\">\n<tbody>\n<tr>\n<td width=\"100%\">\n<strong>Notes<\/strong><span style=\"font-weight: 400\">:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">You can add language-specific traits in the case of multi-lingual assistants.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">When a trait name is modified, ensure that all the rules defined using that trait are corrected. This has to be done manually, the Platform will not handle it automatically.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The trait name must be unique in a group.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Traits with the same name can be present in multiple groups, but distinguishing them in trait rules or trait detection results is difficult.<\/span><\/li>\n<\/ol>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\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>\n<h1><span class=\"ez-toc-section\" id=\"The_ML_Model_for_Traits\"><span style=\"font-weight: 400\">The ML Model for Traits<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">When choosing to train traits using the ML model, by default, the <\/span><em><span style=\"font-weight: 400\">n-gram model<\/span><\/em><span style=\"font-weight: 400\"> is used. An <\/span><em><span style=\"font-weight: 400\">n-gram<\/span><\/em><span style=\"font-weight: 400\"> is the contiguous sequence of words used from training sentences to train the model. But this might not be effective when the corpus is very less or when the training sentences, in general, contain fewer words.<\/span><\/p>\n<p><span style=\"font-weight: 400\">From v8.0 of the platform, an option is included to skip or use the n-gram model. Further, the option to parameterize the <\/span><em><span style=\"font-weight: 400\">n-gram<\/span><\/em><span style=\"font-weight: 400\"> algorithm is included.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">When the <\/span><strong>n-gram<\/strong><span style=\"font-weight: 400\"> option is selected, you can configure the <\/span><em><span style=\"font-weight: 400\">n-gram Sequence Length<\/span><\/em><span style=\"font-weight: 400\"> by setting the <\/span><em><span style=\"font-weight: 400\">maximum value<\/span><\/em><span style=\"font-weight: 400\"> of the n-gram. It is set to 1 by default and can be configured to any integer value between 1 and 5.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">When <\/span><strong>skip-gram<\/strong><span style=\"font-weight: 400\"> is selected, you can configure<\/span><\/li>\n<ul>\n<li style=\"font-weight: 400\"><em><span style=\"font-weight: 400\">Sequence Length<\/span><\/em><span style=\"font-weight: 400\"> specifying the number of words to be included in a non-consecutive sequence. It is set to 2 by default and it can take any integer value between 2 and 4.<\/span><\/li>\n<li style=\"font-weight: 400\"><em><span style=\"font-weight: 400\">Maximum Skip Distance <\/span><\/em><span style=\"font-weight: 400\">for the number of words that can be skipped to form a non-consecutive sequence of words. This value is set to 1 by default and can take any integer value from 1 to 3.<\/span><\/li>\n<\/ul>\n<\/ul>\n<table style=\"background-color: #fffbea;width: 100%\" width=\"100%\">\n<tbody>\n<tr>\n<td width=\"100%\">\n<p><strong><em>Note<\/em><\/strong><em><span style=\"font-weight: 400\">: While the settings are same for all languages (in case of multilingual bot), for some languages like Chinese and Korean sequence of characters from grams and for other (Latin-based) languages are word grams.<\/span><\/em><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\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>\n<h2><span class=\"ez-toc-section\" id=\"Trait_Association_Rules\"><span style=\"font-weight: 400\">Trait Association Rules<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">Trait Rules define Dialog Execution and Knowledge Graph Intent detection.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Dialog_Execution\"><span style=\"font-weight: 400\">Dialog Execution<\/span><\/span><\/h3>\n<p><em><span style=\"font-weight: 400\">Intent detection<\/span><\/em><span style=\"font-weight: 400\"> or <\/span><em><span style=\"font-weight: 400\">Dialog execution<\/span><\/em><span style=\"font-weight: 400\"> is achieved using traits, along with the ML utterances and patterns. To achieve this, intent must be associated with the required traits by adding <\/span><strong>Rules<\/strong><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><span style=\"font-weight: 400\">There are multiple ways to add rules:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the Traits section using the <\/span><strong>Add New Rule<\/strong><span style=\"font-weight: 400\"> link.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161044\/add-new-rule.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-46411\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161044\/add-new-rule-1024x265.png\" alt=\"\" width=\"640\" height=\"166\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161044\/add-new-rule-1024x265.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161044\/add-new-rule-300x78.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161044\/add-new-rule.png 1921w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the Intent Node using the <\/span><strong>Rules<\/strong><span style=\"font-weight: 400\"> section under the <\/span><strong>NLP Properties<\/strong><span style=\"font-weight: 400\">.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161057\/add-rules-intent-node.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-46417\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161057\/add-rules-intent-node-1024x456.png\" alt=\"\" width=\"640\" height=\"285\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161057\/add-rules-intent-node-1024x456.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161057\/add-rules-intent-node-300x134.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161057\/add-rules-intent-node.png 1922w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><span style=\"font-weight: 400\"><br \/><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">From the <\/span><strong>Rules<\/strong><span style=\"font-weight: 400\"> tab for a given <\/span><strong>Intent<\/strong><span style=\"font-weight: 400\">, under <\/span><strong>Build &gt; Natural Language &gt; Training<\/strong><span style=\"font-weight: 400\">.<br \/><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161049\/add-rules-from-intent-nlp.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-46414\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161049\/add-rules-from-intent-nlp-1024x384.png\" alt=\"\" width=\"640\" height=\"240\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161049\/add-rules-from-intent-nlp-1024x384.png 1024w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161049\/add-rules-from-intent-nlp-300x112.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161049\/add-rules-from-intent-nlp.png 1901w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><br \/><\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">Each rule can have one or more conditions with AND as the operator. Multiple trait rules can be defined for a given intent and the intent is considered as a definite match if any one of the rules matches.<\/span><\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Knowledge_Graph_Intents\"><span style=\"font-weight: 400\">Knowledge Graph Intents<\/span><\/span><\/h3>\n<p><span style=\"font-weight: 400\">The Knowledge Graph can also be part of the discovery process using Traits. For this, each term or node can be associated with a trait. A given term can be associated with a single Trait.<\/span><\/p>\n<p><span style=\"font-weight: 400\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161102\/kg-traits.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-46420\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161102\/kg-traits.png\" alt=\"\" width=\"494\" height=\"417\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161102\/kg-traits.png 1002w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161102\/kg-traits-300x253.png 300w\" sizes=\"auto, (max-width: 494px) 100vw, 494px\" \/><\/a><\/span><\/p>\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>\n<h1><span class=\"ez-toc-section\" id=\"Trait_Detection\"><span style=\"font-weight: 400\">Trait Detection<\/span><\/span><\/h1>\n<p><span style=\"font-weight: 400\">Only one trait from a group (trait type) will be detected and is considered as a definite match.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Traits detected are included in the context object. The context is populated with unique traits identified (without reference to trait type). This information can be used in:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Intent identification<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Dialog transition<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Entity population<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">VA definitions<\/span><\/li>\n<\/ul>\n<p><em><span style=\"font-weight: 400\">Batch Testing<\/span><\/em><span style=\"font-weight: 400\"> reports also include information about traits detected as do the <\/span><em><span style=\"font-weight: 400\">Find Intent API<\/span><\/em><span style=\"font-weight: 400\">.<\/span><\/p>\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>\n<h2><span class=\"ez-toc-section\" id=\"Intent_Detection\"><span style=\"font-weight: 400\">Intent Detection<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">The Ranking and Resolver gets input from the three NL engines and Traits to analyze and come up with the possible\/definitive matches.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">The intent is considered as a definite match only if all the traits (one in the case of Knowledge Graph) present in a trait rule are detected.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">NL Analysis includes information on traits detected and the NLP Flow shows the information about traits detected.<\/span><span style=\"font-weight: 400\"><br \/><\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\"><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161122\/utterance-testing-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-46435\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161122\/utterance-testing-2.png\" alt=\"\" width=\"640\" height=\"461\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161122\/utterance-testing-2.png 891w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161122\/utterance-testing-2-300x216.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/span><\/p>\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>\n<h2><span class=\"ez-toc-section\" id=\"Dialog_Transition\"><span style=\"font-weight: 400\">Dialog Transition<\/span><\/span><\/h2>\n<p><span style=\"font-weight: 400\">The Conversation Flow is controlled using Traits. For a Dialog, <\/span><strong>Connection Rules<\/strong><span style=\"font-weight: 400\"> are defined using the Trait Context. This is done from the <\/span><strong>Connection<\/strong><span style=\"font-weight: 400\"> tab under the <\/span><strong>Properties<\/strong><span style=\"font-weight: 400\"> Panel for the Dialog.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The Traits Context is accessed using <\/span><code><span style=\"font-weight: 400\">context.traits<\/span><\/code><span style=\"font-weight: 400\">. It returns an array of all traits matching the intent, hence the condition to be used is &lsquo;<\/span><em><span style=\"font-weight: 400\">contains&rsquo;<\/span><\/em><span style=\"font-weight: 400\">.<\/span><\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161115\/traits-transition-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-46429\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161115\/traits-transition-1.png\" alt=\"\" width=\"459\" height=\"567\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161115\/traits-transition-1.png 459w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20220929161115\/traits-transition-1-243x300.png 243w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/a><\/p>\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>[vc_raw_html]JTNDZGl2JTIwY2xhc3MlM0QlMjJ3LXBvc3QtZWxtJTIwcG9zdF9uYXZpZ2F0aW9uJTIwbGF5b3V0X3NpbXBsZSUyMGludl9mYWxzZSUyMiUzRSUwQSUzQ2ElMjBjbGFzcyUzRCUyMnBvc3RfbmF2aWdhdGlvbi1pdGVtJTIwb3JkZXJfZmlyc3QlMjB0b19wcmV2JTIyJTIwaHJlZiUzRCUyMiUyRmRvY3MlMkZib3RzJTJGbmxwJTJGa25vd2xlZGdlLWdyYXBoJTJGJTIyJTNFJTNDJTJGcCUzRSUwQSUzQ2RpdiUyMGNsYXNzJTNEJTIycG9zdF9uYXZpZ2F0aW9uLWl0ZW0tYXJyb3clMjIlM0UlM0MlMkZkaXYlM0UlMEElM0NkaXYlMjBjbGFzcyUzRCUyMnBvc3RfbmF2aWdhdGlvbi1pdGVtLW1ldGElMjIlM0VQcmV2aW91cyUyMFBvc3QlM0MlMkZkaXYlM0UlMEElM0NkaXYlMjBjbGFzcyUzRCUyMnBvc3RfbmF2aWdhdGlvbi1pdGVtLXRpdGxlJTIyJTNFJTNDc3BhbiUzRUtHJTIwRW5naW5lJTNDJTJGc3BhbiUzRSUzQyUyRmRpdiUzRSUwQSUzQ3AlM0UlM0MlMkZhJTNFJTNDYnIlMjAlMkYlM0UlMEElM0NhJTIwY2xhc3MlM0QlMjJwb3N0X25hdmlnYXRpb24taXRlbSUyMG9yZGVyX3NlY29uZCUyMHRvX25leHQlMjIlMjBocmVmJTNEJTIyJTJGZG9jcyUyRmJvdHMlMkZubHAlMkZ0cmFpbmluZy12YWxpZGF0aW9ucyUyRiUyMiUzRSUzQyUyRnAlM0UlMEElM0NkaXYlMjBjbGFzcyUzRCUyMnBvc3RfbmF2aWdhdGlvbi1pdGVtLWFycm93JTIyJTNFJTNDJTJGZGl2JTNFJTBBJTNDZGl2JTIwY2xhc3MlM0QlMjJwb3N0X25hdmlnYXRpb24taXRlbS1tZXRhJTIyJTNFTmV4dCUyMFBvc3QlM0MlMkZkaXYlM0UlMEElM0NkaXYlMjBjbGFzcyUzRCUyMnBvc3RfbmF2aWdhdGlvbi1pdGVtLXRpdGxlJTIyJTNFJTNDc3BhbiUzRVRyYWluaW5nJTIwVmFsaWRhdGlvbnMlM0MlMkZzcGFuJTNFJTNDJTJGZGl2JTNFJTBBJTNDcCUzRSUzQyUyRmElM0UlM0MlMkZkaXYlM0U=[\/vc_raw_html]<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":"In natural conversations, it is very common that a user provides background\/relevant information while describing a specific scenario. Traits are specific entities, attributes, or details that the users express in their conversations. The utterance may not directly convey any specific intent, but the traits present in the utterance are used in driving the intent detection...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-20055","post","type-post","status-publish","format-standard","hentry","category-nlp"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/20055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=20055"}],"version-history":[{"count":30,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/20055\/revisions"}],"predecessor-version":[{"id":52327,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/20055\/revisions\/52327"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=20055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=20055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=20055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}