{"id":19983,"date":"2019-05-03T10:33:24","date_gmt":"2019-05-03T10:33:24","guid":{"rendered":"https:\/\/developer.kore.ai\/v7-1\/?p=19983"},"modified":"2021-03-30T12:40:10","modified_gmt":"2021-03-30T11:40:10","slug":"working-with-the-user-intent-node","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-1\/docs\/bots\/bot-builder-tool\/dialog-task\/working-with-the-user-intent-node\/","title":{"rendered":"Working with the User Intent Node"},"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>As a bot developer, you typically create a task to resolve one primary user intent. Yet, user conversations can branch into related intents (follow-up or sub-intents) as a part of the primary intent.<\/p>\n<p>Let\u2019s take a look this sample conversation for a Book Flights bot:<\/p>\n<pre>Bot: Hi, how may I help you today?\r\nUser: Hey, what flight options have I got from LA to NYC.\r\nBot: Sure, let me know the travel date.\r\nUser: Wait a minute, will it rain there this Sunday?<\/pre>\n<p>The primary intent of this conversation is to book flight tickets. But the user wants to know the weather forecast before completing the booking, which is a valid use case.<\/p>\n<p><strong>User intent nodes<\/strong> help you add root intent or follow-up (or sub-intents) to your dialog tasks. The flow for a follow-up intent is built within the same dialog task using transitions, and cannot be linked to external tasks. When the execution of a follow-up intent is completed, the conversation flow continues within the same dialog tasks based on the transitions you add.<\/p>\n<div class=\"alert alert-info\"><strong>Note<\/strong>: To start a new Dialog Task from an existing one, you can use the Dialog Task nodes.<\/div>\n<div><\/div>\n<p><strong>Setting Up a User Intent Node<\/strong><\/p>\n<p>Setting up a User Intent node involves the following steps:<\/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=\"ui-step1\"><span class=\"ez-toc-section\" id=\"Step_1_Adding_a_User_Intent_Node_to_the_Dialog_Task\">Step 1: Adding a User Intent Node to the Dialog Task<\/span><\/h3>\n<ol>\n<li>Open the dialog task in which you want to add the User Intent node.<\/li>\n<li>Hover over a node next to which you want to add the User Intent.<\/li>\n<li>Click the Plus icon that appears after the node, and then select <b>Intent &gt; New user intent node<\/b>.<\/li>\n<li>Enter a Name and Description (optional) for the node, and then click <b>Create<\/b>.<\/li>\n<li>You can also select an existing User Intent.<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/New-Intent-Node.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13904\" src=\"\/wp-content\/uploads\/sites\/12\/New-Intent-Node.png\" alt=\"\" width=\"680\" height=\"481\" \/><\/a><\/li>\n<li>The Component Properties panel for the node opens.<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3 id=\"&quot;ui-step2\"><span class=\"ez-toc-section\" id=\"i\">Step 2: Configuring the Component Properties<\/span><\/h3>\n<div class=\"alert alert-info\"><b>Note:<\/b> The configurations you set up or edit in Component Properties panel are reflected in all the Dialog Tasks that use this node.<\/div>\n<div>These settings are the same for Intent and Sub-intent nodes.<\/div>\n<div><\/div>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/12\/Component-Properties-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-19423\" src=\"\/wp-content\/uploads\/sites\/12\/Component-Properties-1.png\" alt=\"\" width=\"500\" height=\"632\" \/><\/a><\/p>\n<ol>\n<li>Modify general <strong>Component Properties<\/strong>\u00a0like Name and Description<\/li>\n<li>From the <strong>Connections tab<\/strong> set the Transition properties to determine which node in the dialog task to execute next. You can write the conditional statements based on the values of any Entity or Context Objects in the dialog task, or you can use intents for transitions.\n<ol>\n<li>Select the Connections tab<\/li>\n<li>Click <b>Add IF<\/b>.<\/li>\n<li>Configure the conditional expression based on one of the following criteria:\n<ul>\n<li><b>Entity<\/b>: Compare an Entity node in the dialog with a specific value:\n<ul>\n<li>Select the entity;<\/li>\n<li>select an operator using the drop-down lists: <b>Exists<\/b>, <b>equals to<\/b>, <b>greater than equals to<\/b>, <b>less than equals to<\/b>, <b>not equal to<\/b>, <b>greater than<\/b>, and <b>less than<\/b>.<\/li>\n<li>type the number in the <b>Value <\/b>box. Example: <i>PassengerCount (entity) greater than (operator) 5 (specified value)<\/i><\/li>\n<\/ul>\n<\/li>\n<li><b>Context<\/b>: Compare a context object in the dialog with a specific value using one of these operators: <b>Exists<\/b>, <b>equals to<\/b>, <b>greater than equals to<\/b>, <b>less than equals to<\/b>, <b>not equal to<\/b>, <b>greater than<\/b>, and <b>less than. <\/b>Example<b>: <\/b><i>Context.entity.PassengerCount<\/i> <i>(Context object) greater than (operator) 5 (specified value)<\/i><\/li>\n<li><b>Intent: <\/b>Select an intent that should match the next user utterance.<\/li>\n<\/ul>\n<\/li>\n<li>In the <b>Then go to<\/b> drop-down list, select the next node to execute in the dialog flow if the conditional expression succeeds. For example, if the <i>PassengerCount (entity) greater than (operator) 5 (specified value), <\/i><b>Then go to <\/b><i>Offers (sub-dialog).<\/i><\/li>\n<li>In the <b>Else <\/b>drop-down list, select the node to execute if the condition fails.\n<div class=\"alert alert-info\"><b>Note<\/b>: If you want to write multiple If conditions, click <b>Add Else If <\/b> below the last If conditional expression.<\/div>\n<\/li>\n<\/ol>\n<\/li>\n<li>From the NLP Properties tab\n<ul>\n<li><a href=\"\/v7-1\/docs\/bots\/bot-builder-tool\/train-nlp-optimization\/machine-learning\/user-utterances\/\"><b>Machine Learning<\/b><\/a> settings to provide user utterances to improve the detection for this intent.<\/li>\n<li><a href=\"\/v7-1\/docs\/bots\/bot-builder-tool\/train-nlp-optimization\/fundamental-meaning\/fundamental-meaning\/#Adding_Bot_Synonyms\"><b>Bot Synonyms<\/b><\/a> or related phrases for this user intent.<\/li>\n<li><a href=\"\/v7-1\/docs\/bots\/bot-builder-tool\/train-nlp-optimization\/fundamental-meaning\/fundamental-meaning\/#Navigating_to_the_Patterns_Tab\"><b>Patterns &amp; Rules<\/b><\/a> to capture this intent if the user\u2019s utterance contains these specific patterns.<\/li>\n<li><a href=\"\/v7-1\/docs\/bots\/bot-intelligence\/context-management\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Manage Context<\/strong><\/a> to better control the flow of conversation<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"As a bot developer, you typically create a task to resolve one primary user intent. Yet, user conversations can branch into related intents (follow-up or sub-intents) as a part of the primary intent. Let\u2019s take a look this sample conversation for a Book Flights bot: Bot: Hi, how may I help you today? User: Hey,...","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-19983","post","type-post","status-publish","format-standard","hentry","category-dialog-task"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/19983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/comments?post=19983"}],"version-history":[{"count":15,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/19983\/revisions"}],"predecessor-version":[{"id":22292,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/posts\/19983\/revisions\/22292"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/media?parent=19983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/categories?post=19983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-1\/wp-json\/wp\/v2\/tags?post=19983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}