No-CodeIntermediate

How to Connect Voiceflow to a Custom AI Model and System Prompt

Use Voiceflow's AI Response block to call a specific model with your own system prompt and temperature, then feed it variables from the conversation.

9 minIntermediate

Beyond answering from a knowledge base, Voiceflow can generate free-form replies with an AI Response block. You choose the model, write a system prompt, set temperature, and inject conversation variables into the prompt. This guide shows how to wire a controlled, on-brand generative reply.

What you need

  • A Voiceflow agent project open on the canvas
  • A clear idea of the persona and rules the bot should follow
  • At least one captured variable to personalize replies (optional)

Step 1: Capture a variable first

Drag a Capture block onto the canvas to store the user's reply into a variable, for example {user_name}. You will reference this inside the AI prompt so the generated answer feels personal.

Step 2: Add an AI Response block

Drop in a Response block and switch its mode to AI (Generative). In its settings, choose the model, set the system prompt, and pick a temperature. Lower temperature means more predictable, on-brand answers; higher means more creative and more risk of drift.

Voiceflow — AI Response settings
AI Response
----------------------------------------
Model Claude / GPT (select)
Temperature 0.3
Max tokens 300
System prompt:
You are Acme's friendly concierge.
Address the user as {user_name}.
Only discuss Acme products.
[ Save ]
Model, system prompt, and temperature for the block.
Keep generative replies fenced in
Put hard rules in the system prompt: what topics to refuse, what tone to use, and to never invent prices. Generative blocks are powerful but will happily improvise unless you constrain them.

Step 3: Inject variables into the prompt

Reference captured variables with curly braces directly in the system or user prompt. Voiceflow substitutes the stored value at run time before sending the prompt to the model.

AI Response prompt
System:
You are Acme's concierge. The customer's name is {user_name}.
Their current plan is {plan_tier}. Recommend only upgrades
above their tier. Decline off-topic questions politely.

User:
{last_utterance}

Step 4: Test with the variables set

Run the tester and walk through the flow so the capture step fills the variables before the AI block runs. The tester's variable panel lets you confirm the values were stored.

Voiceflow — Test with variables
Agent
Hi there, what's your name?
You
Maya
Agent
Great to meet you, Maya. Since you're on the Starter plan, the Pro tier would unlock unlimited exports. Want a quick rundown?
Generated reply using the captured name.

Result

Your bot now produces personalized, rule-bound replies driven by a model you chose and variables you captured. Use a low temperature in production and only raise it once you trust the guardrails in your prompt.

Watch related tutorials

Tags
#voiceflow#ai#prompt#variables#no-code