AI agents are designed to respond naturally in conversations. Replies appear in bubbles (just like human agents) and can include attachments for clarity. The AI also detects and adapts to the customer’s language throughout the chat to keep interactions smooth and relevant.
In this article, we will guide you through:
- How AI agent messages are structured in bubbles
- How language detection and switching works during conversations
Message bubble architecture
AI agent replies are displayed as message bubbles across all supported channels. This makes responses easy to read and keeps them consistent with human agent messages.
- Single bubble (Mode A): Used by default. A reply may contain multiple paragraphs.
- Multiple bubbles (Mode B): Used when a reply is long (over 240 characters or more than 2 segments) and doesn’t include attachments. The AI agent will split the response into up to 3 bubbles to avoid spammy delivery.
- Message structure: Replies are broken into logical parts such as greetings, details/steps, and calls to action. AI agent ensures clear ordering (greeting → details → closing/CTA).
ℹ️ Note:
- This formatting logic works consistently across all SleekFlow-supported channels.
- The exact way a response is segmented into bubbles is determined by the AI’s large language model (LLM). The LLM classifies the reply into parts (greetings, steps, CTA) before formatting them into bubbles.
Language detection and switching
The AI continuously detects the customer’s language and adapts replies to keep the conversation natural. To do this, it follows a series of rules that balance consistency (sticking to one language) with flexibility (switching when needed).
Here’s how the logic works in practice:
-
Starting language
- At the beginning of a chat, the AI replies in the same language as the customer’s first message.
-
Example:
- Customer: “Hello” → AI replies in English
- Customer: “你好” → AI replies in Simplified Chinese
-
Staying consistent (stickiness logic)
- The AI keeps using the same language for continuity. However, if the customer sends two consecutive messages in another language, the AI will confirm before switching.
-
Example:
- Customer: “Hello, how are you?”
- Customer (later): “请问今天的天气如何?”
- AI: “I see you’ve switched to Simplified Chinese. Should I continue in Chinese from now on?”
-
Ignoring false triggers
- Short inputs like greetings (“Hi,” “早安”) or emojis (😂👌) don’t trigger language changes. This prevents accidental switches from minor inputs.
- Short inputs like greetings (“Hi,” “早安”) or emojis (😂👌) don’t trigger language changes. This prevents accidental switches from minor inputs.
-
Mixed-language messages
- When a message contains multiple languages (e.g. “Hello, 请问 how are you?”), the AI replies in the dominant language. If it’s unclear, the AI asks the customer to choose:
- AI: “I can continue in English or Chinese — do you have a preference?”
-
Fallbacks
- If the system cannot confidently detect a language, it defaults to English. Regional overrides apply when relevant:
- Hong Kong → Traditional Chinese
- Mainland China → Simplified Chinese
- Singapore/Malaysia → English (with optional Simplified fallback)
- If the system cannot confidently detect a language, it defaults to English. Regional overrides apply when relevant:
-
Handling Chinese variants
- The AI also distinguishes between Chinese writing styles:
- Simplified → replies in Simplified Chinese
- Traditional → replies in Traditional Chinese
- Cantonese → replies in Cantonese style
- Switches between Simplified and Traditional are treated as soft switches and don’t require confirmation.
- The AI also distinguishes between Chinese writing styles:
-
Explicit requests
- If the customer clearly asks for a language (e.g. “Please reply in Spanish”), the AI switches immediately.
ℹ️ Note: These rules apply to both AI Agent and AI Smart Reply. The system always confirms before switching mid-chat, except for Chinese script changes where it adapts automatically.