https://retellai.com/?utm_source=discord&utm_medium=seo logo
Do you have any suggestions for changing this conv...
# ❓・ai-evy-support
b
@AI Evy Do you have any suggestions for changing this conversation node prompt to eliminate these 4 issues a lead experienced when talking to my AI voice agent?: Here is the prompt: "Based on the slots available in {{appointments}}, help them book a slot by giving them the soonest day available. The current time is The current time is: {{current_time_America/Los_Angeles}}. Say 'So I see that the soonest appointment is on [day, date, and time]' without again mentioning the location name. Make sure you're only mentioning one appointment at a time until they've decided on one slot" This particular lead did not want the first given appointment and went back and forth with the AI agent many times until they eventually just ended the call since they could not get the time they wanted. Here are the 4 issues: 1. AI mentions "2025" every time it present an appointment time and date, mentioning the year is unnecessary because it is obvious that it's for 2025. 2. AI always presents the soonest appointment TIME, not only the soonest date after the patient doesn't want the first one. Make the AI work more collaborative with the interests of the patient, right now it seems like the AI isn't even listening to the patient or trying to understand what they want. Potentially an individual or combined issue: The AI always just present the next appointment time when the patient says "no" rather than trying to get more info from the patient after realising they've said no twice in a row. A human would at that point ask the patient for their preferences before going back and looking for a slot. 3. Mentioned the same slot twice (the absolute first appointment available) that the user already said they didn't want. 4. When user asked if there was any appointments between November 24th to 28th, the AI ignored it and said again that the soonest appointment is on November 17th at 8 am.
a
Thanks for tagging me @byredyre. I'll look through relevant sources and get back to you shortly.
### Answer Here are suggestions for improving your conversation node prompt in Retell AI’s Conversation Flow to address the issues you described: 1. Suppressing the year (“2025”) in appointment responses: Update your prompt to explicitly instruct the agent not to mention the year unless it is different from the current year. For example: “When presenting appointment dates, do not mention the year unless it is not the current year.” 2. Making the agent collaborative and responsive to patient preferences: Add logic in your node or edge transitions so that if the user rejects the first (or second) offered slot, the agent asks follow-up questions to clarify the user’s preferences (e.g., “What day or time works better for you?”) before suggesting another slot. Structure your node like: “If the user rejects the suggested slot more than once, ask them for their preferred days or times before suggesting another appointment.” 3. Avoid suggesting the same slot repeatedly: Ensure your prompt or node logic tracks which slots have already been offered and skips them when making subsequent suggestions. For example: “Do not suggest the same appointment slot to the user more than once during the conversation.” 4. Responding to specific date range requests: Add handling in your prompt and node logic for user requests about specific date ranges. For example: “If the user asks for appointments within a specific date range, only suggest slots that fall within that range. If none are available, inform the user and ask if other dates would work.” For structured flows, use nodes and conditional transitions to handle these user scenarios. Retell AI’s Conversation Flow allows you to create nodes for different states (e.g., slot rejected, ask for preferences, filter by date range) and edges to transition between them based
on user responses [(1) ]() [(2) ]() [(3) ]() . This approach makes your agent more dynamic and user-friendly, reducing repetitive or irrelevant responses.
​ To learn more, see the sources I considered: [[1] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[2] Retell AI’s Advanced Conversation Flow | Retell AI](https://www.retellai.com/blog/unlocking-complex-interactions-with-retell-ais-conversation-flow) [[3] Training & Customizing AI Voice Agents | Retell AI](https://www.retellai.com/blog/training-and-customizing-voice-agents-with-retell-ai) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy So what does the final prompt look like?
a
Thanks for the follow-up, @byredyre. I'll get back to you soon.
### Answer Based on the official documentation and prompt engineering best practices for Retell AI, you can structure your conversation node prompt for an appointment booking agent like this: When presenting appointment slots: - Do not mention the year unless it is different from the current year. - If the user rejects the first or second suggested slot, ask them for their preferred days or times before suggesting another appointment. - Do not suggest the same appointment slot more than once during the conversation. - If the user asks for appointments within a specific date range, only suggest slots that fall within that range. If none are available, inform the user and ask if other dates would work. Example prompt for your node:
Copy code
Based on the slots available in {{appointments}}, help the user book a slot by first giving them the soonest day available (do not mention the year unless it is not the current year) . The current time is: {{current_time_America/Los_Angeles}}.

Say: "So I see that the soonest appointment is on [day, date, and time]" (do not mention the location name again) . Only mention one appointment at a time until the user decides on a slot.

If the user rejects a slot, do not repeat the same slot. If the user says 'no' twice, ask them what days or times work better before suggesting another slot.

If the user asks for appointments between certain dates, only mention slots within the requested range. If none are available, let them know and ask if other dates would work.
This approach uses stateful logic and clear prompt instructions as recommended for multi-prompt agents or structured nodes [(1) ]() [(2) ]() [(3) ]() .
​ 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] Update Retell LLM](https://docs.retellai.com/api-references/update-retell-llm) [[3] Prompt Engineering](https://www.retellai.com/glossary/prompt-engineering) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy what should the transition condition say?
a
Thanks for the follow-up, @byredyre. I'll get back to you soon.
### Answer For a transition condition in a Retell AI conversation flow agent, you should use a "prompt" type transition condition that clearly describes the user action or intent that should trigger the transition to the next node. The "prompt" parameter is what the LLM or evaluation engine uses to determine if the edge should be taken. For example, if you want to transition when the user rejects an appointment slot, you could set the transition condition like this:
Copy code
json
"transition_condition": {
  "type": "prompt",
  "prompt": "The user rejects the suggested appointment slot or says they are not available at that time."
}
If you want to handle the case where the user requests a specific date range, you could use:
Copy code
json
"transition_condition": {
  "type": "prompt",
  "prompt": "The user asks for appointments between specific dates or within a certain date range."
}
You can create as many edges as needed, each with its own transition condition, to handle different user intents or responses. The prompt text should match the scenario you want the agent to detect to move to the appropriate node [(1) ]() [(2) ]() [(3) ]() .
​ To learn more, see the sources I considered: [[1] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[3] Transition condition in Conversation flow agent](https://discord.com/channels/1186424376300679209/1389012084276334724) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy i mean the next step after this conversation node is an extract variable
a
Thanks for the follow-up, @byredyre. I'll get back to you soon.
### Answer If the next step after your conversation node is an Extract Dynamic Variable Node, the transition condition should be configured so that the agent moves to the extract variable node after the user provides the information you want to capture. You can use equation-based transition conditions to check if the expected variable has been provided. For example, if you want to extract a variable called appointment_date, you can use:
Copy code
- {{appointment_date}} exists
This means the transition from the conversation node to the extract variable node will occur when the user has supplied the relevant information, and the variable is present [(1) ]() [(2) ]() . For more details and examples, see: [Step 3: Add transition conditions]()
​ To learn more, see the sources I considered: [[1] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[2] Discord message from @q40478 on 2025-10-19](https://discord.com/channels/1186424376300679209/1186462578310910112/1429479310925758515) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy why not "User confirmed the appointment time"
a
Thanks for the follow-up, @byredyre. I'll get back to you soon.
### Answer "User confirmed the appointment time" can be used as a prompt-type transition condition in Retell AI, and it is a valid approach if you want to move to the next node (such as an extract variable node) only when the user has explicitly confirmed the appointment [(1) ]() [(2) ]() [(3) ]() . The prompt parameter is what the LLM or evaluation engine uses to determine if the edge should trigger, and you can set it to any clear user intent you want to detect, like user confirmation [(1) ]() [(3) ]() . Alternatively, if you are using equation-based conditions and want to ensure a specific dynamic variable (such as the appointment time) is present before transitioning, you can use an equation like {{appointment_time}} exists [(2) ]() . Both approaches are supported—choose the one that best fits your flow logic: prompt-type for intent-based transitions, or equation-type for variable existence [(2) ]() [(1) ]() [(3) ]() .
​ To learn more, see the sources I considered: [[1] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[2] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) [[3] Transition condition in Conversation flow agent](https://discord.com/channels/1186424376300679209/1389012084276334724) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.