https://retellai.com/?utm_source=discord&utm_medium=seo logo
my multi prompt agent is not transitioning states ...
# ❓・ai-evy-support
h
@AI Evy my multi prompt agent is not transitioning states reliably. what should I do for the edge transition conditions and prompts to make this more reliable?
a
Thanks for tagging me @hintenjoyer. I'll look through relevant sources and get back to you shortly.
​ 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] Multi prompt agent not always transitioning to the next state](https://discord.com/channels/1186424376300679209/1412769473227657329) [[3] Get Retell LLM](https://docs.retellai.com/api-references/get-retell-llm) [[4] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) ​
### Answer To improve multi-prompt agent state transition reliability, here are the key strategies: 1. Define Clear State Transition Logic in Prompts Include explicit transition conditions in your state prompts [(1) ]() . For example:
Copy code
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. Use Explicit Transition Instructions In your state prompts, directly tell the agent when to transition by including instructions like "transition to state 'classify_caller'" [(2) ]() . This approach can be more reliable than relying solely on edge conditions . 3. Consider Model Selection The reliability of state transitions can vary by model . Make sure you're using an appropriate LLM model for your use case, as some models handle state transitions more consistently than others [(3) ]() . 4. Structure Your Edge Conditions Properly When setting up edge conditions, be specific about the user intents that should trigger transitions [(2) ]() . For example: - "Transition if the user wants to check availability, make a booking, reserve a studio, or asks if a studio is free" - Include specific examples like "I want to check availability", "Can I book a studio?", "Is Studio 1 free tomorrow?" 5. Consider Conversation Flow for Complex Logic If you're experiencing persistent reliability issues with multi-prompt agents, consider switching to Conversation Flow agents for more complex scenarios [(4) ]() . Conversation Flow provides more deterministic control over state transitions and is recommended when you have multiple decision branches or need more predictable agent behavior . **Note on Testing**: There's a known issue where state transitions may work in voice testing but not in chat testing [(2) ]() , so make sure to test your agent using voice calls for the most accurate results.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.