What's my plan?
Add-on AI agents - Advanced

Generative replies are activated through the Generative replies block in the dialogue builder. The input for this process comprises the latest customer message and various configuration settings. Depending on the specific scenario triggered by the Generative replies block, the conversation will progress either with a generative reply or by following the predefined dialogues associated with other scenarios.

This article contains the following topics:

  • About the Generative replies block
  • Showing which help center articles were used to generate a reply
  • Defining a custom question for the Generative replies block
  • Additional considerations for generative replies for email AI agents

About the Generative replies block

Every AI agent comes preconfigured with a Generative replies block in the uGPT system reply setup. Additionally, generative replies can be added to any other intent or template reply by simply selecting the Generative replies block from the block menu.

Currently, the Generative reply block serves a singular purpose: "Respond with informational content." However, our future plans include expanding its capabilities to encompass additional generative reply-related tasks.

AI agent builders have the flexibility to utilize actions and resolution states similar to other blocks. Apart from the four scenarios detailed below, the Generative replies block provides various configuration options that allow specifying the context generative replies should consider when generating a response. The following sections provide detailed explanations of the scenarios and configuration options available:

  • Response generated
  • Escalation needed
  • Not understood
  • An error occurred

Response generated

This scenario is activated when the AI agent successfully generates a reply to the question posed in the latest customer message, considering both the context provided by the knowledge base and the specific query. However, if the last customer message is more of small talk rather than a question, the AI agent attempts to provide a generative reply solely based on that particular message.

In the dialogue design, there are two distinct options available for sharing or incorporating the generative reply. These options offer flexibility in how the response can be integrated into the ongoing conversation.

Option Explanation Example
Share with customer

By choosing this option, the AI agent will immediately send the generated response to the chat without requiring any other blocks in the reply. This is the recommended method for sharing the generative reply directly with the customer. 


However, it's worth noting that we also retain the response in the session parameter "ugptResponse", allowing it to be utilized in actions or at a later point in the conversation. This ensures flexibility and potential applications beyond the immediate chat interaction.

Only save response

Opting for the second option involves not sending the response directly to the chat. Instead, the response is saved solely in the session parameter "ugptResponse." The primary purpose of this option is to enable the continuation of the dialogue with other blocks and logic. Later on, the response can be sent to the chat using an AI agent message block along with the session parameter.


This approach also offers the flexibility to save the potential response internally for testing or evaluation purposes, while still allowing the conversation to progress without sending the response to the customer immediately.

In addition to the "ugptResponse" session parameter, we also provide access to the articles sourced from the knowledge base used as context for the generated response through the "dataSources" session parameter. Users can retrieve information from up to five articles using this parameter. 

Escalation needed

The escalation needed scenario is activated when the AI agent identifies that the customer's intention is to speak with a human rather than posing a question or engaging in small talk. In such instances, we promptly trigger the scenario and guide the conversation along the pre-designed dialogue path.
Just like the "response generated" scenario, the “escalation required” scenario also continues within the same reply. To handle this scenario effectively, the AI agent builder needs to continue the dialogue by incorporating further blocks. This may involve linking to another reply or adding an escalation block to save the response.

Not understood

The Generative replies block includes two additional scenarios that are activated when the AI agent fails to generate a response. By default, both scenarios are directly linked to their respective system replies. The first scenario is called the "not understood" scenario, which is directly linked to the "default reply."

The "not understood" scenario comes into play when the AI agent is unable to find relevant articles or data to generate a response. However, you can toggle off the direct linking to the "default reply" if you want to continue the dialogue in such situations.

An error occurred

The second scenario that may be activated when generative replies fail is the "error occurred" scenario. This occurs when the generative replies service is either unreachable, returns an error, or encounters another issue within the system. By default, this scenario is directly linked to the "Technical error reply." However, similar to the "not understood" scenario, the dialogue can be continued by disabling the fallback option in the block drawer.

It's essential to note that only in the "response generated" scenario, the generative reply and used articles are saved to the underlying session parameters. Whenever a new Generative replies block and the "response generated" scenario are successfully triggered, the content of these session parameters gets overwritten. This ensures that the most recent response is always captured for future use

Showing which help center articles were used to generate a reply

One of the parameters that is returned with the Generative replies block is dataSources which can be used to show the articles used to form the response so users can dive further into details outside the chat. These can be included in carousels to make the experience more visual. To do this, follow the below instructions.

  1. Add a Conditional Block
  2. In the conditional block, set the variable ugptClassifiedTask
  3. As a condition, set the operator to IS and include the valuequestion answering to cover questions the End User might have with your knowledge base or even when the End User inputs any small talk.
  4. Create n AI agent Message as a Fallback to the Conditional Block
  5. Add a Carousel block.
  6. Convert it to a dynamic carrousel by going to the block details drawer and pressing the Convert To Dynamic Carousel button
  7. Add the dynamic content as dataSources
  8. Customize the template card and button using the parameters %title and %url for the respective fields
  9. Remove the fallback toggle.
    The template card button with an external link in a Dynamic Carousel is expected to be the last interaction of the end user with the AI agent. Instead of clicking the links, when anything is typed below, it triggers the fallback. By turning off the Fallback button it will restart the conversation when the user asks another question. 
    Correto.gif

Defining a custom question for the Generative replies block

When editing the Generative replies block, you can define a custom question. The custom question will overwrite the customer's last message, like a button push, allowing you to provide contextually relevant answers. The field also allows you to use parameters to include information about the user to make a question more relevant, like their subscription status or tier.

Additional considerations for generative replies for email AI agents

Outside of the following exceptions, the generative replies functionality described in the rest of this article is identical between messaging and email AI agents:

  • AI-generated responses require additional language for email AI agents. For email AI agents, you must write additional response text to couch the AI agent’s reply. This behavior is different from generative replies for messaging AI agents, where a default AI response is sent on its own. The screenshot below shows an example response for an email AI agent.
  • No escalation options for email AI agents. A Generative replies block in a dialogue for an email AI agent doesn’t have an escalation option like it does for a messaging AI agent. The screenshot below shows dialogue build for an email AI agent with a Fallback block instead of an Escalation required block. The Fallback block is how you address scenarios where the AI agent can't answer the customer’s question with a generative reply.

Powered by Zendesk