https://retellai.com/?utm_source=discord&utm_medium=seo logo
when the agent is cut off, instead of responding n...
# ❓・ai-evy-support
b
@AI Evy when the agent is cut off, instead of responding naturally, it will repeat the entire sentence again. What is a better way to prompt it so this behavior doesn't happen?
a
Thanks for tagging me @Bobster2002. I'll look through relevant sources and get back to you shortly.
### Answer When your agent is interrupted and repeats the entire sentence instead of responding naturally, you can adjust the interruption_sensitivity parameter. [(1) ]() [(2) ]() The
interruption_sensitivity
parameter controls how sensitive the agent is to user interruptions. The value ranges from 0 to 1, where a lower value means it takes longer for the user to interrupt the agent, and a higher value makes it easier for the user to interrupt. Additionally, consider these settings to improve interruption handling: **Enable Dynamic Responsiveness**: Set
enable_dynamic_responsiveness
to true so the agent dynamically adjusts how quickly it responds based on the user's speech rate and past turn-taking behavior in the call. **Adjust Responsiveness**: The
responsiveness
parameter (ranging from 0 to 1) controls how responsive the agent is overall. A lower value means the agent waits more and responds slower, while a higher value means faster exchanges. **Prompting Strategy**: In your agent's prompt, include explicit instructions about how to handle interruptions naturally. For example, instruct the agent to acknowledge the interruption and continue from context rather than restarting the sentence. From community discussions, adjusting interruption sensitivity has been suggested as a fix when agents are being cut off or interrupting each other. [(3) ]()
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) [[2] Get Voice Agent](https://docs.retellai.com/api-references/get-agent) [[3] Agent_error](https://discord.com/channels/1186424376300679209/1423757670933987489) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
When prompted like that, the agent still doesn't behave as accepted, it doesn't have an internal state of "interrupted"
@AI Evy When prompted like that, the agent still doesn't behave as accepted, it doesn't have an internal state of "interrupted"
a
Thanks for the follow-up, @Bobster2002. I'll get back to you soon.
### Answer You're right that the agent doesn't have an explicit "interrupted" state flag. Retell AI's turn-taking model handles interruptions through its proprietary system that combines Voice Activity Detection (VAD) and predictive timing. [(1) ]() When using the LLM WebSocket integration, you receive real-time updates about the conversation flow through different event types. [(2) ]() The system sends
update_only
events with live transcript updates, and
response_required
events when the agent should respond. However, there isn't a specific "interrupted" flag passed to your custom LLM. Workarounds to handle interruption behavior: 1. **Track conversation context yourself**: In your custom LLM implementation, maintain state about what the agent was saying. When you receive a new
response_required
event while the agent was mid-response, you can infer an interruption occurred and adjust the response accordingly. 2. **Use session variables**: Store the agent's last incomplete statement in session variables, then reference it in your prompt to acknowledge the interruption naturally. [(3) ]() 3. **Implement better turn-taking in your prompt**: According to community discussions, if the agent doesn't handle interruptions well, you may need to adjust the
interruption_sensitivity
parameter at the state level if using multi-state agents, or refine your prompting to explicitly handle mid-sentence breaks. [(4) ]() 4. **Consider the Better Turn-Taking Model approach**: Implement a more sophisticated turn-taking model that accurately detects the end of a user's turn
to prevent premature responses. [(5) ]() The challenge is that Retell AI's turn-taking happens at the infrastructure level, and the LLM layer doesn't receive explicit interruption signals—you'd need to infer this from the conversation flow in your custom implementation. [(2) ]() [(1) ]()
​ To learn more, see the sources I considered: [[1] Retell AI's Turn-Taking Model for Seamless Calls | Retell AI](https://www.retellai.com/blog/how-retell-ais-turn-taking-model-ensures-seamless-calls) [[2] LLM WebSocket](https://docs.retellai.com/api-references/llm-websocket) [[3] 5 Useful Prompts for AI Agent Builders | Retell AI](https://www.retellai.com/blog/5-useful-prompts-for-building-ai-voice-agents-on-retell-ai) [[4] State interruption sensitivity](https://discord.com/channels/1186424376300679209/1310913229840711720) [[5] Troubleshooting AI Voice Agent Issues | Retell AI](https://www.retellai.com/blog/troubleshooting-common-issues-in-voice-agent-development) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy what is the best way then to prompt the agent to insure the retell own LLMs understand an interruption occured?
a
Thanks for the follow-up, @Bobster2002. I'll get back to you soon.
### Answer Based on the available sources, Retell AI's own turn-taking model handles interruptions at the infrastructure level, but there isn't explicit documentation on prompting Retell LLMs to recognize interruptions as a distinct internal state. [(1) ]() However, you can improve interruption handling through **prompt engineering techniques**: Recommended prompting approach: Include instructions in your agent's prompt that guide the LLM to handle mid-conversation breaks naturally. For example, instruct the agent to: - Acknowledge when the conversation flow changes - Continue from context rather than restarting sentences - Respond to the user's most recent input without repeating what was already said From community discussions, users have found success with explicit transition instructions. One approach that worked was adding clear directives like: [(2) ]() "No matter whatever user said here, don't answer it, just call function transition_to_xxxx" While this specific example relates to state transitions, the principle applies: explicit, direct instructions in your prompt about desired behavior tend to work better than implicit expectations. Additional considerations: The Better Turn-Taking Model approach suggests implementing more sophisticated turn-taking logic that accurately detects the end of a user's turn to prevent premature responses. [(1) ]() Since Retell's turn-taking happens at the infrastructure level and doesn't pass explicit interruption signals to the LLM layer, you may need to rely on clear prompting that tells the agent how to handle conversational context changes rather than exp
ecting it to detect interruptions as a state.
​ To learn more, see the sources I considered: [[1] Troubleshooting AI Voice Agent Issues | Retell AI](https://www.retellai.com/blog/troubleshooting-common-issues-in-voice-agent-development) [[2] Retell LLM expects an answer from the user before transitioning to the next state](https://discord.com/channels/1186424376300679209/1238170307257176074) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.