Overview
The Language Switch Prompt enables your AI agent to dynamically identify and respond when a user explicitly or implicitly requests a switch in language. This functionality is critical for agents that support multilingual conversations, especially over voice where real-time language adaptation enhances usability and reach.Purpose
When multilingual agents are enabled, this prompt instructs the system to:- Detect whether the user is requesting a language change.
- If detected, identify the specific target language.
- Return the correct output so that downstream logic can route accordingly.
Where It Lives
Location:Manage Agents → Overview → Language Switch Prompt Whenever you add or remove a language, the system prompts you to update this field to ensure alignment between what the agent supports and what it can detect. A pre-filled reference prompt is provided. You are expected to customize it based on the languages added to your agent and their corresponding trigger phrases.
Why It’s Important
Language switching relies on both system configuration and prompt logic. If a language is added to the agent configuration but not reflected in the prompt (or vice versa), switching will fail at runtime. The prompt becomes the source of truth for how language detection is handled across STT engine outputs.Prompt Template (To Customize)
Below is the reference structure you should adapt based on your agent’s supported languages and expected phrases.Trigger Workflow
When a new language is added to the agent via the UI:- A confirmation dialog is shown instructing you to update the Language Switch Prompt.
- Navigate to Agent Overview → Language Switch Prompt.
- Modify the reference prompt to include:
- Any new language added
- Detection examples/phrases (if required)
- Save and deploy.
Best Practices
Practice | Recommendation |
---|---|
Prompt Matching | Always ensure the languages listed in the prompt match the ones added to the agent’s system prompt. |
Script Awareness | Include detection patterns in local scripts (e.g., Hindi, Kannada) if relevant. |
Clear Output | Always return a clean one-word output. Avoid additional logs, quotes, or structures. |
Prompt Maintenance | Revisit and update the prompt whenever you add, remove, or rename any supported languages. |
Sample Inputs | Use actual transcriptions from user speech; avoid manually translated phrases for accuracy. |