{"id":17952,"date":"2016-12-06T23:41:55","date_gmt":"2016-12-06T23:41:55","guid":{"rendered":"https:\/\/developer.kore.com\/?post_type=docs&#038;p=9158"},"modified":"2021-03-30T06:56:48","modified_gmt":"2021-03-30T05:56:48","slug":"working-with-the-entity-node","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v7-2\/docs\/bots\/bot-builder-tool\/dialog-task\/working-with-the-entity-node\/","title":{"rendered":"Working with the Entity 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><span style=\"font-weight: 400\">Bots need to extract relevant information from the user utterance to fulfill the user intent. <\/span><\/p>\n<p><span style=\"font-weight: 400\">Take a look at this sample utterance: <em>Book me a flight from LA to NYC on Sunday<\/em>. \u00a0To act on this user intent, which is to book a flight ticket, the bot should extract the entities such as the <em>source city<\/em> (LA), <em>destination city<\/em> (NYC), and the <em>departure date<\/em> (Sunday). <\/span><\/p>\n<p><span style=\"font-weight: 400\">So, in a Dialog Task, for every critical data you want to get from a user utterance, you should create a corresponding Entity node. You can add Prompt messages to these nodes for users to input the required values. <\/span><br \/>\n<span style=\"font-weight: 400\">Kore.ai supports more than 30 entity types such as Address, Airport, Quantity, TimeZone. You can also define the entities as a selection from a list, free-form entry, file or image attachment from a user, or as regex expressions. <\/span><\/p>\n<div class=\"alert alert-info\"><b>Note:<\/b> You may need to follow one Entity node with several other Entity nodes to collect series of user inputs to complete a transaction, such as a username, location, amount, and due date, followed by a Webhook node to process a request to an API to complete an online transaction.<\/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>\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=\"Setting_up_an_Entity_Node\">Setting up an Entity Node<\/span><\/h2>\n<p>Setting up an Entity node in a Dialog task involves the following steps:<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_1_Adding_an_Entity_Node_to_the_Dialog_Task\">Step 1: Adding an Entity Node to the Dialog Task<\/span><\/h3>\n<ol>\n<li>Open the Dialog Task where you want to add the Entity node.<\/li>\n<li>Hover over a node next to which you want to add the entity node, and click the plus icon on it.<\/li>\n<li>Select <b>Entity &gt; New entity node <\/b>(you can also use an existing entity node, by selecting from the list).<br \/>\n<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/Path.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13480 \" src=\"\/wp-content\/uploads\/sites\/13\/Path.png\" alt=\"\" width=\"527\" height=\"324\" \/><\/a><\/li>\n<li>The Component Properties panel for the Entity Node opens.<\/li>\n<\/ol>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_medium 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=\"Step_2_Configuring_the_Component_Properties\">Step 2: Configuring the Component Properties<\/span><\/h3>\n<p>The Entity Component Properties allow you to configure the General Settings, User and Error Prompts.<\/p>\n<div class=\"alert alert-info\"><b>Note:<\/b> The configurations you set up or modify in this section <span style=\"text-decoration: underline\">are reflected in all other Dialog Tasks<\/span> that use this node.<\/div>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/Components-Panel-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-16711\" src=\"\/wp-content\/uploads\/sites\/13\/Components-Panel-2.png\" alt=\"\" width=\"499\" height=\"651\" \/><\/a><\/p>\n<ol>\n<li>Enter a <strong>Name<\/strong> and <strong>Display Name<\/strong>\u00a0for the Entity node. Entity names cannot have spaces.<\/li>\n<li>From the <b>Type <\/b>drop-down select an entity type depending on the expected user input. For example, if you want the user to type the departure date, select <b>Date <\/b>from the drop-down. The platform will do the basic validation based upon the Type selected.<br \/>\nThe <strong>Entity Type<\/strong> provides the NLP Interpreter with the expected type of data from a user utterance to enhance recognition and system performance. For more information, see the <a href=\"\/v7-2\/docs\/bots\/bot-builder-tool\/develop\/dialog-task\/entity-types\/\" target=\"_blank\" rel=\"noopener noreferrer\">Entity Types<\/a><\/li>\n<li>Based on the Type selected, you might have an option to set the Entity as\u00a0<strong>Multi-Item<\/strong> thereby allowing the user multiple selections.<\/li>\n<li>In the <b>User Prompt<\/b> text box, enter the prompt message that you want the user to see for this entity. For example, <em>Enter the Departure Date<\/em>. You can enter channel-specific messages for user prompts. For more information, see <a href=\"\/v7-2\/docs\/bots\/bot-builder-tool\/dialog-task\/prompt-editor\/\">Using the Prompt Editor<\/a>.<\/li>\n<li><b>In the Error Prompts<\/b> box, review the default error message, and if required, click <b>Edit Errors<\/b> to modify it. For more information, see <a href=\"\/v7-2\/docs\/bots\/bot-builder-tool\/dialog-task\/prompt-editor\/\">Using the Prompt Editor<\/a>.<\/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><span class=\"ez-toc-section\" id=\"Step_3_Configuring_the_Instance_Properties\">Step 3: Configuring the Instance Properties<\/span><\/h3>\n<p>Use the Instance Properties to determine whether to make the Entity value mandatory as well as to choose if you want to consider values from previous user utterances to capture entities.<\/p>\n<div class=\"alert alert-info\"><b>Note:<\/b> The settings in the Instance Properties panel are specific to the current Dialog Task and <span style=\"text-decoration: underline\">do not reflect in the other dialog tasks<\/span> that use this entity node.<\/div>\n<p><a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/instance-properties.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17033\" src=\"\/wp-content\/uploads\/sites\/13\/instance-properties.png\" alt=\"\" width=\"490\" height=\"623\" \/><\/a><\/p>\n<ol>\n<li>Click the Instance Properties icon on the Entity node.<\/li>\n<li>Under the User Input section, select an option (<a href=\"#input-flow\">see below for how the entity flow is managed<\/a>):\n<ul>\n<li><b>Mandatory: <\/b>This entity is required, and users must provide a valid entry before proceeding with the dialog flow. A prompt is displayed for the user to resolve in case ambiguous values for the entity are detected in the user utterance.<\/li>\n<li><b>Optional<\/b>: User is prompted only once for this entity and system proceeds with any input provided by the user. In case ambiguous values for these optional entities are detected in the User Utterance, then an resolution prompt is displayed allowing the user to pick the correct value.<\/li>\n<li><b>Hidden<\/b><span style=\"font-weight: 400\">: If enabled, the bot will not prompt for the entity value unless explicitly provided by the user.<\/span><\/li>\n<\/ul>\n<\/li>\n<li>Under the Entity Extraction section, select one of these options:\n<ul>\n<li><b>Evaluate the un-used text from the previous utterance<\/b>: When this option is selected, the entity uses the text that was not used by any other entity in the dialog so far. This is the default option.<\/li>\n<li><b>Evaluate un-used text and text used for extracting entities from previous utterances<\/b>: Select this option if you would like to reuse an entity value extracted by another Entity node in the dialog.<\/li>\n<li><b>Do not evaluate previous utterances and explicitly prompt the user<\/b>: Select this option if you want the bot to ignore the previous user utterances and explicitly prompt the user to provide value for the entity.\n<ul>\n<li>Further, you can restrict the platform from reusing the input provided for this entity to extract any other entities by selecting the\u00a0<strong>Do not reuse<\/strong> option.<\/li>\n<li>For string type entities, you can restrict the platform from applying auto-corrections to the user input by selecting the <strong>Do not autocorrect<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Click the <strong>Advanced controls<\/strong> to set up these options:\n<ul>\n<li><b>User Prompts<\/b>: Use the <b>Click to Override<\/b><span style=\"font-weight: 400\"> button to write custom user prompts for this particular instance of the Entity node. Once you override, the User Prompts section in the Component Properties panel is disabled. \u00a0Also, these user prompts do not apply to any other instances of the node.<\/span><\/li>\n<li><b>Error Prompts<\/b>: Use the <b>Click to Override<\/b> button to write custom error prompts for this particular instance of the Entity node. Once you override, the Error Prompts section in the Component Properties panel is disabled. \u00a0Also, these error prompts do not apply to any other instances of the node.<\/li>\n<li><b>Intent Detection <\/b>(<i>Applies only to String and Description entities<\/i>): Select one of these options to determine the course of action if the bot encounters an entity as a part of the user entry for the String or Description entities:\n<ul>\n<li><b>Accept input as entity value and discard intent detected<\/b>: The bot captures the user entry as a string or description and ignores the intent.<\/li>\n<li><strong>Prefer user input as intent and proceed with Hold &amp; Resume settings<\/strong>: The user input is considered for intent detection and proceed according to the Hold &amp; Resume settings.<\/li>\n<li><strong>Ask the user how to proceed<\/strong>: Allow the user to specify if they meant intent or entity.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Hold &amp; Resume<\/strong> to define the interruption handling at this node, choose from:\n<ul>\n<li><strong> Use the task level \u2018Hold &amp; Resume\u2019 setting<\/strong>: The bot refers to the Hold &amp; Resume settings set at the dialog task level.<\/li>\n<li><b>Customize for this node option:<\/b> You can customize the Hold &amp; Resume settings for this node by selecting this option and configuring the same. \u00a0Read the <a href=\"\/v7-2\/docs\/bots\/bot-builder-tool\/train-nlp-optimization\/bot-intelligence\/interruption-handling-context-switching-intents\/\" target=\"_blank\" rel=\"noopener noreferrer\">Interruption Handling and Context Switching<\/a> article for more information.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Precedence<\/strong> (<em>Applies to all Entity types except String and Description nodes<\/em>): When user\u2019s input for an entity consists of a valid value for the entity and another intent, you can control the experience by choosing between \u201cIntent over Entity\u201d or \u201cEntity over Intent\u201d options. For example, if a Flight Booking bot prompts for the destination and the user enters, \u201cBangalore, how\u2019s the weather there?\u201d you get to define how the bot responds in such cases &#8211; pick the entity and add the intent to the Follow-up Intents stack or go ahead with the intent first based upon the Hold &amp; Resume settings.<a ref=\"magnificPopup\" href=\"\/wp-content\/uploads\/sites\/13\/instance-properties-advanced.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-17034\" src=\"\/wp-content\/uploads\/sites\/13\/instance-properties-advanced.png\" alt=\"\" width=\"490\" height=\"636\" \/><\/a><\/li>\n<\/ul>\n<\/li>\n<li><strong>Custom Tags\u00a0<\/strong>defines tags to build custom profiles of your bot conversations. <a href=\"\/v7-2\/docs\/bots\/bot-builder-tool\/dialog-task\/custom-meta-tags\/\">See here for more<\/a>.<\/li>\n<\/ol>\n<p><strong id=\"input-flow\">User Input Flow<\/strong>:<\/p>\n<p>When a user is prompted for input, the following is the processing done by the platform:<\/p>\n<ul>\n<li>If the user responds with a valid value, then the entity would be populated with that value and the dialog flow will continue.<\/li>\n<li>If ambiguous values are identified in the user response, then ambiguity resolution prompt will be displayed.<\/li>\n<li>If the user responds with an invalid utterance i.e. an utterance that doesn\u2019t contain a valid input for the ambiguity resolution, then:\n<ul>\n<li>if the given value is valid for the entity (any possible value for the entity), then it will be used for the entity and conversation will be continued;<\/li>\n<li>If the given value is not valid for the entity, and\n<ul>\n<li>If the value triggers any task intent, faq or small talk, then\n<ul>\n<li>The intent will be executed as per hold and resume settings and when (and if) the dialog (containing the entity) is resumed, then the user will be reprompted for the entity value;<\/li>\n<\/ul>\n<\/li>\n<li>If the value doesn\u2019t trigger any task intent, faq or small talk, then the entity will be left blank and the conversation will be continued from the entity\u2019s transitions.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/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><span class=\"ez-toc-section\" id=\"Step_4_Configuring_the_Connections_Properties\">Step 4: Configuring the Connections Properties<\/span><\/h3>\n<p>From the node\u2019s Connections panel you can 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.<br \/>\nTo setup Component Transitions, follow these steps:<\/p>\n<ol>\n<li>You can select from the available nodes under the\u00a0<strong>Default<\/strong> connections.<\/li>\n<li>To configure a conditional flow, click <b>Add IF<\/b>.<\/li>\n<li>Configure the conditional expression based on one of the following criteria:\n<ol>\n<li><b>Entity<\/b>: Compare an Entity node 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>. Select the entity, operator using the respective drop-down lists, and type the number in the <b>Value <\/b>box. Example: <i>PassengerCount (entity) greater than (operator) 5 (specified value)<\/i><\/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<\/ol>\n<\/li>\n<li>In the <b>Then go to<\/b> the 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.<\/li>\n<\/ol>\n<div class=\"alert alert-info\"><b>Note:<\/b> If you want to write multiple If conditions, click <strong>Add Else If<\/strong> below the last If conditional expression.<\/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>\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=\"Step_5_Configuring_the_NLP_Properties\">Step 5: Configuring the NLP Properties<\/span><\/h3>\n<ol>\n<li>In the <b>Suggested Synonyms for the &lt; Entity Name &gt;<\/b> box, enter synonyms for the name of your Entity. Press enter after each entry to save it. For more information, see <a href=\"\/v7-2\/docs\/bots\/bot-builder-tool\/train-nlp-optimization\/fundamental-meaning\/fundamental-meaning\/#Navigating_to_the_Bot_Synonyms\" target=\"_blank\" rel=\"noopener noreferrer\">Managing Synonyms<\/a>.<\/li>\n<li>In the<b> Suggested Patterns<\/b> <b>for &lt; <\/b>Entity Name<b> &gt;<\/b>, click <b>+Add Pattern<\/b> to add new patterns for your Entity. The <b>Patterns<\/b> field is displayed. For more information, see <a href=\"\/v7-2\/docs\/bots\/bot-builder-tool\/train-nlp-optimization\/fundamental-meaning\/fundamental-meaning\/#Navigating_to_the_Patterns_Tab\" target=\"_blank\" rel=\"noopener noreferrer\">Managing Patterns<\/a>.<\/li>\n<li><strong>Manage Context<\/strong>\n<ul>\n<li>Define the context tags to be set in the context when this entity is populated using the\u00a0<strong>Context Output<\/strong> field<\/li>\n<li>Auto emit the entity values captured as part of the Context Object.<br \/>\n(<a href=\"\/v7-2\/docs\/bots\/bot-intelligence\/context-management\/\">See here for Context Management<\/a>)<\/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>\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=\"Step_6_Configuring_the_IVR_Properties\">Step 6: Configuring the IVR Properties<\/span><\/h3>\n<p>You can use this tab for defining at the Node level the input mode, grammar, prompts and call behavior parameters for this node to be used in IVR Channel. <a href=\"\/v7-2\/docs\/bots\/advanced-topics\/ivr-integration\/ivr-integration\/#ivr-settings-field-reference\">Refer here for details<\/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><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"Bots need to extract relevant information from the user utterance to fulfill the user intent. Take a look at this sample utterance: Book me a flight from LA to NYC on Sunday. \u00a0To act on this user intent, which is to book a flight ticket, the bot should extract the entities such as the source...","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-17952","post","type-post","status-publish","format-standard","hentry","category-dialog-task"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/17952","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/comments?post=17952"}],"version-history":[{"count":9,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/17952\/revisions"}],"predecessor-version":[{"id":23615,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/posts\/17952\/revisions\/23615"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/media?parent=17952"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/categories?post=17952"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v7-2\/wp-json\/wp\/v2\/tags?post=17952"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}