{"id":22994,"date":"2019-12-11T12:35:04","date_gmt":"2019-12-11T12:35:04","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=22994"},"modified":"2023-09-28T10:58:21","modified_gmt":"2023-09-28T09:58:21","slug":"how-to-use-patterns-for-intents-entities","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/how-tos\/how-to-use-patterns-for-intents-entities\/","title":{"rendered":"Using Patterns for Intents &amp; Entities"},"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>Using patterns can help to improve NLP interpreter accuracy.<\/p>\n<p>In this document, we will elaborate on the various pattern syntax and how they can be used in intent detection and entity extraction.<\/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><b>Things to Remember:<\/b><\/p>\n<ul>\n<li>Patterns are to be used as a last resort, only for cases where ML engine cannot be used. Examples of such cases would be to train bot in recognising idiomatic utterances, command like utterances.<\/li>\n<li>Patterns are evaluated in the order of their listing. Once a match is found the rest of the patterns are not evaluated. So ensure when adding patterns to add in the order of most restrictive to least restrictive.<\/li>\n<li>Only one wildcard (*) is allowed in a pattern.<\/li>\n<li>While most of the features are supported in all languages, there are some exceptions, <a href=\"\/docs\/bots\/how-tos\/multi-lingual-bot-behavior\/\" target=\"_blank\" rel=\"noopener noreferrer\">see here for more details<\/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<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\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=\"Patterns_for_Intent_Detection\">Patterns for Intent Detection<\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Following is a list of pattern syntax, along with examples, that can be configured for intent detection.<\/span><\/p>\n<p><b><i>Note<\/i><\/b><i><span style=\"font-weight: 400;\">: Pattern matching occurs in the canonical form of a sentence. Therefore, the words in a pattern should be in their canonical form.<\/span><\/i><\/p>\n<p>&nbsp;<\/p>\n<table>\n<thead>\n<tr>\n<th>Pattern<\/th>\n<th>Description<\/th>\n<th>Pattern Examples<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td width=\"15%\"><strong>word1<br \/>\nword2 &#8230;<br \/>\nwordn<\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">This mandates all the words defined to be available in the user utterance in the same consecutive order with upto 3 (language specific) additional words allowed between any two consecutive words mentioned in the pattern and infinite number of words before and after those specified set of words.<\/span><\/p>\n<p><b><i>Note: <\/i><\/b><i><span style=\"font-weight: 400;\">The three wildcard words are configurable as advanced NLP options<\/span><\/i><span style=\"font-weight: 400;\">.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">credit card limit<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">can you please let me know my credit card limit?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">What is the credit card limit for Priority customers?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 \u201c<em>I would like to know how to enhance my credit card with a new limit.<\/em><\/span><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">I want to know what the credit limit on my Priority Privilege Card is.<\/span><\/i><span style=\"font-weight: 400;\">\u201c<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">Can I enhance the credit limit after one year on my card?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">Will the credit card I\u2019m using be eligible for a limit increase next month?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong>word1_word2<\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">Compound words:\u00a0 A compound word is treated as one word and that impacts how the canonical form is constructed. No additional words allowed in between word1 and word2. This is to ensure that a sequence of tokens are read as a phrase. Usage is restricted to words, concepts not allowed.<\/span><\/p>\n<p><b>Note<\/b><span style=\"font-weight: 400;\">: There should be no space between the word1, word2 and _.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">credit_card<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">can you help me with my credit card balance?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">can you please let me know when I would receive the credit on my card?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><b>_word1<\/b><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">_word1 ensures that the word1 in the user utterance is <\/span><span style=\"text-decoration: underline;\"><span style=\"font-weight: 400;\">not marked<\/span><\/span><span style=\"font-weight: 400;\"> as <\/span><span style=\"text-decoration: underline;\"><span style=\"font-weight: 400;\">Used Up<\/span><\/span><span style=\"font-weight: 400;\"> by the platform and is to be considered for entity extraction. This is useful when entity words are used in the intent pattern.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">For e.g., the pattern (buy ~number ticket) will match &#8220;buy 2 tickets for the show at 7&#8221;; each of the three pattern words internally will be tracked as used up, but a ticket number entity will first consider &#8220;7&#8221; and not &#8220;2&#8221; because &#8220;7&#8221; is not used up. If the pattern is changed to (<\/span><b>buy _~number ticket<\/b><span style=\"font-weight: 400;\">), then &#8220;2&#8221; is still matched for the intent pattern but the word is not marked as used up and the entity would consider it, hence the leading underscore is useful for pattern tokens that constitute important data.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201cb<i>uy _~number tickets<\/i>\u201d<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<i>Can you help me to buy 2 tickets for the show at 7 P.M.?<\/i>\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">NA<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong>word1 *n word2<\/strong><\/td>\n<td width=\"45%\">Exactly <em>n<\/em> number of additional words between the specified words\/phrases<\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">credit *3 card<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">can you tell me what the credit limit on my card will be if I upgrade to Platinum?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">can you tell me what the credit limit on my new card will be if I upgrade to Platinum?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">can you please tell me how many points I can earn for each transaction on my Credit Card?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">can my credit card\u2019s limit be enhanced further?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong><b>word1 *<\/b><b>~n <\/b><b>word2<\/b><\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">Up to <\/span><i><span style=\"font-weight: 400;\">n<\/span><\/i><span style=\"font-weight: 400;\"> number of additional words between the specified words\/phrases.<br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>Note:<\/b><span style=\"font-weight: 400;\"> FM engine automatically generates variations with this wildcard and unless it is a special scenario, developers do not further perform any action.<br \/>\n<\/span><span style=\"font-weight: 400;\">An advanced NLP configuration setting allows developers to change the default number of possible wildcards between tokens.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">credit *~3 card<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">can you tell me what the credit limit on my card will be if I upgrade to Platinum?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">_\u201c<\/span><i><span style=\"font-weight: 400;\">can you tell me what the credit on my card is<\/span><\/i><span style=\"font-weight: 400;\">?\u201d<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">can you tell me what the credit limit on my new card will be if I upgrade to Platinum?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong>word1 *0 word2<\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">To disable wildcards between two tokens. Similar to the underscore between two words but can be used between two concepts or within [\u00a0 ], {\u00a0 } groups.<br \/>\n<\/span><span style=\"font-family: inherit; font-size: inherit;\">(available 7.1 onwards).<br \/>\n<\/span><b>Note:<\/b><span style=\"font-weight: 400;\"> If a phrase needs to be treated as an idiom or\u00a0 a complete unit, then instead of using an _ or the *0 syntax, the phrase can be used in concept. The advantages of this usage are having a specific sequence of words, correct canonical handling, easy reuse, and better performance.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">credit *0 card<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">can you please check on my credit card usage last week?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i style=\"font-family: inherit; font-size: inherit;\">can you help me with this merchant transaction ID on my credit card?<\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">I want to enhance the credit limit on this card next month.<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong><span style=\"font-weight: 400;\">\u00a0<\/span><b>&lt; word1 word2<\/b><\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">Indicates the match for word1 should start from the beginning of a sentence. <\/span><span style=\"font-family: inherit; font-size: inherit;\">Add a space after the angular bracket.<\/span><\/p>\n<p><b>Note:<\/b> <span style=\"font-weight: 400;\">\u2018<\/span><b>&lt;\u2019<\/b> i<span style=\"font-weight: 400;\">ndicates the start of the sentence. The<\/span><span style=\"font-weight: 400;\"> next token would match the first word.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span>&lt; cancel card&#8221;<\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">cancel my credit card.<\/span><\/i><span style=\"font-weight: 400;\">\u201d<\/span><i><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/i><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">please cancel my credit card.<\/span><\/i><span style=\"font-weight: 400;\">\u201d<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">I want to check my credit balance before knowing how to cancel the card<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong><b>word1 word2 &gt; <\/b><\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">Indicates that the next word or phrase after detecting the exact match is the end of the sentence.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Add a space before closing the angular bracket<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">credit card &gt;<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">I can\u2019t see the balance on my credit card.<\/span><\/i><span style=\"font-weight: 400;\">\u201c<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 \u201cWhat are the <\/span><i style=\"font-family: inherit; font-size: inherit;\">standing instructions on my credit card?<\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">The credit limit on the card is not showing.<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong>!abc<\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">Indicates the word\/concept \u201cabc\u201d should not exist anywhere in the user utterance after this token<\/span><\/p>\n<p><span style=\"font-weight: 400;\">No space between ! and word\/concept<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">!block my credit card&#8221;<\/span><\/i><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">I want to know the balance on my credit card.<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">How to block my credit card?\u00a0<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong>!!abc<\/strong><\/td>\n<td width=\"45%\">The very next word\/concept should not be &#8220;abc&#8221;<br \/>\nNo space between !! and word\/concept.<\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">credit card !!balance<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">I want to check my credit card limit.<\/span><\/i><span style=\"font-weight: 400;\">\u201c<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i style=\"font-family: inherit; font-size: inherit;\">What is the limit on my credit card?\u201d<\/i><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i style=\"font-family: inherit; font-size: inherit;\">I want to check if there is any amount due on my corporate credit card.<\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">What is my credit card balance?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong>[ &#8230; ]<\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">Used to define a group of words\/concepts and the match should be against exactly one of the group declared in [ ].<em> Be aware that when a match is found the rest of the group is ignored, so order the words accordingly.<br \/>\n<\/em><\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>Note:<\/b><span style=\"font-weight: 400;\"> The brackets should not be clubbed with the word, i.e. maintain a space between the parenthesis and the adjacent word.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">credit card [ limit balance expire ]<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">When will my credit card limit be increased? <\/span><\/i><span style=\"font-weight: 400;\">\u201c<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">What is my credit card balance as on date?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">When will my credit card expire?&#8221;<\/span><\/i><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">What is the process for credit card replacement?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong>{ &#8230; }<\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">Used to define an optional group or words\/concepts and the match would be against zero or one of the words\/patterns declared in { }. Be aware that when a match is found, rest of the group is ignored, so order the words accordingly.<br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><b>Note:<\/b><span style=\"font-weight: 400;\"> The brackets should not be clubbed with the word, i.e. maintain a space between the parenthesis and the adjacent word.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201cw<\/span><i><span style=\"font-weight: 400;\">hat balance { husband wife } credit card<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">What is the balance on my husband\u2019s credit card?<\/span><\/i><span style=\"font-weight: 400;\">\u201d<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013\u00a0 \u201cWhat balance does my credit card show<\/span><i><span style=\"font-weight: 400;\">?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">What is the name on my credit card?\u201d<\/span><\/i><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong>( &#8230; )<\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">Contains a sub-pattern i.e. when a pattern or part of a pattern is enclosed in these parentheses, we treat it as a pattern unlike [ ] and { }.<br \/>\n<\/span><span style=\"font-weight: 400;\">This is the default setting i.e. when a pattern <\/span><i><span style=\"font-weight: 400;\">word1 word2<\/span><\/i><span style=\"font-weight: 400;\"> it is treated as <\/span><i><span style=\"font-weight: 400;\">( word1 word2 )<br \/>\n<\/span><\/i><span style=\"font-weight: 400;\">Commonly used explicitly to define sub pattern inside [ ] or { }<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">( credit card )<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">I don\u2019t have my credit card with me right now.<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<i>If I am upgraded to a Gold membership, will the credit limit on the new card be increased<\/i><\/span><i><span style=\"font-weight: 400;\">?&#8221;<\/span><\/i><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong>&lt;&lt; &#8230; &gt;&gt;<\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">Used to find words in any order anywhere in the sentence.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Due to the risk of running into false positives, you are advised <\/span><span style=\"text-decoration: underline;\"><span style=\"font-weight: 400;\">not<\/span><\/span><span style=\"font-weight: 400;\"> to use this pattern.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">&lt;&lt; credit limit on the card &gt;&gt;<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">can the credit limit on the card be enhanced?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<br \/>\n<\/span><span style=\"font-weight: 400;\">\u2013 <em>\u201cOn Tuesday I got a new card with a raised limit, so I would like to apply some in-store credit to it<\/em><\/span><em><span style=\"font-weight: 400;\">.<\/span><span style=\"font-weight: 400;\">\u201c<\/span><\/em><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">Please confirm my outstanding amount.<\/span><\/i><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong>&#8216;word1<\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">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.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201cc<\/span><i><span style=\"font-weight: 400;\">ancel \u2018the transaction&#8221;<\/span><\/i><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">I want to cancel the transaction.<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">I would like to cancel a transaction.&#8221;<\/span><\/i><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong>word1~concept2<\/strong><br \/>\n<strong>~concept1~concept2<br \/>\n<\/strong>(from ver8.0)<\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">A word (word1) or concept (concept1) can be matched only if it is also a member of another concept (concept2). The most common usage of this is through the system concepts that are dynamically added for each POS tag.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">credit~verb<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">Can you credit this amount to my source account please?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<\/span><i><span style=\"font-weight: 400;\">This is a credit and not a debit transaction.<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"15%\"><strong><b>word1 * word2<\/b><\/strong><\/td>\n<td width=\"45%\"><span style=\"font-weight: 400;\">0 to infinite number of additional words between the specified words\/phrases.<\/span><\/td>\n<td width=\"40%\">\n<table>\n<tbody>\n<tr>\n<td><strong>Sample Pattern<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201c<i>credit * card<\/i><\/span><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance Match<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">can you please confirm if the credit limit on my priority card can be enhanced this month?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u2013 \u201c<\/span><i><span style=\"font-weight: 400;\">can you help me understand if the credit limit will get affected if I do not use my card for more than six months?<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<tr>\n<td><strong>Utterance not Matching<\/strong><\/td>\n<td><span style=\"font-weight: 400;\">\u201cI<\/span><i><span style=\"font-weight: 400;\"> want to understand your credit limit enhancement policy.<\/span><\/i><span style=\"font-weight: 400;\">\u201c<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\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=\"Pattern_Operators\">Pattern Operators<\/span><\/h2>\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 \/>\nFor 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:<\/p>\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 \/>\nNote 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\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=\"Negative_Patterns\">Negative Patterns<\/span><\/h2>\n<p>Negative Patterns can be used to eliminate intents detected in the presence of a phrase. This will help filter the matched intents for false positives.<\/p>\n<p><strong>User Utterance<\/strong>: &#8220;<em>I was transferring funds when I got network failure error&#8221;<br \/>\n<\/em><strong>Intent Detected<\/strong>:\u00a0<em>Transfer Funds<br \/>\n<\/em><strong>Intended Intent<\/strong>:\u00a0<em>Register Complaint<\/em><\/p>\n<p>Add a\u00a0<strong>Negative Pattern<\/strong> (<em>network failure) (error) (technical issue)<\/em>\u00a0for the intent <em>Transfer Funds<\/em><br \/>\n<strong>User Utterance<\/strong>: &#8220;<em>I was transferring funds when I got network failure error&#8221;<br \/>\nor &#8220;I was transferring funds when I faced a technical issue&#8221;<br \/>\nor &#8220;I got an error during transfer funds process.&#8221;<br \/>\n<\/em><strong>Intent Rejected<\/strong>:\u00a0<em>Transfer Funds<br \/>\n<\/em><strong>Intent Triggered:<\/strong><em> Register Complaint<\/em><\/p>\n<p><strong>Note<\/strong>: The negative pattern is not supported for FAQs in any language.<\/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=\"Patterns_for_Entity_Extraction\">Patterns for Entity Extraction<\/span><\/h2>\n<p>Patterns can be used to identify the values for entities in user utterance based upon their position and occurrence in user utterance.<\/p>\n<p>Intent patterns operators like <em>{&#8230;}<\/em>, <em>[&#8230;]<\/em>, <em>!<\/em>, <em>~concepts<\/em> can be used for entity extraction. The following are some use cases how the patterns can be applied.<\/p>\n<p>Every entity pattern has to include a * (of some form) to represent where the platform should look for an entity value.<\/p>\n<p>Continuing with the Banking Bot example with\u00a0<em>Transfer Funds<\/em> intent. This intent needs two entities &#8211;\u00a0<em>ToAccount<\/em> and\u00a0<em>FromAccount<\/em>. We will see how to achieve this.<\/p>\n<h4>Pattern 1: word1 * word2<\/h4>\n<p>This can be used as a positional wildcard that indicates the expected position of the entity.<br \/>\n<strong>Pattern for\u00a0<em>ToAccount<\/em> entity<\/strong>:\u00a0<em>to * from<br \/>\n<\/em><strong>User Utterance<\/strong>:\u00a0<em>Transfer funds to ABC123 from my account.<br \/>\n<\/em><strong>Entity Extracted<\/strong>:\u00a0<em>ToAccount = ABC123<br \/>\n<\/em><em><strong>User Utterance not resulting in entity extraction<\/strong>: &#8220;transfer funds <span style=\"text-decoration: underline;\">for<\/span> ABC123 from my account&#8221;<br \/>\n<\/em><\/p>\n<h4>Pattern 2: word1 *n<\/h4>\n<p>This can be used as a positional wildcard * that indicates the <span style=\"text-decoration: underline;\">expected position of the entity based upon the number of words<\/span> after the specified word1. That is, <em>n<\/em> words after the <em>word1<\/em> are to be considered for the entity, if <em>n<\/em> words are not present then look for the next occurence of <em>word1<\/em>.<br \/>\n<strong>Pattern for\u00a0<em>ToAccount<\/em> entity<\/strong>: <em>from *2<br \/>\n<\/em><strong>User Utterance<\/strong>:\u00a0<em>Transfer funds to ABC123 from my account.<br \/>\n<\/em><strong>Entity Extracted<\/strong>: <em>FromAccount = my account<br \/>\n<\/em><em><strong>User Utterance<\/strong>:\u00a0Transfer funds to ABC123 from XYZ321 that is from my account.<strong><br \/>\nEntity Extracted<\/strong>: FromAccount = my account<strong><br \/>\nUser Utterance not resulting in entity extraction<\/strong>: &#8220;transfer funds to\u00a0 ABC123 <span style=\"text-decoration: underline;\">using<\/span> my account&#8221;<br \/>\n<\/em><\/p>\n<h4>Extension to Pattern 2: word1 *~n<\/h4>\n<p>Similar to above (pattern 2) but extracts up to n number, if that number of words are available. Note that entities need to extract something so *~1 is really the same as *1.<\/p>\n<h4>Pattern 3: a combination of word1 * word2 and word3 *n<\/h4>\n<p>This can be used as a combination of patterns for the likely location in the user utterance that the entity value could be found and the number of words contributing to the entity.<br \/>\n<strong>Pattern for\u00a0<em>ToAccount<\/em> entity<\/strong>:\u00a0<em>&#8220;to * from&#8221;<\/em> and <em>&#8220;from to *1&#8221;<br \/>\n<\/em><strong>Pattern for\u00a0<em>FromAccount<\/em> entity<\/strong><em>:\u00a0&#8220;from * to&#8221; and &#8220;to from *2&#8221;<\/em><em><br \/>\n<\/em><strong>User Utterance<\/strong>:\u00a0<em>Transfer funds to ABC123 from my account.<br \/>\n<\/em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0or\u00a0<em>Transfer funds from my account to ABC123.<\/em><em><br \/>\n<\/em><strong>Entity Extracted<\/strong>:\u00a0<em>ToAccount = ABC123<\/em> and\u00a0<em>FromAccount = my account<br \/>\n<strong>User Utterance not resulting in entity extraction<\/strong>: &#8220;transfer funds <span style=\"text-decoration: underline;\">for<\/span> ABC123 using my account&#8221;<br \/>\n<\/em><\/p>\n<h4>Pattern 4: [ word1 word2 ] *<\/h4>\n<p>This can be for patterns using a group of words or concepts of which at least one should be present in the utterance. The order within the group is important (see above in <a href=\"#Patterns_for_Intent_Detection\">intent detection<\/a> for details).<br \/>\n<strong>Pattern for\u00a0<em>ToAccount<\/em> entity<\/strong>:\u00a0<em>&#8220;to * [ using from ]&#8221;<\/em> and <em>&#8220;[ using from ] to *1&#8221;<br \/>\n<\/em><strong>Pattern for\u00a0<em>FromAccount<\/em> entity<\/strong><em>: &#8220;[ using from ] * to&#8221; and &#8220;to [ using from ] *&#8221;<\/em><em><br \/>\n<\/em><strong>User Utterance<\/strong>:\u00a0<em>Transfer funds to ABC123 from my account.<br \/>\n<\/em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0or\u00a0<em>Transfer funds using my account to ABC123.<\/em><em><br \/>\n<\/em><strong>Entity Extracted<\/strong>:\u00a0<em>ToAccount = ABC123<\/em> and\u00a0<em>FromAccount = my account<br \/>\n<strong>User Utterance not resulting in entity extraction<\/strong>: &#8220;transfer funds <span style=\"text-decoration: underline;\">for<\/span> ABC123 using my account&#8221;<br \/>\n<\/em><\/p>\n<h4>Pattern 5: ~CustomConcept *<\/h4>\n<p>This can be for using concepts. You can create your own custom concepts and use them to define patterns.<br \/>\n<strong>Pattern for\u00a0<em>ToAccount<\/em> entity<\/strong>:\u00a0<em>&#8220;to * from&#8221;<\/em> and <em>&#8220;from to *&#8221;<br \/>\n<\/em><strong>Pattern for\u00a0<em>FromAccount<\/em> entity<\/strong><em>: &#8220;~in * to&#8221; and &#8220;to ~in *&#8221;<br \/>\n<\/em>Custom Concept<em>: ~in<\/em> &#8211; <em>(using) (from)<br \/>\n<\/em><strong>User Utterance<\/strong>:\u00a0<em>Transfer funds to ABC123 using my account.<br \/>\n<\/em>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0or\u00a0<em>Transfer funds from my account to ABC123.<\/em><em><br \/>\n<\/em><strong>Entity Extracted<\/strong>:\u00a0<em>ToAccount = ABC123<\/em> and\u00a0<em>FromAccount = my account<br \/>\n<\/em><strong>User Utterance not resulting in entity extraction<\/strong>: &#8220;<em>transfer funds to ABC123 <span style=\"text-decoration: underline;\">of<\/span> my account<\/em>&#8221;<\/p>\n<h4>Pattern 6: ~intent<\/h4>\n<p>Useful in entity patterns and custom entities<br \/>\nWords that are used in the intent identification are dynamically marked with the <em>~intent<\/em> concept. This can then be used as an anchor or reference point for some entity patterns.<br \/>\n<strong>Sample Pattern<\/strong>:\u00a0<em>&#8220;~intent~meeting~plural<\/em><em>&#8221;<br \/>\n<\/em><strong>User Utterance not resulting in entity extraction<\/strong>: <em>show my meetings.<br \/>\n<\/em><strong>User Utterance might mark the entity<\/strong>: &#8220;<em>schedule a presentation called Meeting the Sales Goals<\/em>&#8221;<\/p>\n<h4>Pattern 7: $currentEntity<\/h4>\n<p>Useful in delaying the evaluation of a pattern until the entity is actually processed. Normally entity patterns are evaluated when a dialog starts and on new input to see if any words need to be protected until that entity is processed. This might not always desirable, especially for strings.<br \/>\n<strong>Pattern<\/strong>:\u00a0<em>&#8220;$currentEntity=TaskTitle &#8216;called *<\/em><em>&#8221;<br \/>\n<\/em>The above rule will result in evaluating the pattern when the dialog flow has reached the TaskTitle node.<\/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><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"Using patterns can help to improve NLP interpreter accuracy. In this document, we will elaborate on the various pattern syntax and how they can be used in intent detection and entity extraction. Things to Remember: Patterns are to be used as a last resort, only for cases where ML engine cannot be used. Examples of...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[74],"tags":[],"class_list":["post-22994","post","type-post","status-publish","format-standard","hentry","category-how-tos"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/22994","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=22994"}],"version-history":[{"count":32,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/22994\/revisions"}],"predecessor-version":[{"id":59679,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/22994\/revisions\/59679"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=22994"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=22994"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=22994"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}