During conversations with an AI agent, users sometimes interrupt ongoing responses. To prevent unwanted interruptions, use system prompts to manage the output of the large language model (LLM).
How it works
In Real-time Conversational AI, users can interrupt agent responses by either speaking directly or pressing a button to talk. However, in some situations, the responses may contain critical information that users must fully listen to and understand. To address this need, Real-time Conversational AI provides an anti-interruption mechanism.
This mechanism allows you to embed the tag <No Interrupting> (not case-sensitive) in the LLM output to mark the speech content with this tag as uninterruptible. When the AI agent detects this tag, it blocks all forms of interruption. Only after the message is fully delivered will it return to the listening state.
Implementation
To embed the tag <No Interrupting> in the LLM output, modify the prompt for your model:
Go to the Real-time Workflow Template page and choose a template to edit.
Click the LLM node and configure System Message to tell the LLM when to add the tag
<No Interrupting>.Example: You are a voice assistant. Answer each question with one or two sentences. When I mention the phrase "key information", add the tag
<No Interrupting>at the beginning of your response.

The tag <No Interrupting> will neither be spoken by the agent nor displayed in the captions.
Sample effect
The following snippets show the effects of regular and uninterruptible responses:
Regular response
User: Hello.
- =====The agent starts speaking=====
- LLM output: Hello, how can I help you?
- Caption: Hello, how can I help you?
- Voice response: Hello, how can I help you?
- =====The agent stops speaking=====
Uninterruptible response
- User: Could you tell me some key information about Alibaba Cloud?
- =====The agent starts speaking (uninterruptible)=====
- LLM output: <No Interrupting> Certainly. Alibaba Cloud is a global leader in cloud computing and artificial intelligence. It provides reliable and secure cloud computing and data processing capabilities to thousands of enterprises, developers, and government organizations in more than 200 countries and regions.
- Caption: Certainly. Alibaba Cloud is a global leader in cloud computing and artificial intelligence. It provides...
- Voice response: Certainly. Alibaba Cloud is a global leader in cloud computing and artificial intelligence. It provides...
- [The user attempts to interrupt the response]
- User: What AI services does Alibaba Cloud provide?
- [The agent is not interrupted by the user input and continues delivering the complete message.]
- Caption: It provides reliable and secure cloud computing and data processing capabilities to thousands of enterprises, developers, and government organizations in more than 200 countries and regions.
- Voice response: It provides reliable and secure cloud computing and data processing capabilities to thousands of enterprises, developers, and government organizations in more than 200 countries and regions.
- =====The agent completes the response=====
- User: Okay, I understand. Then, tell me what AI services Alibaba Cloud provides.
- =====The agent starts speaking=====
- ......