https://retellai.com/?utm_source=discord&utm_medium=seo logo
Simulation Tests – ConversationLoopError (Increase...
# ❓・bug-report
a
I'm currently facing an issue with simulation tests, specifically the error: " ConversationLoopError: Ending the conversation early as there might be a loop." This occurs even though, upon analysis, there is no looping or repetitive behavior. Our agent functions as a coach that gathers feedback on the learner, and it requires a fairly long conversation to complete all stages of the process. Due to this error, we're unable to run simulation tests to evaluate the agent's performance after modifying its instructions. Could you please let me know whether it's possible to increase the limit, or if there's another way to run a batch test that would give us an overview of performance?
s
Hey @alex16742s batch testing is a good workaround for now. It skips the loop detection, so you can test your full coaching flow without the convo getting cut off early. You can find batch testing under Simulation → LLM Simulation Testing → Batch test your agent in the Retell dashboard. That said, in live calls, the loop guard is still active. To avoid getting flagged: -> Vary how the agent responds (don’t repeat the same phrasing) -> Track convo progress to avoid circling -> Add clear end points If the flow is long by design and not actually looping, you can also reach out to Retell support they might be able to raise the limit or whitelist your use case.
a
Hey @shahretell Thanks for your prompt response. Simulation Batch test is actually where I experience the ConversationLoopError issue. Although it is also happening in Test -> Test LLM - AI Simulated Chat
s
Could you try relaxing the success conditions slightly on your side? In our case, the ConversationLoopError seems to get triggered when the success criteria are too strict, even though the conversation isn’t actually looping. This might help confirm whether it's just a flow-length issue vs. a real loop.
d
Hey @shahretell, I am running into the same issue where in batch testing I am getting a ConversationLoopError, even after making my success criteria simple one liners (these tests either pass or return the error upon consecutive testing). To add, I put a single success criteria of "Ensure agent responds." and got a pass, and then a ConversationLoopError testing it the second time.
k
Hi @shahretell and @AI Evy We all appear to have issues with loops in agents and simulations, could you provide guidance in this matter please?
a
Thanks for tagging me @kalpo_68378. I'll look through relevant sources and get back to you shortly.
### Answer Based on the discussion and available information, here are several approaches to address ConversationLoopError issues in Retell AI simulation testing: ## Recommended Solutions Add an explicit End Call node in your conversational flow [(1) ]() :
Copy code
json
{
  "type": "end_call",
  "parameters": {
    "message": "Great, we're all set—thanks!"
  }
}
Improve your transition conditions with deterministic prompts : - Use clear prompts like "If the system receives END, move to end_call" Add a timeout or loop-safety fallback :
Copy code
json
{
  "type": "tool",
  "name": "end_after_max_turns",
  "parameters": {
    "maxTurns": 3
  }
}
## Testing Approaches For simulation testing, you can create customer prompts using this recommended format [(2) ]() :
Copy code
///## Identity
Your name is Mike.
Your date of birth is June 10, 1999.
Your order number is 7891273.
///## Goal
Your primary objective is to return the package you received and get a refund.
///## Personality
You are a patient customer. However, if the conversation becomes too long or complicated, you will show signs of impatience. If the issue remains unresolved, you may become frustrated and angry.
For evaluation metrics, use this format :
Copy code
1. Verify that the customer successfully returned the package and received a refund.
2. Confirm that the end_call function was called at the end of the conversation.
3. Ensure the agent's responses are conversational and contain 5 sentences or fewer.
## Additional Recommendations To prevent loops in live calls: - Vary how the agent responds (don't repeat the same phrasing) [(3) ]() - Track conversation progress to avoid circling - Add clear end points For cases where the flow is long by design and not actually looping, you can reach out to Retell support as they might be able to raise the limit or whitelist your use case .
​ To learn more, see the sources I considered: [[1] Batch testing running into ConversationLoopError](https://discord.com/channels/1186424376300679209/1388208460990120007) [[2] Automatically test your agent](https://docs.retellai.com/test/llm-simulation-testing) [[3] Simulation Tests – ConversationLoopError (Increase message limit)](https://discord.com/channels/1186424376300679209/1387066442276667517) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
this way? @AI Evy
a
Thanks for the follow-up, @kalpo_68378. I'll get back to you soon.
### Answer Yes, exactly! You can tag @shahretell with additional questions about ConversationLoopError issues or other Retell AI topics. Based on the thread discussion, the key solutions for addressing ConversationLoopError in simulation testing include: For Conversation Flow agents: - Add explicit End Call nodes [(1) ]() - Improve transition conditions with deterministic prompts - Add timeout or loop-safety fallbacks For testing approaches: - Use the AI Simulated Chat feature under Test → Test LLM [(2) ]() - Create customer prompts with Identity, Goal, and Personality sections - Define clear evaluation metrics - Save successful test cases for future batch testing For live call prevention: - Vary agent responses to avoid repetitive phrasing [(3) ]() - Track conversation progress - Add clear end points If your flow is legitimately long and not actually looping, contacting Retell support for limit increases or use case whitelisting is also an option .
​ To learn more, see the sources I considered: [[1] Batch testing running into ConversationLoopError](https://discord.com/channels/1186424376300679209/1388208460990120007) [[2] Automatically test your agent](https://docs.retellai.com/test/llm-simulation-testing) [[3] Simulation Tests – ConversationLoopError (Increase message limit)](https://discord.com/channels/1186424376300679209/1387066442276667517) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
d
@shahretell Im encountering similar issues, my success critiera are extremely lax (1-2 lines). I even added a end_call function that gets called. However mine is a Single Prompt Agent not even a Conversation Flow or MultiPrompt - so not sure why a loop would be detected
I believe in our prompt we have a clause that specifically tells the user to reconfirm a question, which may be detected as a loop - but it functions as precaution to make sure the user answered correctly...
j
@AI Evy SMS agent is texting filler words like "um" - how do I modify this
a
Thanks for the follow-up, @jasoncassidy_71931. I'll get back to you soon.
### Answer Based on the available sources, I don't have specific information about how to prevent SMS agents from using filler words like "um" in text messages. The sources cover how to create SMS agents [(1) ]() [(2) ]() , configure SMS content [(3) ]() , and set up agent parameters [(4) ]() , but they don't specifically address controlling filler words in SMS responses. For text-based agents, you would typically want to modify the agent's prompt to explicitly instruct it not to use verbal filler words since these don't make sense in written text format. However, the specific implementation details for this aren't covered in the available documentation. I'd recommend checking out these potentially useful sources for more information about SMS agent configuration: - [Create Outbound SMS]() - [SMS Node]() - [Unlock AI Texting, SMS, & Chatbots with Retell AI Agents]() Would you like me to try to provide a general answer based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Create Outbound SMS](https://docs.retellai.com/api-references/create-sms-chat) [[2] Unlock AI Texting, SMS, & Chatbots with Retell AI Agents | Retell AI | Retell AI](https://www.retellai.com/blog/unlock-ai-texting-with-retell-ai-voice-agents) [[3] SMS Node](https://docs.retellai.com/build/conversation-flow/sms-node) [[4] Create Agent](https://docs.retellai.com/api-references/create-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.