You can use a prompt to control LLM output and prevent users from interrupting an AI agent's spoken response during a voice call.
Overview
During a voice call, users can interrupt an AI agent by speaking or pressing a button. However, some responses contain critical information that users must hear in full. For these scenarios, Real-time Conversational AI offers an uninterruptible response feature. When the LLM output includes a specific tag, the spoken response becomes uninterruptible, and no user action can stop the agent's speech.
How it works
The Real-time Conversational AI service checks the LLM node output for the <No Interrupting> tag. If this tag is present (case-insensitive), the AI agent makes the current spoken response uninterruptible. After the agent finishes speaking, it automatically returns to the listening state.
Implementation
To enable uninterruptible responses, modify the model prompt for the LLM node in your real-time workflow on the Real-time Conversational AI Console. For example: "You are a voice assistant. Please answer in one or two sentences. However, when I mention 'key information', you must add the <No Interrupting> tag at the beginning of your response."
In the Model section, select System Preset (Tongyi Qianwen).
The <No Interrupting> tag is neither spoken by the AI agent nor displayed in the captions.
Example
`**System Message**: You are a voice assistant. Please answer in one or two sentences. However, when I mention 'key information', you must add the `<No Interrupting>` tag at the beginning of your response.`
- User: Hello.
- =====AI agent starts speaking=====
- LLM node output: Hello, how can I help you?
- Captions: Hello, how can I help you?
- Spoken response: Hello, how can I help you?
- =====AI agent stops speaking=====
- User: Please tell me the key information.
- =====AI agent starts speaking (uninterruptible)=====
- LLM node output: <No Interrupting>Of course. Let me outline the key information for you.
- Captions: Of course. Let me outline the key information for you.
- Spoken response: Of course. Let me outline the key information for you.
- User: Let me interrupt.
- [The AI agent is not interrupted and continues speaking.]
- =====AI agent stops speaking=====
- User: Okay, I see.
- =====AI agent starts speaking=====
- ...