https://retellai.com/?utm_source=discord&utm_medium=seo logo
We are having this issue in 2 workspaces atleast t...
# ❓・ai-evy-support
a
@AI Evy We are having this issue in 2 workspaces atleast that the agent starts speaking spanish even if the caller is speaking in English. though we have added some guardrails in prompts but it is still happening, does anyone has any solution to this?
a
Thanks for tagging me @Amna. I'll look through relevant sources and get back to you shortly.
### Answer To address the issue of your agent speaking Spanish when the caller is speaking English, you should configure the language setting at the agent level. The language setting affects speech recognition, voice pronunciation, and the language the agent responds in—you do not need to add a "respond in X" instruction to your prompt [(1) ]() . Pick the language(s) the agent will understand and speak . To support multiple languages, switch the selector to Multiselect and pick the specific languages you want; for best accuracy, prefer a single language when possible . If you want the agent to only speak English, ensure you've selected only English (e.g., "en-US") in the language configuration and avoid enabling multiselect with Spanish. The language configuration takes precedence over prompt instructions for determining the response language . Additionally, when writing your prompts, use the sectional prompt structure with explicit style guardrails [(2) ]() . You can add a section like:
Copy code
///## Style Guardrails
Respond only in English regardless of the caller's language.
Do not switch to Spanish or any other language during the conversation.
However, the primary fix should be setting the correct language in your agent configuration rather than relying solely on prompt guardrails [(1) ]() .
​ To learn more, see the sources I considered: [[1] Step 1: Configure global settings](https://docs.retellai.com/build/conversation-flow/global-setting) [[2] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
but we want the agent to speak spanish to people who are speaking spanish, thought the main language should be english.
@AI Evy but we want the agent to speak spanish to people who are speaking spanish, thought the main language should be english.
a
Thanks for the follow-up, @Amna. I'll get back to you soon.
### Answer For your use case where you want English as the primary language but need the agent to respond in Spanish when callers speak Spanish, you should configure the agent as multilingual [(1) ]() . In the dashboard, switch the language selector to Multiselect and pick both English (US) and Spanish (Spain) . Here's what happens at call time: - Speech recognition — the agent figures out which of the selected languages the caller is speaking and transcribes accordingly - Voice pronunciation — the agent detects the language of each response and uses the matching pronunciation - Agent text — the agent is allowed to respond in any of the selected languages and chooses based on what the caller speaks (and any instructions you give in the prompt) To ensure English remains the primary language, list English first in your language selection, as the agent falls back to the first language you selected if detection fails . **Important accuracy consideration**: Crossing language families (like English and Spanish) routes speech recognition to the multilingual pipeline, which is less accurate per language than single-language models . Pick the smallest set of languages you actually need . You can also add prompt instructions to reinforce the language-matching behavior, such as: "Match the caller's language. If they speak English, respond in English. If they speak Spanish, respond in Spanish."
​ To learn more, see the sources I considered: [[1] Configure a multilingual agent](https://docs.retellai.com/agent/multilingual) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
@AI Evy The spanish and english language was already selected in multiselect language settings, still it did that alot of times
a
Thanks for the follow-up, @Amna. I'll get back to you soon.
### Answer Since you already have English and Spanish selected in multiselect, here are additional steps to address the issue: **1. Check language order**: Ensure English is listed first in your language selection, as the agent falls back to the first language when detection fails [(1) ]() . **2. Add explicit prompt instructions**: Use sectional prompts with clear language-matching rules [(2) ]() :
Copy code
///## Language Guidelines
Default language: English
Language matching rule: Respond in English unless the caller explicitly speaks Spanish
If uncertain about caller's language, default to English
Do not switch languages mid-conversation unless the caller explicitly requests it
**3. Consider the accuracy trade-off**: Multilingual agents using different language families (English + Spanish) route to a multilingual pipeline that is less accurate per language than single-language models [(1) ]() . This can cause language detection issues. **Alternative approach**: If you can determine the caller's language before the call starts (from CRM data or dialed number) , override the language per call via the inbound call webhook [(3) ]() . This gives you single-language accuracy on each call without the multilingual detection issues . **4. Use Conversation Flow for better control**: If you're using Single/Multi Prompt agents, consider switching to Conversation Flow agents for more deterministic behavior [(4) ]() . Conversation Flow provides more control over dialogue paths and can help ensure the agent follows language rules more consistently . If the issue persists after these adjustments, the multilingual speech recognition pipeline may be incorrectly detecting Spanish when English is spoken. In that case, using language override per call (if possible) would be the most reliable solution [(3) ]() .
​ To learn more, see the sources I considered: [[1] Configure a multilingual agent](https://docs.retellai.com/agent/multilingual) [[2] Prompt Engineering Guide](https://docs.retellai.com/build/prompt-engineering-guide) [[3] Set language for your agent](https://docs.retellai.com/agent/language) [[4] Retell AI’s Advanced Conversation Flow | Retell AI](https://www.retellai.com/blog/unlocking-complex-interactions-with-retell-ais-conversation-flow) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.