https://retellai.com/?utm_source=discord&utm_medium=seo logo
I'm having issues with calls at volume being relia...
# ❓・ai-evy-support
r
@AI Evy I'm having issues with calls at volume being reliable with real inbound callers. Everything is fine on the test bench but when we start taking really calls we get 30% failure. The agent just doesn't do what's it told. We have worked and reworked the prompts but are at a loss. We are using Gemini 2.5 flash as llm.
a
Thanks for tagging me @ritzy78. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, there's a documented case of similar LLM timeout issues with Gemini [(1) ]() . When an agent times out randomly and the caller has said something (not related to function calls) , this has been reported as an issue with Gemini models . The sources indicate that different LLMs have varying reliability for voice interactions [(2) ]() . When choosing an LLM for your voice AI agents, you need to balance latency, context retention, and ability to handle specialized vocabulary . Some LLMs excel at general conversations but may have issues in production environments . For your specific situation with Gemini 2.5 Flash experiencing 30% failure rates at volume, consider these configuration options available in Retell AI: Agent Configuration Settings: -
responsiveness
- controls how responsive the agent is, ranging from [0,1] [(3) ]() [(4) ]() [(5) ]() [(6) ]() -
interruption_sensitivity
- controls how sensitive the agent is to user interruptions, ranging from [0,1] [(3) ]() [(4) ]() [(6) ]() -
normalize_for_speech
- converts text to spoken form for more consistent speech synthesis [(3) ]() [(4) ]() -
boosted_keywords
- provides a customized list of keywords to bias the transcriber model [(3) ](
s/update-agent) [(4) ]() [(5) ]() -
vocab_specialization
- determines the vocabulary set for transcription (options:
general
,
medical
) Additional Troubleshooting Options: - Try adjusting
stt_mode
between
fast
and
accurate
[(4) ]() [(5) ]() - Review
denoising_mode
settings (
noise-cancellation
vs
noise-and-background-speech-cancellation
) [(3) ]() [(4) ]() [(5) ]() - Check
allow_user_dtmf
and
user_dtmf_options
if DTMF input might be interfering Based on the community report, switching LLMs resolved similar timeout issues [(1) ]() . However, I understand you've indicated Gemini is the only one that works reliably with your prompt instructions . Would you like me to provide a general answer about LLM selection strategies for production voice agents?
​ To learn more, see the sources I considered: [[1] LLM Failure to Respond](https://discord.com/channels/1186424376300679209/1415738738809634987) [[2] 2025 B2B Guide to AI Phone Calls & Voice Agents | Retell AI | Retell AI](https://www.retellai.com/blog/b2b-guide-to-ai-phone-calls) [[3] Update Agent](https://docs.retellai.com/api-references/update-agent) [[4] Update Agent](https://docs.retellai.com/api-references/update-agent) [[5] Create Agent](https://docs.retellai.com/api-references/create-agent) [[6] Get Agent](https://docs.retellai.com/api-references/get-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy The task is inbound say is very simple. Answer calls route to 4 states. In states take the enquiry which then sends to tool webhook.
a
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
### Answer Based on your description of a simple inbound routing task with 4 states and webhook tool calls, here are specific configuration approaches for Retell AI: ## Inbound Call Webhook Setup For routing inbound calls to different agents based on caller information, you can configure an inbound call webhook on your phone number [(1) ]() . This webhook is triggered when an inbound call is received, allowing you to: - Override the agent ID dynamically - Set dynamic variables specific to that call - Route to different agents based on
from_number
or
to_number
The webhook receives a payload like this :
Copy code
json
{
  "event": "call_inbound",
  "call_inbound": {
    "agent_id": "agent_12345",
    "from_number": "+12137771234",
    "to_number": "+14157774444"
  }
}
You can configure this webhook URL when creating or updating a phone number [(2) ]() :
Copy code
javascript
const phoneNumberResponse = await client.phoneNumber.create({
  inbound_webhook_url: "<https://example.com/inbound-webhook%22>
}) ;
## Webhook for Tool Calls For sending enquiry data to your webhook tool, Retell AI supports call event webhooks that can notify your system at different stages [(3) ]() : -
call_started
- when a call begins -
call_ended
- when a call completes -
call_analyzed
- when call analysis is complete The webhook payload includes the full call object :
Copy code
json
{
  "event_type": "call_ended",
  "call": {
    // Full call data
  }
}
## Reliability Considerations Given your 30% failure rate at volume with Gemini 2.5 Flash, the webhook approach might help by: 1. Using the inbound webhook to route calls to specialized agents per state [(1) ]() [(4) ](

▾

) 2. Reducing complexity in each agent's prompt by having state-specific agents 3. Ensuring webhook tool calls have proper timeout configuration (webhooks have a 10-second timeout with up to 3 retries) [(1) ]() [(3) ]() The platform recently added webhook timeout controls where you can now control timeout settings for both workspace-level and agent-level webhooks [(5) ]() . Would adjusting your architecture to use multiple simpler agents (one per state) via inbound webhook routing help with the reliability issues you're experiencing? **
​ To learn more, see the sources I considered: [[1] Inbound call webhook](https://docs.retellai.com/features/inbound-call-webhook) [[2] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) [[3] Webhook Overview](https://docs.retellai.com/features/webhook-overview) [[4] Personalization with Airtable](

https://www.youtube.com/watch?v=U8jdhkqOOhE▾

) [[5] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy it's like it doesn't follow the prompt
a
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
### Answer --- ### Answer When agents don't follow prompts reliably at scale, especially with complex routing logic, there are several prompt engineering strategies from Retell AI documentation that can help: [(1) ]() ## Prompt Structure Best Practices Use Sectional Prompts Break down your system prompts into smaller, focused sections like identity, style, guidelines, and task. This makes prompts easier for the LLM to understand and more maintainable.
Copy code
///## Identity
You are a friendly AI assistant for Retell AI. ....
///## Style Guardrails
Be concise: ...
Be conversational: ...
...
///## Response Guideline
Return dates in their spoken forms: ...
Ask up to one question at a time: ...
...
///## Task
1. Greet the user
...
Write Tasks as Explicit Steps For routing logic across 4 states, write your task as numbered steps with clear logic. This ensures the agent doesn't pack all questions together and follows the procedure.
Copy code
///## Task
1. Ask for user's name.
2. Ask if user needs a refund, need a replacement, or just retrieving information.
 - if user needs a refund, transition to refund state.
 - if user needs a replacement, transition to replacement state.
3. If user is just retrieving information, ask for the order number.
...
If the agent still isn't stopping at the right time, add explicit
wait for user response
markers:
Copy code
///## Task
1. Inform user why you are calling.
2. Ask for user's name.
wait for user response
3. Ask if user needs a refund, need a replacement, or just retrieving information.
wait for user response
 - if user needs a refund, transition to refund state.
 - if user needs a replacement, transition to replacement state.
4. Ask for the order number.
wait for user response
...
## Consider Multi-Prompt Architecture Given your 30% failure rate with a simple 4-state routing task, you may be hitting the limitations of single prompt agents. [(2) ]() Single Prompt Limitations at Scale: - Behavioral Drift: Agent deviates from instructions in edge cases - Function Calling Issues: Unreliable tool usage with multiple functions - Context Confusion: Agent struggles to track conversation state Consider upgrading to multi-prompt when your single prompt exceeds 500 words or uses more than 3 functions. Multi-Prompt Agent Benefits: Each state gets its own focused prompt and behavior: - Focused Prompt: Specific instructions for that conversation phase - State-Specific Functions: Only relevant tools available in each state - Transition Logic: Clear conditions for moving between states - Context Preservation: Variables and information flow between states ## Community-Reported Solutions From community discussions, when prompts become too complex with skip logic, making them more natural language helps the LLM understand better. [(3) ]() Instead of complex conditional instructions, use clearer, more conversational phrasing. For agents that repeat actions or don't follow instructions consistently, using markdown formatting and being explicit about function execution helps. [(4) ]() For example, saying "Run the function 'update_description' to update..." instead of just "Call update_description". Would restructuring your 4-state routing into a multi-prompt agent with dedicated states help with the reliability issues you're experiencing? --- **
​ To learn more, see the sources I considered: [[1] Write a single prompt](https://docs.retellai.com/build/single-multi-prompt/write-single-prompt) [[2] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) [[3] Prompt](https://discord.com/channels/1186424376300679209/1277004188437577749) [[4] Single prompt is confirming action twice](https://discord.com/channels/1186424376300679209/1351007284431552572) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy this is a multi prompt agent already with each task a seperate state. I cant seem to get the prompt reliable.
a
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
## Community-Reported Issues There's a documented pattern where Gemini models can have reliability issues in production. [(5) ]() [(6) ]() Community members have reported that conversational flows can get stuck or lost in nodes, and that prompt engineering helps but may not fully resolve the issue. [(6) ]() One community member noted: "exactly... CF gets stuck easily" and "one issue i have with multiprompt is that it sometimes will say things like 'calling function end_call' which is bizarre". ## Alternative Approach Given the persistent 30% failure rate, consider testing with a different LLM model temporarily to isolate whether this is a Gemini-specific issue or a prompt architecture problem. Available models include: [(1) ]() [(2) ]() [(3) ]() -
gpt-4.1
-
gpt-4.1-mini
-
claude-3.7-sonnet
-
gemini-2.0-flash
If switching models resolves the issue, it would confirm this is LLM-specific rather than a prompt design problem. Would you be able to share a sanitized version of one of your state prompts? That might help identify specific prompt patterns causing the reliability issues.
### Answer Given you're already using a multi-prompt agent with separate states and still experiencing reliability issues with Gemini 2.5 Flash, here are specific configuration options to try: ## LLM Configuration Adjustments Since you're using Gemini 2.5 Flash, try adjusting these LLM-specific parameters: [(1) ]() [(2) ]() [(3) ]() Model Temperature Lower the
model_temperature
to make responses more deterministic:
Copy code
json
{
  "model_temperature": 0
}
Tool Call Strict Mode Enable
tool_call_strict_mode
to ensure tool call arguments follow the JSON schema more reliably (note: this is only applicable for GPT-4o models, but worth checking if there's a similar parameter for Gemini) :
Copy code
json
{
  "tool_call_strict_mode": true
}
## State Transition Definition For your 4-state routing, ensure each state has explicit transition logic defined in the
edges
field: [(4) ]() [(1) ]() [(2) ]() [(3) ]()
Copy code
json
{
  "states": [
    {
      "name": "information_collection",
      "state_prompt": "You will follow the steps below to collect information...",
      "edges": [
        {
          "destination_state_name": "appointment_booking",
          "description": "Transition to book an appointment."
        }
      ]
    }
  ]
}
[(1) ]() [(2) ]() [(3) ]() In your state prompts, be explicit about when to transition: [(4) ]()
Copy code
7. Ask if user is interested in an in person tour.
 - if yes, transition to schedule_tour.
 - if no or hesitant, call function end_call to hang up politely and say will reach out if any other interesting properties pop up.
​ To learn more, see the sources I considered: [[1] List Retell LLMs](https://docs.retellai.com/api-references/list-retell-llms) [[2] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[3] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) [[4] Build a multi-prompt agent](https://docs.retellai.com/build/single-multi-prompt/write-multi-prompt) [[5] Multi-Prompt Agent State Transition - LLM Prompt Mechanics](https://discord.com/channels/1186424376300679209/1395545946066129039) [[6] Discord message from @met123_383913 on 2025-02-25](https://discord.com/channels/1186424376300679209/1186462578310910112/1344080899934785588) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
## State-Specific Function Calling For your multi-prompt agent, ensure each state has only the tools it needs [(2) ]() [(3) ]() [(4) ]() . If this state should end the call, define the
end_call
function in the state's tools array:
Copy code
json
{
  "states": [
    {
      "name": "job_application_status",
      "state_prompt": "Your prompt here...",
      "tools": [
        {
          "type": "end_call",
          "name": "end_call",
          "description": "End the call with user."
        }
      ]
    }
  ]
}
[(3) ]() [(4) ]() ## Transition Logic Definition Define clear edges for state transitions [(1) ]() [(4) ]() :
Copy code
json
{
  "edges": [
    {
      "destination_state_name": "escalation_handling",
      "description": "Transition when caller requests to speak to someone or escalates."
    }
  ]
}
In your state prompt, explicitly reference the transition [(1) ]() :
Copy code
5. Conclude Call or Handle Escalation:
- If caller requests to speak to someone, transition to escalation_handling
- If caller is satisfied, call function end_call to conclude politely
## Community-Reported Solutions From community discussions, when multi-prompt agents don't reliably follow instructions, adding more explicit language helps [(5) ]() :
Copy code
Wait for the user response:
If caller provides job title: Immediately deliver the scripted response. You must do this without fail.
Also, keep general functions (like
end_call
) at the agent level, and state-specific functions within each state [(6) ]() . ## Testing Recommendation Given your 30% failure rate with Gemini 2.5 Flash, consider temporarily testing with a different model to isolate whether this is LLM-specific [(3) ]() [(7) ]() . Available models include
gpt-4.1
,
claude-3.7-sonnet
, or
gemini-2.0-flash
. Would restructuring your prompt with these explicit markers and simplified logic help with the reliability issues?
### Answer Based on your prompt, there are several specific improvements that can help with reliability in a multi-prompt agent: ## Prompt Structure Issues Your prompt has several characteristics that can cause unreliable behavior with LLMs at scale: 1. Implicit State Transitions Your prompt mentions "Conclude Call or Handle Escalation" and references a "Universal prompt" but doesn't explicitly define when to transition states [(1) ]() . In multi-prompt agents, you need explicit transition logic like:
Copy code
5. Conclude Call or Handle Escalation:
- If caller requests to speak to someone, transition to escalation_state
- If caller is satisfied and says goodbye, call function end_call
2. Missing "Wait for User Response" Markers Your conversation flow moves through steps but doesn't explicitly tell the LLM to pause. Add explicit wait markers after each question :
Copy code
1. Initial Greeting: Say: "I can help with that. Could you please tell me which job application you're calling about?"
wait for user response
2. Listen & Analyse: Listen carefully and identify the job title or role mentioned by the caller.
3. Complex Conditional Logic Your "Silently Normalize" instruction asks the LLM to perform complex reasoning mid-conversation. This can cause behavioral drift [(2) ]() . Consider simplifying to:
Copy code
2. Listen & Capture: Listen carefully and capture the job title exactly as the caller states it.
3. Deliver Scripted Response: Once the caller provides their job title, respond with:
"I know waiting can be tough, and we really appreciate your patience with your [job title] application..."
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy ROLE: You are an assistant responsible for politely and clearly managing caller expectations about their job application status. Your tone should always be empathetic, respectful, and reassuring, while remaining firm and consistent. OBJECTIVES: - Identify which job the caller is enquiring about. - Deliver the standard scripted response to set clear expectations about the application process. CONVERSATION FLOW: 1. Initial Greeting: Say: "I can help with that. Could you please tell me which job application you’re calling about?" 2. Listen & Analyse: Listen carefully and identify the job title or role mentioned by the caller. • Silently Normalize: Clean up the caller's phrasing into a natural title (e.g., "utility in mine site" → "Utility position", "kitchen hand" → "Kitchen Hand position", "the civil job" → "Civil role"). 3. Deliver Scripted Response: Once the caller provides a clear job title, respond with: "I know waiting can be tough, and we really appreciate your patience with your [Normalized Job Title] application. We’ve had a large number of applicants for that role, and right now we’re only reaching out to candidates who’ve been shortlisted for interview. If you’ve been contacted, then you’ve been shortlisted. Otherwise, we’ll keep your details on file for future opportunities. Best of luck with your job search!" 4. Handle General Questions: If the caller asks a general company question (e.g., office hours, services, or a site address), use the knowledge base. After answering, gently bring the focus back: "Is there anything else I can help you with regarding your application?" 5. Conclude Call or Handle Escalation: After delivering the scripted response, guide the conversation toward closing. Handle any escalations per the Universal prompt. 6. Polite Conclusion: Pause to allow the caller to respond. - If they say "thank you" or something similar, respond with:
a
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
### Answer Based on your prompt, here are specific improvements to increase reliability for your multi-prompt agent: ## Critical Prompt Structure Issues 1. Add Explicit "Wait for User Response" Markers Your prompt moves through steps without telling the LLM to pause [(1) ]() . Add explicit wait markers after each question [(2) ]() :
Copy code
1. Initial Greeting: Say: "I can help with that. Could you please tell me which job application you're calling about?"
wait for user response

2. Listen & Analyse: Listen carefully and identify the job title or role mentioned by the caller.
wait for user response

3. Deliver Scripted Response: Once the caller provides a clear job title, respond with:
"I know waiting can be tough, and we really appreciate your patience with your [Normalized Job Title] application..."
wait for user response
2. Define Explicit State Transitions Your prompt references "Handle any escalations per the Universal prompt" but doesn't explicitly define when to transition states [(1) ]() . In multi-prompt agents, you need explicit transition logic like :
Copy code
5. Conclude Call or Handle Escalation:
- If caller requests to speak to someone or escalates, transition to escalation_handling
- If caller asks another question about their application, stay in current state
- If caller is satisfied and says goodbye, call function end_call
3. Simplify the Normalization Logic Your "Silently Normalize" instruction asks the LLM to perform complex reasoning mid-conversation, which can cause behavioral drift [(3) ]() . Community members have found that making transition instructions more emphatic helps [(4) ]() :
Copy code
2. Listen & Capture: Listen carefully and capture the job title exactly as the caller states it.

3. Deliver Scripted Response: Once the caller provides their job title, you must immediately deliver this response without fail:
"I know waiting can be tough, and we really appreciate your patience with your [job title] application..."
## State Configuration Ensure your state has only the tools it needs [(3) ]() [(5) ]() . If this state should end calls, define the
end_call
function in the state's tools array [(5) ]() :
Copy code
json
{
  "states": [
    {
      "name": "job_application_status",
      "state_prompt": "Your prompt here...",
      "tools": [
        {
          "type": "end_call",
          "name": "end_call",
          "description": "End the call with user."
        }
      ],
      "edges": [
        {
          "destination_state_name": "escalation_handling",
          "description": "Transition when caller requests to speak to someone or escalates."
        }
      ]
    }
  ]
}
​ To learn more, see the sources I considered: [[1] Build a multi-prompt agent](https://docs.retellai.com/build/single-multi-prompt/write-multi-prompt) [[2] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) [[3] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) [[4] Discord message from @jrok1308 on 2025-10-18](https://discord.com/channels/1186424376300679209/1186462578310910112/1429218557765484544) [[5] List Retell LLMs](https://docs.retellai.com/api-references/list-retell-llms) [[6] Multi-Prompt Agent State Transition - LLM Prompt Mechanics](https://discord.com/channels/1186424376300679209/1395545946066129039) [[7] Multi prompt agent not always transitioning to the next state](https://discord.com/channels/1186424376300679209/1412769473227657329) ​
## LLM Configuration Since you're experiencing 30% failure rates with Gemini 2.5 Flash, try these adjustments : - Lower
model_temperature
to 0 for more deterministic responses - Consider testing with alternative models like
gpt-4.1
,
claude-3.7-sonnet
, or
gemini-2.0-flash
to isolate whether this is LLM-specific Community members have reported that Gemini models can have reliability issues in production [(6) ]() , and that explicit transition instructions help [(4) ]() [(7) ]() . Would restructuring your prompt with these explicit markers and simplified logic help address the 30% failure rate?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer Based on the documentation, here's an example of a well-structured multi-prompt agent from the "Lead Qualification" template [(1) ]() [(2) ]() : ## State 1: Information Collection
Copy code
## Identity
You are a friendly AI assistant calling from Retell Hospital.

## Style Guardrails
- Be concise: keep responses brief
- Be conversational: use natural language
- Ask one question at a time

## Task
1. Greet the user
2. Ask for user's name
wait for user response
3. Ask if user needs a refund, replacement, or just information
wait for user response
 - if user needs a refund, transition to refund_state
 - if user needs a replacement, transition to replacement_state
4. If user is just retrieving information, ask for the order number
wait for user response
[(2) ]() ## State 2: Appointment Booking
Copy code
## Task
1. Check available appointment slots
2. Present available times to the user
wait for user response
3. Confirm the date, time, and timezone selected by user: "Just to confirm, you want to book the appointment at ..."
wait for user response
4. Once confirmed, call function book_appointment to book the appointment
## Key Elements for Reliable Multi-Prompt Agents 1. Clear State Transitions Define when to transition in your prompt:
Copy code
7. Ask if user is interested in an in person tour.
 - if yes, transition to schedule_tour.
 - if no or hesitant, call function end_call to hang up politely and say will reach out if any other interesting properties pop up.
2. Explicit Function Calling Be specific about when to call functions:
Copy code
3. Confirm the date, time, and timezone selected by user: "Just to confirm, you want to book the appointment at ...". Make sure this is a time from the available slots.
4. Once confirmed, call function book_appointment to book the appointment.
3. Wait Markers Add explicit
wait for user response
after each question to prevent the agent from rushing through steps. 4. Focused Prompts [(1) ]() Each state should have its own focused prompt with specific instructions for that conversation phase , state-specific functions with only relevant tools available , and clear transition logic with conditions for moving between states . The multi-prompt structure helps minimize behavioral drift , improves function calling reliability , and reduces context confusion compared to single prompt agents.
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) [[2] Build a multi-prompt agent](https://docs.retellai.com/build/single-multi-prompt/write-multi-prompt) ​
r
@AI Evy can you give me an example of a perfect multi-prompt prompt
a
## Multi-Prompt Architecture Benefits State-Specific Features Each state in a multi-prompt agent should include: - **Focused Prompt**: Specific instructions for that conversation phase - **State-Specific Functions**: Only relevant tools available in each state - **Transition Logic**: Clear conditions for moving between states - **Context Preservation**: Variables and information flow between states ## When to Use Multi-Prompt Consider upgrading to multi-prompt when : - Your single prompt exceeds 500 words - You use more than 3 functions - You experience behavioral drift (agent deviates from instructions) - Function calling becomes unreliable - The agent struggles to track conversation state ## Configuration Options Basic Settings [(2) ]() Configure your agent with: - Language model selection (recommend starting with GPT-4.1) - Voice settings - Conversation initiation (user-first or agent-first) - Global prompt for persona and guardrails - Speech settings (responsiveness, interruption sensitivity, backchanneling) LLM Configuration [(3) ]() Key parameters include: - `model_temperature`: Controls randomness (0-1 range, lower = more deterministic) - `tool_call_strict_mode`: Ensures tool call arguments follow JSON schema - `states`: Array defining each conversation state with prompts and edges - `starting_state`: Name of the initial state The multi-prompt structure helps minimize behavioral drift, improves function calling reliability, and reduces context confusion compared to single prompt agents [(1) ]() . **
​ To learn more, see the sources I considered: [[1] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) [[2] Step 2: Configure the basic settings](https://docs.retellai.com/build/single-multi-prompt/configure-basic-settings) [[3] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) ​
### Answer Based on the available sources, here's a comprehensive list of prompt rules for multi-prompt agents in Retell AI: ## Core Structural Rules 1. Use Sectional Organization [(1) ]() Break prompts into focused sections: - Identity - Style Guardrails - Response Guidelines - Task 2. Write Tasks as Numbered Steps Structure your task section with explicit numbered steps to ensure the agent follows procedures sequentially. 3. Add Explicit Wait Markers Include
wait for user response
after each question to prevent the agent from rushing through steps. 4. Define Clear State Transitions Explicitly state when to transition between states using conditional logic:
Copy code
- if user needs a refund, transition to refund_state
- if user needs a replacement, transition to replacement_state
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy can you give me a list of prompt rules for multi-prompt agent
a
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy for a multi-prompt agent with 4 states and 2 tools per state collecting name , email, phone number and then calling a tool what llm do you recommend with what settings?
a
### Answer ### Answer For a multi-prompt agent with 4 states and 2 tools per state collecting name, email, phone number and calling a tool, here are the recommended LLM settings: ## Recommended Model GPT-4.1 is the recommended starting point for multi-prompt agents with tool calling. [(1) ]() [(2) ]() The available model options include: [(3) ]() [(1) ]() [(2) ]() -
gpt-5
-
gpt-5-mini
-
gpt-5-nano
-
gpt-4o
-
gpt-4o-mini
-
gpt-4.1
(recommended default) -
gpt-4.1-mini
-
gpt-4.1-nano
-
claude-3.7-sonnet
-
claude-3.5-haiku
-
gemini-2.0-flash
-
gemini-2.0-flash-lite
-
gemini-2.5-flash
-
gemini-2.5-flash-lite
## Recommended Configuration Settings For reliable tool calling with your data collection workflow, configure these parameters:
Copy code
json
{
  "model": "gpt-4.1",
  "model_temperature": 0,
  "model_high_priority": true,
  "tool_call_strict_mode": true
}
Key Settings Explained: - `model_temperature`: Set to
0
for more deterministic responses, which is recommended for tool calling - `model_high_priority`: Set to
true
to enable fast tier with dedicated resources for lower and more consistent latency - `tool_call_strict_mode`: Set to
true
to use structured output ensuring tool call arguments follow the JSON schema (only applicable for GPT-4o or GPT-4o mini models) ## State Configuration Example For your 4-state agent collecting information, structure each state with specific tools: [(3) ]() [(1) ]()
Copy code
json
{
  "states": [
    {
      "name": "information_collection",
      "state_prompt": "You will follow the steps below to collect information...",
      "edges": [
        {
          "destination_state_name": "appointment_booking",
          "description": "Transition to book an appointment."
        }
      ],
      "tools": [
        {
          "type": "transfer_call",
          "name": "transfer_to_support",
          "description": "Transfer to the support team.",
          "transfer_destination": {
            "type": "predefined",
            "number": "16175551212",
            "ignore_e164_validation": false
          },
          "transfer_option": {
            "type": "cold_transfer",
            "show_transferee_as_caller": false
          }
        }
      ]
    }
  ],
  "starting_state": "information_collection"
}
## Additional Consideration Given your previous experience with Gemini 2.5 Flash having 30% failure rates, GPT-4.1 with
model_temperature
set to
0
and
tool_call_strict_mode
enabled should provide more reliable tool calling for your data collection workflow. [(3) ]() [(1) ]() [(2) ]() However, based on community reports, there have been challenges with realtime GPT models and tool calling reliability. [(4) ]() If you encounter issues with tool calling consistency, you may need to provide very explicit instructions in your prompts, such as: "after saying this... call function 'end_call' EVERY TIME". --- **
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) [[2] List Retell LLMs](https://docs.retellai.com/api-references/list-retell-llms) [[3] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[4] Your realtime gpt doesn't do tool calling](https://discord.com/channels/1186424376300679209/1408560992836915260) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer --- No, the JSON shown in the previous response is not part of the prompt itself. That JSON represents the API configuration for creating or updating a Retell LLM multi-prompt agent. [(1) ]() ## Two Separate Components *1. The Prompt (Plain Text) * Your state prompts are written in plain text with clear instructions: [(2) ]()
Copy code
## Task
1. Greet the user
2. Ask for user's name
wait for user response
3. Ask if user needs a refund, replacement, or just information
wait for user response
 - if user needs a refund, transition to refund_state
 - if user needs a replacement, transition to replacement_state
*2. The API Configuration (JSON) * The JSON is used when you create or update your agent via the Retell API to configure the LLM settings, states, tools, and transitions. [(1) ]() For example, the
model_temperature
,
tool_call_strict_mode
, and
states
array are all part of the API request body, not the prompt text itself. ## Where Each Goes - Your prompts go in the
state_prompt
field within each state object in the JSON - The JSON structure defines how states connect, what tools are available, and LLM configuration settings So when building your 4-state agent with 2 tools per state, you would: 1. Write your prompts as plain text instructions [(2) ]() 2. Use the API (or dashboard) to configure the agent structure with JSON that includes those prompts in the
state_prompt
fields [(1) ]() The JSON configuration is how you tell Retell AI about your agent's architecture, not part of what the LLM sees during conversations.
​ To learn more, see the sources I considered: [[1] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[2] Build a multi-prompt agent](https://docs.retellai.com/build/single-multi-prompt/write-multi-prompt) ​
r
@AI Evy is that using json in the prompt it self?
a
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy is there settings in the api that sent in the visual editor?
a
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
​ To learn more, see the sources I considered: [[1] Step 2: Configure the basic settings](https://docs.retellai.com/build/single-multi-prompt/configure-basic-settings) [[2] Multi-prompt agent creation using Retell API](https://discord.com/channels/1186424376300679209/1338253252587946146) ​
### Answer --- Yes, the visual editor in the Retell AI dashboard exposes most of the same configuration settings that are available through the API. [(1) ]() ## Settings Available in Both Dashboard and API Basic Configuration Settings The dashboard allows you to configure: - Language model selection (GPT-4.1, Claude, Gemini, etc.) - Voice settings and voice selection - Conversation initiation (user-first or agent-first) - Global prompt for persona and guardrails Advanced Speech Settings Both dashboard and API support: - Background sound - Responsiveness - Interruption sensitivity - Backchanneling - Boosted keywords - Speech normalization - Reminder frequency - Pronunciation guides Call Settings Available in both interfaces: - Voicemail detection and handling - Call operation settings ## Multi-Prompt Agent Configuration For multi-prompt agents specifically, the API provides programmatic access to create and configure agents with states, tools, and transitions. [(2) ]() The dashboard offers a visual drag-and-drop interface for the same functionality, but both ultimately configure the same underlying agent structure. The key difference is that the API gives you programmatic control through JSON configuration, while the dashboard provides a visual interface for the same settings. Both methods create agents with the same capabilities and configuration options. Would you like to know about any specific setting differences between the dashboard and API?
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy can you generate me a prompt I can use to improve or fix my existing prompts
a
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
### Answer Based on the documentation, here's a comprehensive prompt improvement template you can use to review and fix your existing multi-prompt agent prompts: [(1) ]() [(2) ]() ## Prompt Review Checklist Template
Copy code
PROMPT IMPROVEMENT CHECKLIST FOR MULTI-PROMPT AGENTS

## 1. SECTIONAL STRUCTURE CHECK
Does your prompt include these sections?
□ Identity (who the agent is)
□ Style Guardrails (how to communicate)
□ Response Guidelines (formatting rules)
□ Task (what to accomplish)

## 2. TASK STRUCTURE CHECK
□ Are tasks written as numbered steps?
□ Does each question have "wait for user response" after it?
□ Are conditional branches clearly marked with "if/then" logic?

## 3. STATE TRANSITION CHECK
□ Are state transitions explicitly defined?
□ Do transitions use this format:
   "- if [condition], transition to [state_name]"
□ Is it clear when to stay in current state vs. transition?

## 4. FUNCTION CALLING CHECK
□ Are function calls explicitly instructed?
□ Do instructions say "call function [function_name]"?
□ Is it clear WHEN to call each function?

## 5. CLARITY CHECK
□ Is each instruction unambiguous?
□ Are there any complex reasoning tasks that could be simplified?
□ Does the agent know to ask ONE question at a time?
## Prompt Improvement Template Here's a template you can use to restructure your existing prompts:
Copy code
///## Identity
You are a [role] for [company name].
Your purpose is to [specific goal].

///## Style Guardrails
Be concise: Keep responses under 2 sentences unless explaining complex topics.
Be conversational: Use natural language and contractions.
Be empathetic: Show understanding for the caller's situation.
Ask one question at a time: Avoid overwhelming the caller.

///## Response Guidelines
Return dates in spoken form: Say "January fifteenth" not "1/15".
Confirm understanding: Paraphrase important information back to the caller.
[Add other formatting rules specific to your use case]

///## Task
1. [First step with clear instruction]
wait for user response

2. [Second step]
wait for user response
 - if [condition A], transition to [state_name_A]
 - if [condition B], transition to [state_name_B]

3. [Next step - only if conditions above not met]
wait for user response

4. Once [specific condition is met], call function [function_name] to [action]

5. Conclude:
 - if [escalation condition], transition to [escalation_state]
 - if [completion condition], call function end_call
## Key Improvements to Apply Add Explicit Wait Markers [(2) ]() After every question, add
wait for user response
to prevent the agent from rushing through steps. Simplify Complex Logic [(1) ]() If your prompt asks the LLM to "silently normalize" or perform complex reasoning, break it into simpler, explicit steps. Make Transitions Emphatic [(3) ]() Use strong language like "you must immediately" or "without fail" for critical actions. Define Clear Conditions [(4) ]() [(3) ]() State transitions need specific, unambiguous conditions in both the prompt AND the edge configuration. This template addresses the reliability issues you've been experiencing by incorporating the best practices from Retell AI's documentation and community-reported solutions. [(1) ]() [(2) ]() [(3) ]()
​ To learn more, see the sources I considered: [[1] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) [[2] Write a single prompt](https://docs.retellai.com/build/single-multi-prompt/write-single-prompt) [[3] Discord message from @jrok1308 on 2025-10-18](https://discord.com/channels/1186424376300679209/1186462578310910112/1429218557765484544) [[4] Multi prompt agent not always transitioning to the next state](https://discord.com/channels/1186424376300679209/1412769473227657329) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer Based on the documentation, here's a more detailed and comprehensive prompt improvement template for multi-prompt agents: [(1) ]() ## Detailed Prompt Review & Improvement Framework
Copy code
COMPREHENSIVE PROMPT IMPROVEMENT CHECKLIST FOR MULTI-PROMPT AGENTS

## 1. IDENTITY SECTION - DETAILED CHECK
□ Does your identity clearly state the agent's role?
□ Is the company name mentioned?
□ Is the agent's specific purpose/expertise defined?
□ Example format:
   "You are a [specific role] for [Company Name].
    Your role is to [specific purpose].
    You have expertise in [relevant domains]."

## 2. STYLE GUARDRAILS - DETAILED CHECK
□ Conciseness rule: "Keep responses under 2 sentences unless explaining complex topics"
□ Conversational tone: "Use natural language, contractions, and acknowledge what the caller says"
□ Empathy instruction: "Show understanding for the caller's situation"
□ Question pacing: "Ask one question at a time to avoid overwhelming the caller"
□ Are there industry-specific tone requirements?

## 3. RESPONSE GUIDELINES - DETAILED CHECK
□ Date formatting: "Return dates in spoken form: Say 'January fifteenth' not '1/15'"
□ Confirmation protocol: "Paraphrase important information back to the caller"
□ Number formatting rules (if applicable)
□ Address formatting rules (if applicable)
□ Time zone handling (if applicable)

## 4. TASK STRUCTURE - DETAILED CHECK
□ Each step is numbered sequentially
□ Each question ends with "wait for user response"
□ Conditional logic uses explicit "if/then" format
□ State transitions are clearly marked
□ Function calls are explicitly instructed with "call function [name]"
□ No ambiguous instructions like "handle appropriately" or "as needed"

## 5. STATE TRANSITION LOGIC - DETAILED CHECK
□ Every possible user response path is covered
□ Transitions use exact format: "if [condition], transition to [state_name]"
□ Fallback behavior is defined for unexpected responses
□ No circular transition logic that could trap the agent

## 6. FUNCTION CALLING - DETAILED CHECK
□ Function calls use imperative language: "call f
Copy code
unction [name]"
□ Timing is explicit: "Once [condition], immediately call function [name]"
□ Critical functions include emphatic language: "You must invoke [function] without fail"
□ Function parameters are clearly specified
□ No optional function calls unless explicitly stated

## 7. EDGE CASE HANDLING - DETAILED CHECK
□ Objection responses are scripted
□ Escalation paths are defined
□ Timeout/silence handling is specified
□ Interruption recovery is addressed
□ Off-topic response handling is defined
## Enhanced Prompt Template with Detailed Instructions
Copy code
///## Identity
You are a [specific role with credentials] for [Company Name].
Your role is to [primary objective] while [secondary objectives].
You have expertise in [domain 1], [domain 2], and [domain 3].
[Add any compliance disclaimers if required for your industry]

///## Style Guardrails
Be concise: Keep responses under 2 sentences unless explaining complex topics.
Be conversational: Use natural language, contractions, and acknowledge what the caller says.
Be empathetic: Show understanding for the caller's situation with phrases like "I understand" or "I hear you".
Ask one question at a time: Avoid overwhelming the caller with multiple questions.
Use active listening: Acknowledge information before proceeding to next step.
Maintain professional tone: Even when handling objections or difficult situations.

///## Response Guidelines
Return dates in spoken form: Say "January fifteenth" not "1/15".
Confirm understanding: Paraphrase important information back to the caller.
Use caller's name: When provided, use it naturally in conversation.
Spell out acronyms: On first use, then use acronym thereafter.
Handle corrections: If caller corrects information, acknowledge and update immediately.
[Add domain-specific formatting rules]

///## Task
1. Initial Greeting and Introduction
   Say: "[Greeting], this is [Agent Name] from [Company]. [Purpose statement]."
   wait for user response

2. Qualify the Caller's Need
   Ask: "[Specific qualifying question]?"
   wait for user response
   
   - if caller says [specific phrase A] or [specific phrase B], transition to [state_name_A]
   - if caller says [specific phrase C] or [specific phrase D], transition to [state_name_B]
   - if caller is unclear, ask clarifying question: "[Clarification question]?"
     wait for user response

3. [Next Major Step - Only if conditions above not met]
   Provide information: "[Specific info
Copy code
rmation to share]"
   Then ask: "[Follow-up question]?"
   wait for user response

4. Data Collection (if applicable)
   Ask for [specific data point]: "[Exact question]?"
   wait for user response
   Confirm: "Just to confirm, you said [repeat data]. Is that correct?"
   wait for user response
   - if confirmed, proceed to step 5
   - if not confirmed, ask again: "Could you please provide [data point] again?"
     wait for user response

5. Action Execution
   Once [specific condition is clearly met], you must immediately and without fail call function [function_name] with the following parameters:
   - [parameter_1]: [value from step X]
   - [parameter_2]: [value from step Y]
   This is critical and non-negotiable.

6. Conclusion and Next Steps
   After function execution, inform caller: "[Outcome statement]"
   Then:
   - if caller has additional questions, return to step 2
   - if caller requests escalation, transition to [escalation_state]
   - if caller is satisfied, call function end_call with message: "[Closing statement]"

///## Objection Handling
If caller says they're not interested: "I understand. Is there anything specific about [topic] that concerns you?"
wait for user response

If caller is frustrated: "I hear your frustration, and I want to help resolve this. Let me [specific action]."
wait for user response

If caller asks to speak to someone: "I'd be happy to connect you. Before I do, let me make sure I have all the information. [Specific question]?"
wait for user response
- if caller insists, transition to [escalation_state]
- if caller provides information, continue with task

[Add other common objections specific to your use case]

///## Error Recovery
If caller provides unclear information: "I want to make sure I understand correctly. Did you mean [interpretation A] or [interpretation B]?"
wait for user response

If system error occurs: "I
Copy code
apologize for the technical difficulty. Let me [alternative action]. [Question to continue]?"
wait for user response

If caller interrupts mid-sentence: Acknowledge the interruption, then: "I understand. [Address their point]. [Return to task]?"
wait for user response
This enhanced template addresses the reliability issues by incorporating explicit instructions, emphatic language for critical actions, and comprehensive edge case handling. [(1) ]() [(2) ]() [(10) ]()
r
@AI Evy can you make that prompt more detailed
a
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
## Critical Reliability Enhancements 1. Emphatic Function Calling Instructions [(2) ]() For critical functions, use language like:
Copy code
IMPORTANT: When invoking the [function_name], treat it like a high-priority action. 
Do not skip or delay this step. It is a "make-or-break" moment in the conversation.
You must invoke the [function_name] function at this point without fail. 
This is critical and non-negotiable. There must be no delay or hesitation.
2. Explicit State Transition Conditions [(3) ]() [(2) ]() Define transitions with multiple trigger phrases:
Copy code
- if positive response (examples: "yes", "sure", "okay", "sounds good", "let's do it") , 
  immediately transition to [next_state]
- if negative response (examples: "no", "not interested", "maybe later") , 
  [alternative action]
3. Wait Markers After Every User Interaction [(3) ]() Never skip
wait for user response
after questions or information requests. 4. Fallback Paths for Unexpected Responses [(4) ]()
Copy code
- if user response is unclear or off-topic, ask: "I want to make sure I help you correctly. 
  Are you calling about [option A] or [option B]?"
  wait for user response
​ To learn more, see the sources I considered: [[1] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) [[2] Multi prompt agent not always transitioning to the next state](https://discord.com/channels/1186424376300679209/1303504848196472893) [[3] Build a multi-prompt agent](https://docs.retellai.com/build/single-multi-prompt/write-multi-prompt) [[4] Single/Multi Prompt Agent Overview](https://docs.retellai.com/build/single-multi-prompt/prompt-overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
r
@AI Evy what llm temperature do you recommend for gpt-4.1 fast?
a
Thanks for the follow-up, @ritzy78. I'll get back to you soon.
### Answer Based on the documentation, for GPT-4.1 with fast tier enabled (
model_high_priority: true
) , the recommended temperature setting is 0. [(1) ]() [(2) ]() The
model_temperature
parameter controls the randomness of responses, with values ranging from 0 to 1. [(1) ]() [(3) ]() [(4) ]() Lower values produce more deterministic outputs, while higher values introduce more variation. [(2) ]() For your use case (4-state agent with tool calling for data collection) , here's the recommended configuration:
Copy code
json
{
  "model": "gpt-4.1",
  "model_temperature": 0,
  "model_high_priority": true,
  "tool_call_strict_mode": true
}
[(1) ]() [(3) ]() [(4) ]() Why temperature 0 is recommended: [(1) ]() [(2) ]() - **Tool calling reliability**: Lower temperatures are specifically recommended for function/tool calling scenarios - **Data accuracy**: For collecting name, email, and phone number, you want consistent, deterministic behavior [(2) ]() - **Reduced hallucination**: Temperature 0 minimizes unpredictable responses that could cause the 30% failure rate you've been experiencing Temperature recommendations by use case: - **Appointment Booking**: 0.1-0.3 for accurate data capture - **Customer Support**: 0.3-0.5 for consistent yet natural responses - **Sales Outreach**: 0.5-0.7 for engaging conversations - **Virtual Companion**: 0.7-0.9 for human-like variation Since your agent is collecting structured data and making tool calls, temperature 0 is the optimal setting for reliability. [(1) ]() [(2) ]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
​ To learn more, see the sources I considered: [[1] Create Retell LLM](https://docs.retellai.com/api-references/create-retell-llm) [[2] Configure LLM Options](https://docs.retellai.com/build/llm-options) [[3] Get Retell LLM](https://docs.retellai.com/api-references/get-retell-llm) [[4] List Retell LLMs](https://docs.retellai.com/api-references/list-retell-llms) ​