{"id":56553,"date":"2023-04-14T11:33:06","date_gmt":"2023-04-14T10:33:06","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=56553"},"modified":"2024-01-19T13:42:17","modified_gmt":"2024-01-19T13:42:17","slug":"genai-node","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-builder-tool\/dialog-task\/genai-node\/","title":{"rendered":"GenAI Node (BETA)"},"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\"><div class=\"ult-spacer spacer-6ae8717ee6b9b\" data-id=\"6ae8717ee6b9b\" data-height=\"10\" data-height-mobile=\"10\" data-height-tab=\"10\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>The <strong>GenAI Node<\/strong> lets you leverage the full potential of LLMs and Generative AI models to quickly build conversations that involve complex flows and also provide human-like experiences. You can define the entities you would like to collect and also the business rules that govern the collection of these entities. The XO Platform orchestrates the conversation using contextual intelligence, ensuring that the conversation is always grounded to your enterprise business rules. You can also provide exit rules for handing off the conversation to the virtual assistant or the human agents.<\/p>\n<p><b>Watch a Short Video on GenAI Node (Previously AI-Assisted Dialog Node)<\/b><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae8717ee6c81\" data-id=\"6ae8717ee6c81\" data-height=\"10\" data-height-mobile=\"10\" data-height-tab=\"10\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div><div class=\"w-video ratio_16x9\"><div class=\"w-video-h\"><iframe src=\"\/\/player.vimeo.com\/video\/818451050?portrait=0&amp;color=00adef&byline=0&title=0\" webkitAllowFullScreen mozallowfullscreen allowFullScreen><\/iframe><\/div><\/div><div class=\"ult-spacer spacer-6ae8717ee6d97\" data-id=\"6ae8717ee6d97\" data-height=\"40\" data-height-mobile=\"40\" data-height-tab=\"40\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/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=\"Why_a_GenAI_Node\">Why a GenAI Node?<\/span><\/h2>\n<p>There are two key scenarios when an GenAI node might be beneficial:<\/p>\n<ol>\n<li>NLP might not pick up co-referencing and entity correction during a conversation. For example, in a flight booking task, someone might ask to book two window seats, then change their mind and ask to modify one of the <code>seat types<\/code> from the <code>window<\/code> to the <code>middle<\/code>. In this scenario, the VA must correct the already collected entity <code>(seat type)<\/code> and perform entity co-referencing to modify from <code>window<\/code> to <code>middle<\/code>.<\/li>\n<li>Complex flows like the above increase dialog task complexity, requiring multiple paths and nodes. Even then, it is humanly impossible to predict all such scenarios. Scripting all these possibilities might also result in a sub-par end-user experience.<\/li>\n<\/ol>\n<p>Leveraging OpenAI\u2019s generative AI model mitigates these scenarios by eliminating the need to predict and configure such complex possibilities while still under the constraint of defined rules and exit scenarios. This can facilitate more natural conversations and improve end-user experience.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae8717ee6ead\" data-id=\"6ae8717ee6ead\" data-height=\"10\" data-height-mobile=\"10\" data-height-tab=\"10\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/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=\"Node_Behavior\">Node Behavior<\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Runtime\">Runtime<\/span><\/h3>\n<p>You can work with this node like with any other node within Dialog Tasks and can invoke it within multiple tasks. During runtime, the node behaves as follows:<\/p>\n<ol>\n<li>Entities Collection:\n<ol>\n<li>On reaching the GenAI Node, the platform invokes the Generative AI models to understand the user input.<\/li>\n<li>The platform uses the entities and business rules defined as part of the node configurations to understand the user input and identify the required entity values.<\/li>\n<li>The responses required to prompt\/inform the user are automatically generated based on the conversation context.<\/li>\n<li>The platform drives the conversation until all the defined entities are captured.<\/li>\n<\/ol>\n<\/li>\n<li>Contextual Intents:\n<ol>\n<li>Contextual intents (Dialog or FAQs) recognized from the user input continue to be honored as per the Interruption Settings defined in the bot definition.<\/li>\n<li>Post completion of the contextual intents, the flows can return back to the GenAI Node.<\/li>\n<\/ol>\n<\/li>\n<li>Exit Conditions:\n<ol>\n<li>The platform exits from the GenAI Node when any of the defined exit conditions are met.<\/li>\n<li>These conditions provide you the ability to define scenarios that need a different path in the conversation, for e.g., handing off to a human agent.<\/li>\n<\/ol>\n<\/li>\n<li>The platform can also exit the GenAI Node when the user exceeds the maximum number of volleys (retries to capture the required entities).<\/li>\n<li>The platform stores the entity values in the context object, and this information can be used to define the transitions or any other part of the bot configuration.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Output\">Output<\/span><\/h3>\n<p>The output generated by this node is fully usable throughout the dialog flow, even once the node is no longer in use. Output is maintained in a structured .json within the <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-builder-tool\/context-object\/\" target=\"_blank\" rel=\"noopener noreferrer\">Context Object<\/a>, so you can access and use the output throughout the rest of your flow.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Challenge_Mitigation\">Challenge Mitigation<\/span><\/h3>\n<p>Large Language Models come with challenges, such as potentially unwanted behavior. This is why the GenAI Node is built with the necessary infrastructure to enable you to define VA behavior. The node considers existing entities and context and allows you to configure specific rules and exit scenarios that ensure the VA acts within the boundaries of your business.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae8717ee7067\" data-id=\"6ae8717ee7067\" data-height=\"10\" data-height-mobile=\"10\" data-height-tab=\"10\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/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=\"Enable\">Enable<\/span><\/h2>\n<p>This node is not available by default. You can enable it for all Dialog Tasks, including those created using Generative AI, as follows:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Configure the <a href=\"https:\/\/developer.kore.ai\/v10-1\/integrations\/configuring-the-openai-action\/\" target=\"_blank\" rel=\"noopener noreferrer\">Open-AI<\/a> integration.<\/li>\n<li>Enable LLM and the GenAI Node feature under <b>Build &gt; Natural Language &gt; Advanced NLU Settings<\/b>.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903074615\/AdvancedNLU-GenAI-Node.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-59034\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903074615\/AdvancedNLU-GenAI-Node.png\" alt=\"\" width=\"1357\" height=\"682\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903074615\/AdvancedNLU-GenAI-Node.png 1357w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903074615\/AdvancedNLU-GenAI-Node-300x151.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903074615\/AdvancedNLU-GenAI-Node-1024x515.png 1024w\" sizes=\"auto, (max-width: 1357px) 100vw, 1357px\" \/><\/a><\/p>\n<p>If you do not integrate OpenAI and do not enable LLM or GenAI Node, then the node will not be available within the Dialog Builder.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae8717ee7160\" data-id=\"6ae8717ee7160\" data-height=\"10\" data-height-mobile=\"10\" data-height-tab=\"10\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/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=\"Add_to_a_Task\">Add to a Task<\/span><\/h2>\n<p>To add the GenAI Node to a Dialog Task, follow these steps:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Go to <b>Build &gt; Conversational Skills &gt; Dialog Tasks<\/b> and select the task that you are working with.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417162525\/goto-task.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-56613\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417162525\/goto-task.png\" alt=\"\" width=\"1946\" height=\"521\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417162525\/goto-task.png 1946w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417162525\/goto-task-300x80.png 300w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417162525\/goto-task-1024x274.png 1024w\" sizes=\"auto, (max-width: 1946px) 100vw, 1946px\" \/><\/a><\/li>\n<li>You can add the GenAI Node <a target=\"_blank\" rel=\"noopener noreferrer\">just like any other node<\/a>. You can find it in the main list of nodes, as it does not depend on the Bot Action node.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903073958\/GeanAI-Botactionnode.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-59031\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903073958\/GeanAI-Botactionnode.png\" alt=\"\" width=\"700\" height=\"450\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae8717ee725f\" data-id=\"6ae8717ee725f\" data-height=\"10\" data-height-mobile=\"10\" data-height-tab=\"10\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/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=\"Configure\">Configure<\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"Component_Properties\">Component Properties<\/span><\/h3>\n<p>The settings made within this section affect this node across all instances in all dialog tasks.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"General_Settings\">General Settings<\/span><\/h3>\n<p>Under <b>General Settings<\/b>, provide a <b>Name<\/b> and <b>Display Name<\/b> for the node. The node Name cannot contain spaces.<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903073023\/GenAI-generalsettings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-59028\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903073023\/GenAI-generalsettings.png\" alt=\"\" width=\"450\" height=\"650\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Dialog_Details\">Dialog Details<\/span><\/h3>\n<p>Under <b>Dialog Details<\/b>, configure the following:<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Pre-Processor_Script\">Pre-Processor Script<\/span><\/h3>\n<p>This property helps execute a script as the first step when the GenAI Node is reached. Use the script to manipulate data and incorporate it into rules or exit scenarios as required. The Pre-processor Script has the same properties as the Script Node. <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-builder-tool\/dialog-task\/working-with-the-script-node\/#Configure_the_Node\" target=\"_blank\" rel=\"noopener noreferrer\">Learn more<\/a>.<\/p>\n<p><b>Steps to Define and Configure Pre-processor Script<\/b><\/p>\n<p>To run a pre-processor script before reaching the GenAI Node, you must define it with the following steps:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Click the GenAI Node you want to configure.<\/li>\n<li>Click the <b>Component Properties<\/b> icon on the left menu.<\/li>\n<li>In the <b>Dialog Details<\/b> section, click <b>Define Script<\/b> in the <b>Pre-processor Script<\/b> section.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230706065156\/define-script-preprocessor.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-57731\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230706065156\/define-script-preprocessor.png\" alt=\"\" width=\"350\" height=\"300\" \/><\/a><\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>In the <b>Add Script<\/b> window, add the script you want to execute, and click <b>Save<\/b>.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230706065555\/preprocessor-script-example.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-57734\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230706065555\/preprocessor-script-example.png\" alt=\"\" width=\"450\" height=\"300\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"System_Context\">System Context<\/span><\/h3>\n<p>Include a brief description of the use case context; for example: <em>Act like a flight booking agent<\/em>.<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417160724\/context.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-56598\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417160724\/context.png\" alt=\"\" width=\"487\" height=\"178\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417160724\/context.png 487w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417160724\/context-300x110.png 300w\" sizes=\"auto, (max-width: 487px) 100vw, 487px\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Entities\">Entities<\/span><\/h3>\n<p>Specify the entities to be collected by LLM during runtime. Click Add Entity, enter a Key for the Entity Type, then choose a Value from the drop-down list. Click the Bin icon next to an entity type to remove it.<\/p>\n<p>You can add a maximum of 5 entities. Most entity types are supported. Here are the exceptions: custom, composite, list of items (enumerated and lookup), and attachment. See <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-builder-tool\/dialog-task\/entity-types\/#\">Entity Types<\/a> for more information.<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417160936\/entities.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-56601\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417160936\/entities.png\" alt=\"\" width=\"350\" height=\"300\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Rules\">Rules<\/span><\/h3>\n<p>Add the business rules that the collected entities should respect. Click Add Rule, then enter a short and to-the-point sentence, such as:<\/p>\n<ul>\n<li><em>The airport name should include the IATA Airport Code;<\/em><\/li>\n<li><em>The passenger&#8217;s name should include the last name.<\/em><\/li>\n<\/ul>\n<p>There is a 250-character limit to the Rules field, and you can add a maximum of 5 rules.<\/p>\n<p>To remove a rule, click the Bin icon next to the rule.<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417161358\/rules.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-56604\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417161358\/rules.png\" alt=\"\" width=\"469\" height=\"356\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417161358\/rules.png 469w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417161358\/rules-300x228.png 300w\" sizes=\"auto, (max-width: 469px) 100vw, 469px\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Exit_Scenarios\">Exit Scenarios<\/span><\/h3>\n<p>Specify the scenarios that should terminate entity collection and return to the dialog task. This means the node ends interaction with the generative AI model and returns to the dialog flow within the XO Platform.<\/p>\n<p>Click <b>Add Scenario<\/b>, then enter short, clear, and to-the-point phrases that specifically tell the generative AI model when to exit and return to the dialog flow. For example, Exit when the user wants to book more than 5 tickets in a single booking and return <code>\u201cmax limit reached\u201d<\/code>.<\/p>\n<p>There is a 250-character limit to the Scenarios field, and you can add a maximum of 5 scenarios.<\/p>\n<p>To remove a scenario, click the Bin next to the scenario.<\/p>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417161646\/exit.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-56607\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417161646\/exit.png\" alt=\"\" width=\"459\" height=\"255\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417161646\/exit.png 459w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417161646\/exit-300x167.png 300w\" sizes=\"auto, (max-width: 459px) 100vw, 459px\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Post-Processor_Script\">Post-Processor Script<\/span><\/h3>\n<p>This property initiates the post-processor script after processing every user input as part of the GenAI Node. Use the script to manipulate the response captured in the context variables just before exiting the GenAI Node for both the success and exit scenarios. The Pre-processor Script has the same properties as the Script Node. <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-builder-tool\/dialog-task\/working-with-the-script-node\/#Configure_the_Node\" target=\"_blank\" rel=\"noopener noreferrer\">Learn more<\/a>.<\/p>\n<p><b>Important Considerations<\/b><\/p>\n<ol>\n<li>If the GenAI Node requires multiple user inputs, the post-processor is executed for every user input received.<\/li>\n<li>The system evaluates the entity values collected from the user and stores the collected information in the context object for further processing.<\/li>\n<\/ol>\n<p><b>Steps to Define and Configure Pre-processor Script<\/b><\/p>\n<p>To define a Post-Processor script, in the <b>Dialog Details<\/b> section, follow the steps below:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Click <b>Define Script<\/b> in the <b>Pre-processor Script<\/b> section.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230706071637\/post-processor-script.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-57737\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230706071637\/post-processor-script.png\" alt=\"\" width=\"350\" height=\"200\" \/><\/a><\/p>\n<ol>\n<li>Add the script you want to execute in the <b>Add Script<\/b> window, and click <b>Save<\/b>.<\/li>\n<\/ol>\n<h3><span class=\"ez-toc-section\" id=\"Instance_Properties\">Instance Properties<\/span><\/h3>\n<p>Configure the instance-specific fields for this node. These apply only for this instance and will not affect this adaptive dialog node when used in other tasks. You must configure Instance Properties for each task where this node is used.<\/p>\n<h3><span class=\"ez-toc-section\" id=\"User_Input\">User Input<\/span><\/h3>\n<p>Define how user input validation occurs for this node:<\/p>\n<ul>\n<li><b>Mandatory<\/b>: This entity is required and must be provided before proceeding.<\/li>\n<li><b>Allowed Retries<\/b>: Configure the maximum number of times a user is prompted for a valid input. You can choose between 5-25 retries in 5-retries increments. The default value is 10 retries.<\/li>\n<li><b>Behavior on Exceeding Retries<\/b>: Define what happens when the user exceeds the allowed retries. You can choose to either <em>End the Dialog<\/em> or <em>Transition to a Node<\/em> &#8211; in which case you can select the node to transition to.<\/li>\n<\/ul>\n<h3><span class=\"ez-toc-section\" id=\"User_Input_Correction\">User Input Correction<\/span><\/h3>\n<p>Decide whether to use autocorrect to mitigate potential user input errors:<\/p>\n<ul>\n<li><b>Autocorrect user input<\/b>: The input will be autocorrected for spelling and other common errors.<\/li>\n<li><b>Do not autocorrect user input<\/b>: The user input will be used without making any corrections.<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903072434\/GenAI-userinputcorrection.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-59025\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903072434\/GenAI-userinputcorrection.png\" alt=\"\" width=\"450\" height=\"650\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Advanced_Controls\">Advanced Controls<\/span><\/h3>\n<p>Configure advanced controls for this node instance as follows:<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Intent_Detection\">Intent Detection<\/span><\/h3>\n<p>This applies only to String and Description entities: Select one of these options to determine the course of action if the VA encounters an entity as a part of the user utterance:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><b>Accept input as entity value and discard the detected intent<\/b>: The VA captures the user entry as a string or description and ignores the intent.<\/li>\n<li><b>Prefer user input as intent and proceed with Hold &amp; Resume settings<\/b>: The user input is considered for intent detection, and the VA proceeds according to the Hold &amp; Resume settings.<\/li>\n<li><b>Ask the user how to proceed<\/b>: Allow the user to specify if they meant intent or entity.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417184126\/advances-intent-detection.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-56625\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417184126\/advances-intent-detection.png\" alt=\"\" width=\"462\" height=\"339\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417184126\/advances-intent-detection.png 462w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417184126\/advances-intent-detection-300x220.png 300w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Interruptions_Behavior\">Interruptions Behavior<\/span><\/h3>\n<p>To define the interruption handling at this node. You can select from the below options:<\/p>\n<ul>\n<li style=\"list-style-type: none;\">\n<ul>\n<li><b>Use the task level \u2018Interruptions Behavior\u2019 setting<\/b>: The VA refers to the <b>Interruptions Behavior<\/b> settings set at the dialog task level.<\/li>\n<li><b>Customize for this node<\/b>: You can customize the <b>Interruptions Behavior<\/b> settings by selecting this option and configuring it. You can choose whether to allow interruptions or not, or to allow the end user to select the behavior. You can further customize Hold and Resume behavior. Read the <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-intelligence\/interruption-handling-context-switching-intents\/\">Interruption Handling and Context Switching<\/a> article for more information.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417184444\/advanced-interruptions.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-56628\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417184444\/advanced-interruptions.png\" alt=\"\" width=\"396\" height=\"155\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417184444\/advanced-interruptions.png 396w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417184444\/advanced-interruptions-300x117.png 300w\" sizes=\"auto, (max-width: 396px) 100vw, 396px\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Custom_Tags\">Custom Tags<\/span><\/h3>\n<p>Add Custom Meta Tags to the conversation flow to profile VA-user conversations and derive business-critical insights from usage and execution metrics. You can define tags to be attached to messages, users, and sessions. See <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-builder-tool\/dialog-task\/custom-meta-tags\/\">Custom Meta Tags<\/a> for details.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417185039\/advanced-custom-tags.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-56632\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417185039\/advanced-custom-tags.png\" alt=\"\" width=\"477\" height=\"503\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417185039\/advanced-custom-tags.png 477w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230417185039\/advanced-custom-tags-284x300.png 284w\" sizes=\"auto, (max-width: 477px) 100vw, 477px\" \/><\/a><\/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<h3><span class=\"ez-toc-section\" id=\"Voice_Call_Properties\">Voice Call Properties<\/span><\/h3>\n<p>Configure Voice Properties to streamline the user experience on voice channels. You can define prompts, grammar, and other call behavior parameters for the node. This node does not require Initial Prompts, Error Prompts, and grammar configuration.<\/p>\n<p>See <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-builder-tool\/dialog-task\/voice-call-properties\/\">Voice Call Properties<\/a> for more information on setting up this section of the GenAI Node.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903072035\/GenAI-voicecallproperties.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-59022\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903072035\/GenAI-voicecallproperties.png\" alt=\"\" width=\"450\" height=\"650\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Connections\">Connections<\/span><\/h3>\n<p>Define the transition conditions from this node. These conditions are applicable only for this instance and will not affect this node being used in any other dialog. See <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/bot-builder-tool\/dialog-task\/nodes-conditions\/\">Adding IF-Else Conditions to Node Connections<\/a> for a detailed setup guide.<br \/>\n<a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903071746\/GenAI-connections.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-59019\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20230903071746\/GenAI-connections.png\" alt=\"\" width=\"450\" height=\"650\" \/><\/a><\/p>\n<p>All the entity values collected are stored in context variables. For example, <code>{{context.GenAI_Node.collect_passengers_info.entities.DepartureAirport}}<\/code>. You can define transitions using the context variables.<\/p>\n<p>This node captures entities in the following structure:<\/p>\n<pre>\"context\":{\r\n\"GenAI_Node\":{\r\n   \"collect_passengers_info\":{\r\n        \"entities\":{\r\n\t\"DepartureAirport\":\"Newyork\"\r\n\t\"ArrivalAirport\":\"California\"\r\n\t\"TravelDate\":\"09\/03\/2023\"\r\n\t}\r\n   },\r\n   \"collect_order_info\":{\r\n        \"entities\":{\r\n        \"pizza\":\"margartia\"\r\n        \"size\":\"large\"\r\n        \"crust\":\"thin\"\r\n        }\r\n     }\r\n  }\r\n}\r\n<\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<\/div><\/div><\/div><\/div><\/div><\/section><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\"><div class=\"ult-spacer spacer-6ae8717ee8395\" data-id=\"6ae8717ee8395\" data-height=\"12\" data-height-mobile=\"12\" data-height-tab=\"12\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"The GenAI Node lets you leverage the full potential of LLMs and Generative AI models to quickly build conversations that involve complex flows and also provide human-like experiences. You can define the entities you would like to collect and also the business rules that govern the collection of these entities. The XO Platform orchestrates the...","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29],"tags":[],"class_list":["post-56553","post","type-post","status-publish","format-standard","hentry","category-dialog-task"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/56553","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\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=56553"}],"version-history":[{"count":36,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/56553\/revisions"}],"predecessor-version":[{"id":61029,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/56553\/revisions\/61029"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=56553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=56553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=56553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}