Sign In
Sign In
  1. Home
  2. BUILD
  3. Steps in Flow Builder
  4. 🪄 Generate with AI
BUILD
49 articles
Categories
Bulk translate
Steps in Flow Builder11
Start Intent1
🪄 Generate with AI4
Answers
File Upload
LiveChat Handover7
Ticket Handover1
APIs
Data Manipulation2
Variables
Logic & Conditions2
User Input
[Deprecated] Draft Mode & Advanced Builder10
Trace in Flow Builder
Use Cases5

🪄 Generate with AI

Add the Generate with AI step to produce dynamic answers, extract structured data, or query your Knowledge Base.

Updated on October 15, 2026

The Generate with AI step allows you to add a Generative AI capability directly inside your conversation flow.
It can be used to generate text, extract structured information, or enrich user answers with external knowledge.

❗️ To use the Gen AI step, you must have configured Louis AI.

When to use the Gen AI step

Use the Gen AI step whenever you need the bot to produce a dynamic answer or analyze user input beyond simple scripted logic.

Common use cases:
• ✍️ Generate personalized answers based on context or previous variables.
• 🧾 Extract and structure information (e.g., booking data, names, emails, flight numbers).
• 🔍 Query your Knowledge Base to answer FAQ-type questions.
• 🧠 Transform data — for example: summarize, translate, or format user input.

💡 Example to collect data If a user types:

“My flight is AF1234 from Paris to Geneva tomorrow”

You can use the Gen AI step to extract {flight_number, departure_city, arrival_city, date} as structured variables.

How it works

Step 1 — Add the block

Add a Generate with AI block in your flow.
Connect it after an intent or another step that collects user input.

Step 2 — Configure step

In the right panel:
• Description → Add a short note about the purpose of this step.
• AI Prompt → Select an existing prompt or create a new one.
• Output variable → Choose the variable where the AI output will be stored.

Step 3 — Create or edit a Prompt

When you click Create New Prompt, you’ll enter the Prompt Editor, composed of:

System Prompt

Describe the role and context for the AI.
Example:

“You are an assistant that extracts structured booking information from a user’s message.”

User Prompt

Define the instruction or user message. You can use flow variables here, e.g.:

{{user_input}}

Use prompt samples to quick start

Advanced Settings

Click Advanced Parameters to open the Advanced Settings panel, which lists everything the AI can do while it answers:

  • Tools: actions the AI triggers on its own, such as an API call, with the option to save the values it fills in to variables.

  • Knowledge Base search: the AI searches your knowledge base only when the answer may rely on it, with filters and a built-in test.

  • JSON output: forces the model to return structured data in a defined JSON format.

    • JSON Schema: defines expected fields and types (e.g., string, number, boolean).

  • Conversation history: gives the AI the context of the latest exchanges.

  • Exit conditions: let the AI choose the branch the step leaves through.

For details, see the articles Tools, Knowledge Base search and Exit conditions.

You can also start from a JSON template using “Start with a JSON example”.

📘 Learn how to master JSON Schema

Step 4 — Test your prompt

Click Test AI Response to preview the generated output.

When satisfied, save your prompt.

Save the result in a variable

You must save the answer to use it after in your flow.

Advanced usage

Combine with API calls

Use the Gen AI step to format or preprocess data before an API request.
For example: extract a date and send it to an external booking API.

Use with Knowledge Base

Turn on Knowledge Base search so the AI relies on your documents when the answer needs them — perfect for RAG-style answers powered by Louis AI. It only searches when it needs to, and you can restrict the search by document, language, state or folder. Learn more.

JSON mode for structured automation

Enable JSON Output and define a schema to make the AI return data you can reuse later in the flow:

{
"name": "string",
"email": "string",
"destination": "string"
}

This structured output can then be passed into API calls, conditional logic, or agent handovers.

💡 Tips & Best Practices

Text to copy
•	Write a precise system prompt (define the role, style, and expected output).
•	Use JSON Output when your next step depends on structured data.
•	Always test your prompt before publishing.
•	Avoid vague or open-ended instructions unless the goal is text generation.

Sub-articles

Prompt Versioning
Manage AI Specialist prompt versions with separate Draft, Production, and Archived states to iterate on prompts safely.
Updated on September 24, 2026
Tools in the Gen AI step
Let the AI act in the Generate with AI step: pick the tools it can call and keep the values it fills in in your flow variables.
Updated on October 15, 2026
Knowledge Base search in the Gen AI step
Let the AI search your documents only when a question needs it, and choose what it can read: documents, language, state, folder and ranking.
Updated on October 15, 2026
Exit conditions in the Gen AI step
Let the AI decide when the Generate with AI step is over and which way the conversation goes next, with one branch per exit on the canvas.
Updated on October 15, 2026

Was this article helpful?

On this page
  • Step 1 — Add the block
  • Step 2 — Configure step
  • Step 3 — Create or edit a Prompt
  • Use prompt samples to quick start
  • Advanced Settings
  • Step 4 — Test your prompt
  • Save the result in a variable
  • Combine with API calls
  • Use with Knowledge Base
  • JSON mode for structured automation

Made from France 💙

Categories

  • ANALYTICS
  • BUILD
  • LOUIS AI
  • INTEGRATE

🔗 Useful Links

  • Sign In
  • Website
  • Terms & Conditions

© 2026

MindsayPowered by Mindsay

Search the help center…

Search help center articles