{"id":18053,"date":"2018-06-06T07:52:24","date_gmt":"2018-06-06T07:52:24","guid":{"rendered":"https:\/\/developer.kore.ai\/v9-0\/?post_type=docs&#038;p=14314"},"modified":"2021-05-10T10:55:12","modified_gmt":"2021-05-10T09:55:12","slug":"additional-notes-nlp-settings-guidelines","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v9-0\/docs\/bots\/nlp\/additional-notes-nlp-settings-guidelines\/","title":{"rendered":"NLP Settings and Guidelines"},"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<h3><span class=\"ez-toc-section\" id=\"Intent_Naming_Guidelines\">Intent Naming Guidelines<\/span><\/h3>\n<p>Follow the below guidelines when naming your task (intent identifier):<\/p>\n<ul>\n<li>Use an action verb, an object, and possibly a modifier (placed before or after the object). Typically, an intent name consists of 2 to 4 words.<\/li>\n<li>Use less than 5 words to convey the purpose of the task.<\/li>\n<li>Use the same verb in different tasks if the action is similar (For example, Show Issue\/Show Report instead of Show Issue\/Get Report).<\/li>\n<li>Avoid single-word actions.<\/li>\n<li>Avoid determiners (the, a, my, that, etc.)<\/li>\n<li>Avoid digits but if you cannot, always use the numerical form.<\/li>\n<li>Avoid Kore.ai platform terms such as task, alert, action, cancel, discard, amend, and webhook.<\/li>\n<li>Avoid using a potential entity in an intent name (For example, Get Weather Today, where today is a potential entity).<\/li>\n<li>Don\u2019t use special characters such as () &amp; \/ \\ $ [ ] + *.<\/li>\n<li>Don\u2019t use punctuation such as &#8211; , . ! ? \u2018 \u201c.<\/li>\n<li>Don\u2019t use pronouns (i.e. Show Me All Issues)<\/li>\n<li>Don\u2019t use terms related to the bot name (For example, Create Asana Task).<\/li>\n<li>Don\u2019t use a word both as a verb and as a noun (For example, Update Issue\/Get Updates).<\/li>\n<li>For List of Items entity type, do not have the combination of following characters while defining synonyms &#8211; (), %, \u00b0 (degree symbol for degrees i.e. 30\u00b0C).<\/li>\n<\/ul>\n<p>On-demand tasks (Actions, Dialog, Information tasks) must always contain an action verb, an object, and possibly a modifier (placed before or after the object). You must map almost all actions to the form <em>how + what<\/em> and complete the sentence <em>the goal is to<\/em>:<\/p>\n<ul>\n<li>Do Something<\/li>\n<li>Get Status<\/li>\n<li>Send Detailed Report<\/li>\n<li>Email Report Critical<\/li>\n<li>Get 3 Day Forecast<\/li>\n<\/ul>\n<p>Alerts must contain an object and possibly a modifier (placed before or after the object). Avoid using verbs in alert altogether. Avoid using the word <em>alert<\/em> in an alert name. Alerts must be mapped to the form <em>what<\/em> and complete the sentence <em>alert me on:<\/em><\/p>\n<ul>\n<li>Something<\/li>\n<li>Status Updates<\/li>\n<li>Critical Status Update<\/li>\n<li>Changes<\/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<h3 id=\"patterns\"><span class=\"ez-toc-section\" id=\"Patterns\">Patterns<\/span><\/h3>\n<p>While using synonyms is great for words used in the name, users may sometimes refer to a task using slang, metaphors, or other idiomatic expressions.<\/p>\n<p>For example, a task name might be <em>Get Current Weather<\/em>, but the user inputs,<em> What\u2019s happening with today\u2019s rain situation<\/em>. In such cases, none of the words used in the task name are used, yet the input has the same meaning. To optimize the accuracy and recognition of the NLP interpreter for your bots, you can create patterns.<\/p>\n<p>When the <a href=\"https:\/\/kore.ai\/platform\/design-and-build\/natural-language-processing\/\" rel=\"noopener noreferrer\" target=\"_blank\">NLP<\/a> interpreter matches a synonym to one task or field, and a pattern to a different task or field, the pattern match is prioritized and used for recognition over the synonym match.<\/p>\n<div class=\"alert alert-info\"><b>Note<\/b>: Patterns are evaluated in the order of their listing. So ensure when adding patterns, add in the order of most restrictive to least restrictive.<\/div>\n<div class=\"alert alert-info\">The following are some general guideline for creating intent patterns:<\/div>\n<ul>\n<li>Use a minimum of 3 words.<\/li>\n<li>Use words in their canonical forms (i.e. infinitive verbs, singular nouns).<\/li>\n<li>Use lowercase both for words and their synonyms.<\/li>\n<li>Use the US spelling of words (i.e. <em>normalize<\/em> instead of <em>normalise<\/em>).<\/li>\n<li>Avoid using determiners and pronouns (the, a, my, that).<\/li>\n<li>Avoid using digits.<\/li>\n<li>Avoid using entity values in defining a task pattern.<\/li>\n<li>Don\u2019t use elision (i.e. what\u2019s ).<\/li>\n<li>Don\u2019t use special characters such as () &amp; \/ \\ $ [ ] + *.<\/li>\n<li>Don\u2019t use punctuation such as &#8211; , . ! ? \u2018 \u201c.<\/li>\n<\/ul>\n<p>For a quick guide towards the usage of patterns, refer to <a href=\"\/v9-0\/v9-0\/docs\/bots\/how-tos\/how-to-use-patterns-for-intents-entities\/\">How to use Patterns<\/a>.<\/p>\n<h4 id=\"pat_ops\">Pattern Operators<\/h4>\n<ul>\n<li><b>AND: ( X Y )<\/b>: An ordered relationship of words in sequence. This is the default setting. i.e. when you specify a pattern as <em>cancel order<\/em> it is the same as <em>(cancel order)<\/em>.<br \/>For example, <i>(Cancel Order)<\/i> matches <em>Cancel my phone order<\/em> but doesn\u2019t match <em>I have a pending order for an iPhone X, can I cancel<\/em>. Bot Builder tool uses patterns with increasing numbers of wildcards between words (up to 3 for an intent). So a pattern of <em>Cancel Order<\/em> can match:\n<ul>\n<li>cancel order<\/li>\n<li>cancel my order<\/li>\n<li>cancel that last order<\/li>\n<li>cancel last weeks big order<\/li>\n<\/ul>\n<\/li>\n<li><b>OR: [X Y Z]<\/b>: Any of these can be interchangeably used in the user utterance. For example, ([get make] me [food drink dessert]) will match any of the below utterances:\n<ul>\n<li>Get me food<\/li>\n<li>Make me a drink<\/li>\n<li>Get me a drink<\/li>\n<li>Get me a dessert<\/li>\n<li>Make me some quick food<\/li>\n<\/ul>\n<\/li>\n<li><b>NOT: !X<\/b>: Words that should not appear in the user utterance for an intent match. For example, (!forecast) is marked as a pattern for intent named <em>Get current weather<\/em> and the bot supports another intent called <em>Get 3-day weather forecast.<\/em>\n<ul>\n<li>User utterance: <em>Planning a trip to California get me the forecast<\/em>\n<ul>\n<li>will not match <em>Get current weather<\/em><\/li>\n<li>will match <em>Get 3-day weather forecast<\/em><br \/>Note that the <em>!word<\/em> means <em>not after this point<\/em>. So (!forecast the weather) and (get the weather !forecast) are different. The utterance <em>get the forecast for the weather<\/em>\u00a0matches the second but not the first.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li><b>Optional: {X}<\/b>: For example, {phone} If the user utterance is <em>Get me a phone number<\/em> or <em>get me a number<\/em>\u00a0the platform will treat it equally.<\/li>\n<li><strong>Enforce Phrase:<\/strong> X_Y: To enforce occurrence of the phrase as is in the user utterance, without any words in between. For example, transfer_funds. The utterance <em>transfer funds<\/em> or <em>I want to transfer funds<\/em> will match but not <em>Can I transfer some funds<\/em>.<\/li>\n<li><b>Concepts: ~<\/b>: Platform has a large set of inbuilt concepts that developers can use to define a pattern. For example, (I [like love] ~world_country) will match\n<ul>\n<li>I like India<\/li>\n<li>I love traveling to Australia<\/li>\n<li>I would like to visit an African country<\/li>\n<\/ul>\n<\/li>\n<li><b>Unordered: &lt;&lt;, &gt;&gt;<\/b>: Used to find words in any order. For example, &lt;&lt;Cancel Order&gt;&gt; matches <i>Cancel my phone order<\/i> and also <i>I have a pending order for an iPhone X, can I cancel<\/i><\/li>\n<li><b>Start\/End of Statement: &lt;, &gt;:<\/b> For example, ( <em>transfer fund &gt;<\/em> ) will match <i>I want to <em>transfer funds<\/em><\/i> but will not match <em>transfer funds today.<\/em><\/li>\n<li><b>Quote: \u2018 &#8211;<\/b>: If you quote words or use words that are not in canonical form, the system will restrict itself to what you used in the pattern. For example, (<em>like to transfer funds<\/em>) This matches <em>I would like to transfer funds from my account<\/em> but not <em>I really liked transfer funds process<\/em>.<\/li>\n<\/ul>\n<h4>Entity Patterns<\/h4>\n<p>As above, to detect entities, developers can use a combination of entity patterns and NER training. Entity patterns guide Kore as to where to look for a valid value for the entity. It is possible for an entity pattern to be found in several places in a sentence and Kore will extract the value from the first instance that has a valid value. Apart from the task pattern guidelines above, follow the below guideline for entity patterns:<\/p>\n<ul>\n<li>Include the positional wildcard * that indicates the expected position of the entity ( i.e. (from * to), (in * &gt;)); without it the pattern is invalid.<\/li>\n<li>Use words that should be present in the pattern before and after the position of the entity. Words after the positional wildcard help to delimit the search range for a valid entity value.<\/li>\n<li>Use start and end of sentence symbols (&lt; and &gt;) to separate the positional wildcard, but these are not strictly necessary because the Bot Builder tool does not cross a sentence boundary to extract an entity value (except for a Description).<\/li>\n<li>Don\u2019t use other positional wildcards in your field pattern. All field patterns are processed in the same way and all other positional wildcards except one are ignored.<\/li>\n<li>Don\u2019t use field names or their synonyms in patterns entity patterns. Only consider up to two wildcard words between the specified words.<\/li>\n<\/ul>\n<p><strong>Examples<\/strong><\/p>\n<p>Following are some examples of entity patterns to recognize <em>from<\/em> and <em>to<\/em> account number for the intent <em>transfer funds<\/em>.<br \/><a href=\"#pat_ops\">Pattern operators<\/a> defined above can be applied to entity patterns also.<\/p>\n<ul>\n<li><strong>Pattern<\/strong>: word1 *n &#8211; up to n words after the occurrence of word1<br \/>pattern for entity ToAccount &#8211;\u00a0 <em>to *1<\/em><br \/>ToAccount captured from user utterance <em>transfer funds to ABC123 <\/em>but not from <em>transfer funds for ABC123.<\/em><\/li>\n<li><strong>Pattern<\/strong>: word1 * word2 or word1 word2 *n &#8211; multiple entities from a user utterance.<br \/>patterns for entity ToAccount &#8211;\u00a0 <em>to * from<\/em>, and <em>from to *1.<\/em><br \/>patterns for entity FromAccount &#8211;\u00a0 <em>from * to <\/em>and <em>to from *1.<\/em><br \/>ToAccount &amp; FromAccount captured from user utterance <em>transfer funds from XYZ321 to ABC123<\/em> and <em>transfer funds to ABC123 from XYZ321<\/em> but not from <em>transfer funds for ABC123 using XYZ321.<\/em><br \/>Note: when multiple patterns are entered for an entity, a match of either one will be taken.<\/li>\n<li><strong>Pattern<\/strong>: [ word1 word2 ] *n &#8211; match against any one word or phrase as defined within [&#8230;].<br \/>pattern for entity ToAccount &#8211;\u00a0 <em>to *1.<\/em><br \/>pattern for entity FromAccount &#8211;\u00a0 <em>[ using <\/em><em>from ] *1.<\/em><br \/>ToAccount &amp; FromAccount captured from user utterance <em>transfer funds from XYZ321 to ABC123<\/em> and <em>transfer funds to ABC123 using XYZ321<\/em> but not from <em>transfer funds for ABC123 using XYZ321.<\/em><\/li>\n<li><strong>Pattern<\/strong>: ~concept *n &#8211; pattern built using concepts.<br \/>pattern for entity ToAccount &#8211;\u00a0 <em>to *1.<\/em><br \/>the pattern for entity FromAccount &#8211;\u00a0 <em>~from<\/em><em> *1<\/em>\u00a0wherefrom<em>\u00a0<\/em>is a concept as (using) (from)<br \/>ToAccount &amp; FromAccount captured from user utterance <em>transfer funds from XYZ321 to ABC123<\/em> and <em>transfer funds to ABC123 using XYZ321<\/em> but not from <em>transfer funds for ABC123 using XYZ321.<\/em><\/li>\n<\/ul>\n<p>For more information on how to add patterns, refer to <a href=\"https:\/\/developer.kore.ai\/v9-0\/v9-0\/v9-0\/docs\/bots\/bot-builder-tool\/train-nlp-optimization\/fundamental-meaning\/fundamental-meaning\/#Managing_Patterns\">Managing Patterns<\/a>.<\/p>\n<h4>Negative Patterns<\/h4>\n<p>Negative patterns are used to eliminate intents detected by the Fundamental Meaning or Machine Learning models.<\/p>\n<p>For example, a user says <em>I was trying to Book a Flight when I faced an issue<\/em>. Though the machine identifies the intent as <em>Book a Flight<\/em>, that is not what the user wants to do. In such a case, defining <em>was trying to * <\/em>as a negative pattern, would ensure that the matched intent is ignored.<\/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<h3 id=\"synonyms\"><span class=\"ez-toc-section\" id=\"Synonyms\">Synonyms<\/span><\/h3>\n<p>Synonyms must be used when the words used to identify an intent\/entity are used interchangeably. Synonyms are defined for both intents and entities.<\/p>\n<p>Each intent has a name. For example, if your intent name is <em>Guided Search<\/em>. There are many synonyms that a user might enter to start this task, <em>such as browse products,<\/em> \u201cShow me makeup, or show me products.<\/p>\n<p>As a developer, you must limit the name of a task to only two or three words. And then consider synonyms for each of those words.<\/p>\n<p>Example<\/p>\n<ul>\n<li>Browse \u2013 Find, Search<\/li>\n<li>Product \u2013 Makeup, Goods, Kit<\/li>\n<\/ul>\n<p>Also consider misspellings, such as:<\/p>\n<ul>\n<li>makeup \u2013 make up<\/li>\n<\/ul>\n<p>Synonyms must be ideally defined only for words defined as part of the task name. The synonyms added at the bot level are applicable for all the tasks, i.e. when a developer adds a synonym for a word in Task A, those synonyms are also used for any other tasks with the same words in the task name. For example, synonyms defined for the word browse in the <i> Guided Search<\/i> are also used for the <i>Keyword Search<\/i>. Synonyms can (and should) be used to increase the number of variations that we expect from a user requesting an intent. They supplement existing intent name with alternative wording, while not being so generic as to match everything. Remember that synonyms are unidirectional so foo=bar does not mean bar=foo.<\/p>\n<p>The general guideline for Synonyms:<\/p>\n<ul>\n<li>Use words in their canonical forms (i.e. infinitive verbs, singular nouns).<\/li>\n<li>Use lowercase both for words and their synonyms.<\/li>\n<li>Keep synonym phrases to less than 5 words.<\/li>\n<li>Use the US spelling of words (i .e. <em>normalize<\/em> instead of <em>normalize<\/em>).<\/li>\n<li>Use intent over meaning (i .e. <em>get<\/em> is a good synonym for <em>show<\/em> if the context of the action means <em>find and display<\/em>).<\/li>\n<li>Don\u2019t add synonyms to determiners or pronouns (the, a, my, that, etc.).<\/li>\n<li>Don\u2019t use a synonym that could match in two conflicting tasks.<\/li>\n<li>Don\u2019t use special characters such as () &amp; \/ \\ $ [ ] + *.<\/li>\n<li>Don\u2019t use punctuation such as &#8211; , . ! ? \u2018 \u201c.<\/li>\n<li>Don\u2019t assign synonyms to multiple words (For example, this is wrong: wrong, bad).<\/li>\n<li>Don\u2019t add synonyms to digits.<\/li>\n<li>Don\u2019t use the phrasal form (i.e. don\u2019t use <em>lookup<\/em> as a synonym; simply use <em>look<\/em>).<\/li>\n<li>Don\u2019t abbreviate to less than 2 letters.<\/li>\n<\/ul>\n<h4>Synonym Operations<\/h4>\n<p>A match between the user input and synonym for entity (only for List of Values and Lookup types) identification can occur in one of the following ways:<\/p>\n<ul>\n<li><strong>Partial Match<\/strong> &#8211; This is the default behavior whereby one or more words in the input must match one or more words for a given synonym. For example, the user utterance <em>debit card<\/em>\u00a0will match the synonym <em>credit card.<\/em><\/li>\n<li><strong>Exact Match<\/strong> &#8211; Here the input must contain all the words for a given synonym. For example, an add-on <em>credit card<\/em> will match a <em>credit card<\/em>. But <em>debit cards<\/em> will not match <em>credit cards<\/em>. To trigger an exact match, the synonym must be enclosed within double-quotes.<\/li>\n<li><strong>Full Match<\/strong> &#8211; The entire input must exactly match a given synonym word. For example, a <em>credit card<\/em> should match &lt;credit card&gt; but <em>my credit card<\/em> should NOT match &lt;credit card&gt;. Similarly, a <em>credit card<\/em> should not match &lt;my credit card&gt;. To trigger an exact match, the synonym must be enclosed within angular brackets.<\/li>\n<li><strong>Canonical Form Match<\/strong> &#8211; This is the default behavior wherein the user input is matched with the synonym or its canonical form. For example, <em>check my balance<\/em> will match with the synonym <em>checking account<\/em> since the check is the canonical form of checking. To disable this behavior, prefix the synonym with a single apostrophe as\u00a0<em>checking<\/em>. (post v7.1)<\/li>\n<\/ul>\n<div class=\"alert alert-info\"><b>Note: <\/b>Synonyms can be added to identify intents as well as entities. Entity identification is triggered only after an Intent is identified.<\/div>\n<div class=\"alert alert-info\">For more information on how to add synonyms, refer to <a href=\"\/v9-0\/v9-0\/docs\/bots\/bot-builder-tool\/train-nlp-optimization\/fundamental-meaning\/fundamental-meaning\/#Managing_Synonyms\">Managing Synonyms<\/a>.<\/div>\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=\"Concepts\">Concepts<\/span><\/h3>\n<p>Concepts are clusters of related and synonymous terms that you want to be considered as a group identified by a single term.<\/p>\n<p>Allowed concept naming conventions:<\/p>\n<ul>\n<li>Must have ~ as a prefix<\/li>\n<li>Allowed characters in concept name are:\n<ul>\n<li>a to z and A-Z<\/li>\n<li>1 to 9<\/li>\n<li>_ (underscore)<\/li>\n<\/ul>\n<\/li>\n<li>At least one alphabet must follow the ~.<\/li>\n<li>Must not start or end with a _ (underscore).<\/li>\n<li>These are case insensitive. i.e ~myConcept is the same as ~myconcept<\/li>\n<\/ul>\n<p>Examples for allowed concept names:<\/p>\n<ul>\n<li>~my_concept<\/li>\n<li>~Sample<\/li>\n<li>~test123<\/li>\n<li>~my_new_concept<\/li>\n<\/ul>\n<p>Examples of invalid concepts names:<\/p>\n<ul>\n<li>~_concept<\/li>\n<li>~concept_<\/li>\n<li>~a-concept<\/li>\n<li>~123test<\/li>\n<\/ul>\n<p>You can also define custom concepts using emojis.<\/p>\n<p>For more information, refer to <a href=\"\/v9-0\/v9-0\/docs\/bots\/nlp\/fundamental-meaning\/#Custom_Concepts\">Custom Concepts<\/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<h3><span class=\"ez-toc-section\" id=\"Standard_Responses\">Standard Responses<\/span><\/h3>\n<p>Standard Responses are template messages that the platform uses to respond to specific situations during a conversation. Examples of these situations include resolution of ambiguous user inputs, requisition for authorization, obtaining confirmations, informing about interruptions and resumptions, and more. Standard Responses are categorized into the following:<\/p>\n<ul>\n<li>Statements<\/li>\n<li>Greetings<\/li>\n<li>Queries<\/li>\n<li>Errors &amp; Warning<\/li>\n<li>Questions and Choices<\/li>\n<\/ul>\n<p>While the platform does come with canned responses, developers are encouraged to customize these messages as well as additional variations.<\/p>\n<p>To provide a seamless end-user experience across the conversational journey, developers may have to review each of the Standard Responses to ensure that they fit the overall persona\/theme of the bot.<\/p>\n<p>Standard Responses can be plain text messages or can be generated through JavaScript to compose dynamic messages and templates for supported channels. Where applicable, Standard Responses support contextual tags that help the developer to customize the messages.<\/p>\n<p>For example, when a user requests what a bot can do, the bot responds with a message <em>Here are the tasks I can perform for you<\/em>. <em>&lt;list-of-tasks&gt;<\/em>. In this example, the developer may choose to modify this message and reuse the tag &lt;list-of-tasks&gt;where appropriate. These tags are replaced with the actual text context during the conversation with run-time values.<\/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<h3 id=\"KG\"><span class=\"ez-toc-section\" id=\"Knowledge_Graph\">Knowledge Graph<\/span><\/h3>\n<p>For executable tasks, the intent is identified based on either the task name (used in the Fundamental Meaning model) or machine learning utterances defined for a task. This approach is appropriate when a task can be distinctively identified from other tasks, using language semantics, and statistical probabilities derived from the machine learning model.<\/p>\n<p>In the case of FAQs, this approach may not fare well as most of the FAQs are similar to each other in terms of semantic variation, and will require additional intelligence about the domain to find a more appropriate answer.<\/p>\n<p>Kore.ai\u2019s Knowledge Graph-based model provides that additional intelligence required to represent the importance of key domain terms and their relationships in identifying the user\u2019s intent (in this case the most appropriate question).<\/p>\n<p>We will use the following two examples to explain the different configurations required to build a Knowledge graph.<\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: center\"><strong>Example A<\/strong><\/td>\n<td style=\"text-align: center\"><strong>Example B<\/strong><\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>Consider a bot trained with the following questions:<\/p>\n<ul>\n<li><i>A1: How to apply for a loan? <\/i><\/li>\n<li><i>A2: What is the process to apply for insurance? <\/i><\/li>\n<\/ul>\n<\/td>\n<td rowspan=\"2\">\n<p>Consider a bot trained with the following questions:<\/p>\n<ul>\n<li><i>B1: Can I open a joint account? <\/i><\/li>\n<li><i>B2: How do I add a joint account holder? <\/i><\/li>\n<li><i>B3: How can I apply for a checkbook? <\/i><\/li>\n<\/ul>\n<ul>\n<li><i>B4: How do I apply for a debit card?<\/i><\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The following are a few challenges with intent recognition using a typical model based on pure machine learning and semantic rules:<\/p>\n<ol>\n<li>Results obtained from machine learning-based models have a tendency to produce a false positive result if the user utterance has more matching terms with the irrelevant question.<\/li>\n<li>The model fails when the bot needs to comprehend based on domain terms and relationships. For example, the user utterance <em>What is the process to apply for a loan?<\/em> will incorrectly fetch A2 as a preferred match instead of A1. As A2 has more terms matching with user utterance than A1.<\/li>\n<li>This model fails to fetch the correct response if part of a question is stated in a connection with another question. Example, A: the user utterance <em>I have applied for a loan, can I get insurance<\/em> results in the ambiguity between A1 &amp; A2. Example B: User utterance <em>I have opened a joint account, can I have a debit card<\/em> will incorrectly match B1 over B4.<\/li>\n<\/ol>\n<p>In the Kore knowledge graph model, having all the questions at the root level is equivalent to using a model based on term frequency and semantic rules.<\/p>\n<h4>Key Domain Terms and their Relationship<\/h4>\n<p>Identifying key terms and their relationships is an important aspect of building ontology. Let us understand this using our sample Example A. Both A1 and A2 are about an application procedure, one talks about applying for a loan while the other talks about applying for insurance. So while creating an ontology, we can create a parent node <em>apply<\/em> with two child nodes as <em>loan<\/em> and <em>insurance<\/em>. Then A1 and A2 can be assigned as child nodes of <em>loan<\/em> and<em> insurance node<\/em> respectively.<\/p>\n<h5><strong>Representation of Knowledge Graph<\/strong><\/h5>\n<h5><strong>Example A<\/strong><\/h5>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/21\/Example-A.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14316\" src=\"\/wp-content\/uploads\/sites\/21\/Example-A.png\" alt=\"\" width=\"487\" height=\"234\" \/><\/a><br \/>\nSimilarly, in the case of Example B, the graph will be as below<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/21\/Example-B.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-14317\" src=\"\/wp-content\/uploads\/sites\/21\/Example-B.png\" alt=\"\" width=\"443\" height=\"441\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Capabilities_of_a_Graph_Engine\">Capabilities of a Graph Engine<\/span><\/h3>\n<ul>\n<li><b>Ease of Training using Synonyms<\/b>: Kore.ai\u2019s Knowledge Graph has a provision to associate synonyms against a graph node. This helps capture the variation in a question. For example, In <i>Example A <\/i>above<i>, a <\/i>user can put <em>get<\/em> as a synonym to <em>apply<\/em>.<\/li>\n<li><b>Better Coverage with Alternate Questions<\/b>: Knowledge Graph has a provision to add alternate questions. This helps us to capture the various ways a user might ask the same question. In Example B above, for the question <i>How do I add a joint account holder<\/i> we can add an alternate question as <i>Can I add my wife as a joint account holder.<\/i><\/li>\n<li><b>Improved Accuracy<\/b>: Ontology-driven question-answers reduce the possibility of false positives. For example, for the user utterance <i>What is the process to apply for SSN?<\/i>\u00a0a term frequency-based model will incorrectly suggest A2 as a match. An ontology-driven model has the capability to prevent such false positives.<\/li>\n<li><b>Weighing Phrases using Classes<\/b>: Kore.ai\u2019s graph engine has introduced a concept of classes for filtering out irrelevant suggestions. See the below section on classes for a detailed explanation<\/li>\n<li><b>Ability to Mark Term Importance<\/b>: Kore.ai\u2019s graph engine has a provision to mark an ontology term is important. For example, in the question, <i>How to apply for a loan<\/i>, <em>loan<\/em> is an important term. If a <em>loan<\/em> keyword is not present in the user utterance, then it makes little sense to fetch A1. Whereas in term frequency-based model a user utterance <em>How to apply for a<\/em>\u00a0will incorrectly fetch A1.<\/li>\n<li><b>Ability to Group Relevant Nodes<\/b>: As the graph grows in size, managing graph nodes can become a challenging task. Using the <em>organizer node<\/em> construct of the ontology engine, the bot developer can group relevant nodes under a node.<\/li>\n<\/ul>\n<h4>Knowledge Graph Traits<\/h4>\n<p><strong>Note<\/strong>: Traits replace Classes from v6.4 and before.<\/p>\n<p>When using trait ensure you use it judicially as over usage may result in false negatives. When using classes ensure:<\/p>\n<ul>\n<li>Good coverage of classes.<\/li>\n<li>Classes should not get generalized improperly.<\/li>\n<li>All the FAQs get tagged to mutually exclusive classes.<\/li>\n<\/ul>\n<p>Following is the example of how classes work: Let&#8217;s say we create a class called <i>Request<\/i> and add request related phrases to it. If the user says <i>I would like to get WebEx<\/i> and <i>I would like to get<\/i> is trained for the Request class, this FAQ is only considered across the Knowledge Graph paths where the word request is tagged with. This is a positive scenario. But if the user says <i>Can you help with getting WebEx?<\/i>, and we did not have similar utterances trained for the <i>Request <\/i>class, it gets tagged with <em>None<\/em> class, and this FAQ is only used with the paths where the word <i>request <\/i>isn\u2019t present. This results in a failure.<\/p>\n<p>Another possibility is that if the user says <i>I want to request help fixing WebEx<\/i>\u00a0and we have trained the<i> Request<\/i> class with some utterances having <i>I want to request<\/i>, and based on the training provided across all classes, the engine may generalize and tag this feature (phrase containing<i>Iwant to request<\/i> ) to the <i>Request <\/i>class. In this case, if the <i>Request <\/i>class is not present in the help path for WebEx, this results in failure of identifying the input against <strong>help<\/strong> &gt; <strong>WebEx<\/strong>.<\/p>\n<p>The cases where classes are useful is when we have a mutually exclusive set of FAQs. For example, if we have a set of FAQs for <i>Product issues <\/i>and also a set of FAQs for the <i>Process of buying a product<\/i>.<br \/>\nFAQs for <i>Process for buying a product<\/i>:<\/p>\n<ol>\n<li>How do I buy Microsoft Office online?<\/li>\n<li>What is the process for buying anti-virus software?<\/li>\n<\/ol>\n<p>FAQs for Product Issues:<\/p>\n<ol>\n<li>I am having issues installing software<\/li>\n<li>How to resolve an issue with antivirus<\/li>\n<\/ol>\n<p>When a user says <i>What is the process for fixing antivirus when it doesn&#8217;t work?<\/i>, the engine may find that this input is similar to both A2 and B2, and may present both of them as suggestions. We know that <i>Issue<\/i> is mutually exclusive to <i>buy<\/i>, and it does not make sense present <i>buy<\/i> related FAQs at all, in this case. The opposite (matching <i>Issue<\/i> FAQs for <i>buy <\/i>related question) may be a much bigger problem. To solve this, we will create two classes, one for type <i>issues <\/i>and another for <i>buy<\/i>. Every input is classified into either <i>buy<\/i> or <i>issue <\/i>and only the relevant questions will be used in finding an appropriate answer.<\/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<div class=\"w-post-elm post_navigation layout_simple inv_false\">\n<div class=\"post_navigation-item-arrow\"><\/div>\n<div class=\"post_navigation-item-meta\">Previous<\/div>\n<div class=\"post_navigation-item-title\">Fundamental Meaning<\/div>\n<p>&nbsp;<\/p>\n<div class=\"post_navigation-item-meta\"><\/div>\n<div class=\"post_navigation-item-title\"><\/div>\n<p>&nbsp;\n<\/p><\/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":"Intent Naming Guidelines Follow the below guidelines when naming your task (intent identifier): Use an action verb, an object, and possibly a modifier (placed before or after the object). Typically, an intent name consists of 2 to 4 words. Use less than 5 words to convey the purpose of the task. Use the same verb...","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-18053","post","type-post","status-publish","format-standard","hentry","category-nlp"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/posts\/18053","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/comments?post=18053"}],"version-history":[{"count":25,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/posts\/18053\/revisions"}],"predecessor-version":[{"id":27348,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/posts\/18053\/revisions\/27348"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/media?parent=18053"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/categories?post=18053"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v9-0\/wp-json\/wp\/v2\/tags?post=18053"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}