{"id":23813,"date":"2020-07-03T16:50:15","date_gmt":"2020-07-03T15:50:15","guid":{"rendered":"https:\/\/developer.kore.ai\/?p=23813"},"modified":"2021-08-03T12:47:13","modified_gmt":"2021-08-03T11:47:13","slug":"grouping-nodes","status":"publish","type":"post","link":"https:\/\/multisite.korebots.com\/v9-0\/docs\/bots\/bot-builder-tool\/dialog-task\/grouping-nodes\/","title":{"rendered":"Grouping Nodes"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row via_grid cols_1 laptops-cols_inherit tablets-cols_inherit mobiles-cols_1 valign_top type_default stacking_default\"><div class=\"wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><p>Grouping nodes is primarily used for defining a group of nodes and representing the same in the dialog canvas. Note that it is not a part of the dialog flow.<\/p>\n<p>The Group Node can be used to improve the user experience with follow-ups, digressions, and amending entity values. For a use case example, <a href=\"\/docs\/bots\/how-tos\/intent-scoping-using-group-node\/\" target=\"_blank\" rel=\"noopener noreferrer\">refer here<\/a>.<\/p>\n<\/div><\/div><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 class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h2 id=\"d-step1\"><span class=\"ez-toc-section\" id=\"Adding\"><\/span>Adding<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To add a group node to the dialog task, follow the below steps:<\/p>\n<ol>\n<li>Open the Dialog Task where you want to add the Group node.<\/li>\n<li>Group the nodes. For steps in grouping nodes, <a href=\"\/docs\/bots\/chatbot-overview\/using-the-dialog-builder-tool\/#Grouping_Nodes\">refer here<\/a>.<\/li>\n<li>You can rename, configure, or delete a group.<\/li>\n<li>Once created, you can not add or remove specific nodes from the group.\n<ul>\n<li>Any node you add is added outside the group.<\/li>\n<li>Any node you delete is deleted from the entire dialog.<\/li>\n<li>Deleting a group will not delete the nodes within the group from the dialog.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<\/div><\/div><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 class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h2><span class=\"ez-toc-section\" id=\"Configure_Node\"><\/span>Configure Node<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The Group Node functionality includes the following:<\/p>\n<ul>\n<li><strong>Scoping of Intents<\/strong> &#8211; ability to define the sub-intents to be made available when the user is waiting at any of the nodes in the group;<\/li>\n<li><strong>Sub-intent Training<\/strong> &#8211; the ability to train the sub-intent;<\/li>\n<li><strong>Sub-intents Properties<\/strong> &#8211; ability to define the behavior of the sub-intent.<\/li>\n<\/ul>\n<p>For a use case example, with step-by-step instructions in achieving the intent scoping, <a href=\"\/docs\/bots\/how-tos\/intent-scoping-using-group-node\/\" target=\"_blank\" rel=\"noopener noreferrer\">refer here<\/a><\/p>\n<\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h3 id=\"d-step1\"><span class=\"ez-toc-section\" id=\"Scoping_of_Intents\"><\/span>Scoping of Intents<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Using Group Nodes you can scope the sub-intents that are to be allowed to be identified from the user utterance and executed while the user is at one of the nodes within the group.<\/p>\n<ol>\n<li>Hover over the group you want to scope the intents for and click the settings (gear) icon.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210706100819\/GroupNode_settings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28317\" src=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210706100819\/GroupNode_settings.png\" alt=\"\" width=\"903\" height=\"469\" \/><\/a><\/li>\n<li>From the Group Node window, select <strong>Add Intent<\/strong> to add intents that should be part of this group&#8217;s scope.<\/li>\n<li>From the Add Intent window, select the intent to be scoped as sub-intent for this Group node. This would be the intent that a user might ask for when the conversation is at any of the nodes in this group. For example, asking &#8220;<em>How is the weather at XYZ city<\/em>&#8221; when prompted for destination entity or asking for <em>&#8220;Flight times&#8221;<\/em> when prompted for the travel date.<\/li>\n<li>You can choose to add new sub-intents using the <strong>Create Intent<\/strong> button.<\/li>\n<li>Once added you can train, set behavioral properties and\/or delete a scoped intent.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210706102250\/GroupNode_intent.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28320\" src=\"https:\/\/s3-us-east-2.amazonaws.com\/kore-wordpress\/developer.kore.ai\/wp-content\/uploads\/sites\/22\/20210706102250\/GroupNode_intent.png\" alt=\"\" width=\"461\" height=\"477\" \/><\/a><\/li>\n<\/ol>\n<\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h3 id=\"d-step1\"><span class=\"ez-toc-section\" id=\"Training_of_Intents\"><\/span>Training of Intents<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Once added, each of the sub-intent can be trained for recognition within this group. This would ensure that the sub-intent is identified in the group&#8217;s context.<\/p>\n<ol>\n<li>From the Group settings page, select the sub-intent you want to train.<\/li>\n<li>You can train the sub-intent with the following:\n<ul>\n<li><strong>Machine Learning<\/strong> &#8211; Add the user utterances that should identify this sub-intent. You can also use the NER approach to annotate entities in the utterances.<\/li>\n<li><strong>Patterns<\/strong> &#8211; Identify patterns in the user utterance related to this sub-intent<\/li>\n<li><strong>Rules<\/strong> &#8211; Define intent identification rules to trigger this intent<\/li>\n<\/ul>\n<\/li>\n<li>You can also set the <strong>Intent Preconditions<\/strong> i.e. the sub-intent would get identified only when any of the preconditions defined are available in the context at the time of intent detection. These pre-conditions will be considered as instance levels and would take precedence over the component level pre-conditions.<\/li>\n<\/ol>\n<\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h3 id=\"d-step1\"><span class=\"ez-toc-section\" id=\"Properties_of_Intents\"><\/span>Properties of Intents<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>The <strong>fulfillment<\/strong> section can be used to define the actions when this particular sub-intent is identified from the user input. It includes the following properties:<\/p>\n<ul>\n<li><strong>Context Variables<\/strong> &#8211; Set the key-value pairs to define the session or context variables to be updated when this sub-intent is identified.<br \/>\nIf you want to reset the values, you need to use the keyword &#8220;null&#8221;, spaces would be ignored by the platform.<\/li>\n<li><strong>Message<\/strong> &#8211; Optionally, define a message to be presented to the user when this sub-intent is identified. As with other responses, you can define the message as plain text, JavaScript format, specify, and set <a href=\"\/docs\/bots\/bot-builder-tool\/dialog-task\/voice-call-properties\/\" target=\"_blank\" rel=\"noopener noreferrer\">Voice Call Properties<\/a>, where applicable.<\/li>\n<li><strong>Context Output<\/strong> &#8211; Define the context tags to be set when this intent is identified. The intent name is always set as output context by the system.<br \/>\nIf you want to reset the values, you need to use the keyword &#8220;null&#8221;, spaces would be ignored by the platform.<\/li>\n<li><strong>Transition Flow<\/strong> &#8211; Use this option to define how the dialog should resume after executing this sub-intent. Two behaviors you can define:\n<ul>\n<li>Jump To A Node &#8211; The dialog will resume from the node selected here.<\/li>\n<li>Resume The Dialog &#8211; The dialog will resume from the node where this intent was identified.<\/li>\n<\/ul>\n<p>&nbsp;<\/li>\n<\/ul>\n<\/div><\/div><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 class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><h2 id=\"d-step1\"><span class=\"ez-toc-section\" id=\"Implementation\"><\/span>Implementation<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Following are the changes in sub-intent behavior within a group<\/p>\n<ul>\n<li>For every sub-intent identified, the context object will be updated with an array of objects with the identified sub-intent details with the latest on the top. The following information is captured:\n<ul>\n<li>Name of the sub-intent;<\/li>\n<li>Entities that are identified along with the sub-intent;<\/li>\n<li>Name of the group to which the sub-intent belongs, where applicable;<\/li>\n<li>Name of the node at which the sub-intent is identified.<\/li>\n<\/ul>\n<pre>  \"identifiedSubIntents\": [\r\n    {\r\n      \"intent\": \"Change Destination\",\r\n      \"entities\": {\r\n        \"destcity\": \"Delhi\"\r\n      },\r\n      \"groupName\": \"Entity Group\",\r\n      \"identifiedAt\": \"to_date\"\r\n    },\r\n    {\r\n      \"intent\": \"Weather Report\",\r\n      \"groupName\": \"Entity Group\",\r\n      \"identifiedAt\": \"destcity\"\r\n    }\r\n  ]<\/pre>\n<\/li>\n<li>The intent would be executed if the sub-intent identified from the user utterance is within the group scope and all the input preconditions are satisfied and the transition flow directs to the concerned node.<\/li>\n<li>The execution of sub-intent would involve:\n<ul>\n<li>Updation of the context variables as per the defined mapping<\/li>\n<li>Setting the Output Context as per the defined mapping<\/li>\n<li>Presenting the message to the user, if applicable<\/li>\n<\/ul>\n<\/li>\n<li>The current dialog execution should continue as per the transition flow defined\n<ul>\n<li>Jump to the specified node; or<\/li>\n<li>Resume from the point where the sub-intent was identified.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div><\/div><div class=\"wpb_text_column\"><div class=\"wpb_wrapper\"><\/div><\/div><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]JTNDZGl2JTIwY2xhc3MlM0QlMjJ3LXBvc3QtZWxtJTIwcG9zdF9uYXZpZ2F0aW9uJTIwbGF5b3V0X3NpbXBsZSUyMGludl9mYWxzZSUyMiUzRSUwQSUwOSUzQ2ElMjBjbGFzcyUzRCUyMnBvc3RfbmF2aWdhdGlvbi1pdGVtJTIwb3JkZXJfZmlyc3QlMjB0b19wcmV2JTIyJTIwaHJlZiUzRCUyMiUyRmRvY3MlMkZib3RzJTJGYm90LWJ1aWxkZXItdG9vbCUyRm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lMkZhJTNFJTNDJTJGZGl2JTNF[\/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><\/section>\n","protected":false},"excerpt":{"rendered":"Grouping nodes is primarily used for defining a group of nodes and representing the same in the dialog canvas. Note that it is not a part of the dialog flow. The Group Node can be used to improve the user experience with follow-ups, digressions, and amending entity values. For a use case example, refer here....","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/23813"}],"collection":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/comments?post=23813"}],"version-history":[{"count":29,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/23813\/revisions"}],"predecessor-version":[{"id":29392,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/posts\/23813\/revisions\/29392"}],"wp:attachment":[{"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/media?parent=23813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/categories?post=23813"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/multisite.korebots.com\/v9-0\/wp-json\/wp\/v2\/tags?post=23813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}