https://retellai.com/?utm_source=discord&utm_medium=seo logo
In the simulation tab, I am setting up and executi...
# ❓・ai-evy-support
d
@AI Evy In the simulation tab, I am setting up and executing test cases. My agent utilizes functions to transfer calls appropriately to either other agents or humans via phone number. The default prompt in the custom function mock is very basic, "successfully completed the task" but the tests are failing in a loop at this point. Could someone please advise the kinds of prompts that should be included? I've attached an example.
a
Thanks for tagging me @digitalbar_74522. I'll look through relevant sources and get back to you shortly.
### Answer When setting up function mocks for simulation testing, you can configure mock responses for functions during testing [(1) ]() . This response will be returned instead of making an actual function call, ensuring that no real execution occurs . For your call transfer function mock, the mock response should provide meaningful context that helps the conversation progress naturally rather than just "successfully completed the task." Consider including: 1. Specific outcome information - What happened as a result of the transfer (e.g., "Call successfully transferred to sales department" or "Connected to agent John at extension 1234") 2. Status confirmation - Clear indication that the action completed (e.g., "Transfer initiated" or "Routing complete") 3. Next steps or context - Information the agent can use to continue the conversation appropriately The loop issue you're experiencing may be related to the
ConversationLoopError
that occurs when the system detects potential looping behavior [(2) ]() . According to community discussions, this can happen even when there's no actual loop, particularly in longer conversations . To address this: - Ensure your mock response provides enough information for the agent to move forward in the conversation [(1) ]() - Vary how the agent responds to avoid repetitive phrasing [(2) ]() - Add clear end points to your test scenarios - Consider using batch testing, which can help with longer conversation flows You can configure these mocks in the LLM Playground under "Mock Custom Function" [(1) ]() or when setting up test variables and functi
on mocks in your simulation test cases [(3) ]() . **
​ To learn more, see the sources I considered: [[1] Manually test your agent](https://docs.retellai.com/test/llm-playground) [[2] Simulation Tests – ConversationLoopError (Increase message limit)](https://discord.com/channels/1186424376300679209/1387066442276667517) [[3] Automatically test your agent](https://docs.retellai.com/test/llm-simulation-testing) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.