https://retellai.com/?utm_source=discord&utm_medium=seo logo
<@1145576664366055464> How did retell implement m...
# ❓・ai-evy-support
l
@AI Evy How did retell implement multiple prompt? which tech used for that?
a
Thanks for tagging me @luckyshark1012. I'll look through relevant sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Overview]() * [Introducing Retell LLM Beta]() * [Build a multi-prompt agent]() * [Platform Changelogs | Retell AI]() -----------------------------
### Answer Retell implements multi-prompt through a structured tree approach where each node can contain: 1. Its own specific prompt [(1)]() 2. Custom function calling instructions 3. Clear transition logic to other nodes The multi-prompt implementation allows for: - Breaking down complex conversations into distinct steps - Each state having its own prompt and transition logic [(2)]() - States can be connected through conditional edges - Multiple parent states can transition to the same child state [(3)]() Here's an example of how state transitions are defined in the 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.
[(4)]() The multi-prompt approach helps prevent common issues found in single-prompt agents, such as premature actions before completing required steps [(1)]() . It's especially recommended for scenarios where the agent's prompt is lengthy and tasks are too complex for a single input [(2)]() . For implementation, Retell provides: - A dashboard with drag-and-drop functionality for creating multi-prompt agents - API support for programmatic agent creation - GPT 3.5 and 4 as the underlying LLM options [(5)]()
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
@AI Evy Multi prompt result also output as single prompt with steps? If so please give me example output prompt
a
Thanks for the follow-up, @luckyshark1012. I'll get back to you soon.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Overview]() * [Build a multi-prompt agent]() * [Write a single prompt]() * [Integrate LLM]() -----------------------------
### Answer Yes, both single and multi-prompt approaches can be structured with steps. Here's an example of how steps are written in a single prompt:
Copy code
## Task
1. Ask for user's name.
2. Ask if user needs a refund, need a replacement, or just retriving information.
  - if user needs a refund, transition to refund state.
  - if user needs a replacement, transition to replacement state.
3. If user is just retriving information, ask for the order number.
...
[(1)]() For cases where you want to be more explicit about waiting for user responses:
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 retriving 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
...
The key difference is that multi-prompt allows you to break these steps into separate states with their own prompts and transition logic, while single prompt keeps everything in one comprehensive prompt [(2)]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
l
@AI Evy give me multiple prompt output
a
Thanks for the follow-up, @luckyshark1012. I'll get back to you soon.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Build a multi-prompt agent]() * [Overview]() * [Integrate LLM]() * [Build your first phone agent in 5 minutes]() -----------------------------
### Answer Based on the provided documentation, here's how multi-prompt states work in Retell AI:
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.
[(1)]() For state transitions:
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.
The multi-prompt approach allows you to break down conversations into distinct steps, with each state having its own specific prompt and transition logic [(2)]() . For example, a lead qualification template might have two distinct states: 1. Lead Qualification: Gather and verify required information 2. Appointment Scheduling: Book appointment after qualification Each state can have its own transition rules, and states can have multiple parent states transitioning to the same child state [(3)]() . The transition logic is better written within the states themselves, using phrases like "when xxx, go to state c" [(4)]() . This structured approach helps prevent issues like premature appointment booking before completing the qualification process [(2)]() .
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.