In AI agents - Advanced, generative replies refers to the ability of zero-training AI agents and AI agents with agentic AI to create and send AI-generated answers in response to customer questions.
Generative replies can be activated through either the generative replies system reply or the generative replies block in the dialogue builder. This article covers how to use the generative replies block in the dialogue builder.
The article contains the following sections:
- Adding and configuring a generative replies block in a dialogue
- Showing which help center articles were used to generate a reply
- Creating a custom question to provide more context for a generative reply
Related article:
Adding and configuring a generative replies block in a dialogue
Within a conversation flow, the generative replies block responds to a customer's question with information generated from an imported knowledge source.
To add a generative replies block in a dialogue
- In AI agents - Advanced, create a new dialogue or open one for editing.
- Click the plus icon (+) where you want to insert a generative reply and select Generative replies.

After you add a generative reply block, you still need to perform the following additional steps:
Configuring the child blocks
Response generated
In the response generated scenario, an AI agent successfully generates a response to a customer message by considering both the information from the knowledge source and the specific query.
- ugptResponse: Retains the response from the AI agent, which can be used immediately in the conversation or saved for later reference.
- dataSources: Retains up to five of the knowledge base articles used as context for the generated response.
-
Share with the customer: The AI agent immediately sends the generated
response to the conversation.

-
Save response only: The AI agent does not send the response directly to the
conversation, and only retains it in the session parameter ugptResponse. The
dialogue continues with other blocks and logic.
The response can be used for testing or evaluation purposes. It can also be shared with the customer later using an AI agent message block along with the session parameter using the reference {{ugptResponse}}.
Tip: For email AI agents, consider including additional response text to frame the AI agent’s reply. For example, including the text “Our AI agent has suggested the following answer:” as a lead in to the text of the generative reply.
Escalation needed
The escalation needed scenario is activated when the AI agent identifies that the customer wants to speak with a human. In this scenario, information is not saved to the ugptResponse and dataSources session parameters.
To handle this scenario, continue the dialogue by incorporating further blocks, such as another reply or an escalation block.

Configuring the response fallback behavior
- Not understood: The AI agent is unable to find relevant articles or data to generate a response. By default, this scenario links to the default reply.
- An error occurred: The generative replies service is either unreachable, returns an error, or encounters another issue within the system. By default, this scenario links to the Technical error system reply


Showing which help center articles were used to generate a reply
The dataSources session parameter, which is returned with the generative reply, can be used to provide the customer with access to the articles that a messaging AI agent’s response was based on. Using carousels to provide this content can improve the customer experience by adding a visual element.
- In AI agents - Advanced, create a new dialogue or open one for editing.
- Click the plus (+) icon to add a conditional block in the appropriate location.
- In the conditional block, set the variable
ugptClassifiedTask. - As a condition, set the operator to
isand include the valuequestion answering. - Click the plus (+) icon to add an AI agent message to the fallback of the conditional
block.

- Click the plus (+) icon to add a carousel block to the
isquestion answeringcondition block.The carousel block appears along with the first card block and a Details pane.
- In the Details pane, click Convert to dynamic carousel and enter
dataSourcesas the array type parameter. - In the template card block, enter text or parameters such as
%imageurl,%titleand%descriptionin the respective fields. - In the template card button block, select Button with external link and enter
text or a parameter such as
%buttontext. - In the Details pane, deactivate the fallback block by setting the Fallback toggle to
off.
Omitting the fallback allows the conversation to restart if the customer asks another question.

Creating a custom question to provide more context for a generative reply
By default, the generative replies block uses the customer's latest message as a prompt when searching your knowledge sources for an answer. However, if the customer's latest message doesn't actually include all the relevant information, the AI agent may be unable to generate an accurate response.
To address this, you can define a custom question that overwrites the customer's last message as the prompt the AI agent uses to search your knowledge sources. The custom question allows you to incorporate context from previous messages, including intents, specific user inputs, session parameters, and more. This enables the AI agent to provide more precise and contextually relevant generative replies, even when the original context is not readily available in the latest customer message.
For example, consider the following exchange:
- The customer inquires about their recommended shoe size.
- The AI agent asks for their foot length in centimeters and their sizing information (UK, US, or EU).
- The customer provides their answers, which are stored as session parameters {{foot_length_cm}} and {{location}}.
At this point in the dialogue, you can insert a generative replies block with the following custom question: "Which shoe size would you recommend based on my {{foot_length_cm}} and my {{location}}?"
With this custom question, the AI agent has enough context to search your knowledge sources and deliver an accurate answer to the customer's sizing inquiry based on the stored session parameters. Without the custom question, the user's latest message would be their sizing location, which wouldn't provide the AI agent with enough context to generate a useful answer.
To create a custom question
- In AI agents - Advanced, create a new dialogue or open one for editing.
- Select an existing generative replies block or add a new one.
- In Custom question (optional), enter the text of your custom question.

- Save or Publish your changes.