https://retellai.com/?utm_source=discord&utm_medium=seo logo
how is it possible that the agent when just having...
# ❓・ai-evy-support
m
@AI Evy how is it possible that the agent when just having an english conversation and you just mention an order number and when the ai phone agent responds back to confirm the order number, he says it in german? even though what the user says is clearly english. my prompt says he should always speak in english and the language is multi-language.
a
Thanks for tagging me @Maurizio Isendoorn. I'll look through relevant sources and get back to you shortly.
### Answer The multilingual language setting allows the agent to understand and code-switch between various languages [(1) ]() . When you select multilingual, the agent can auto-detect the language based on the text and may switch between languages during the conversation . To ensure your agent consistently responds in English, you need to be more explicit in your prompt. The language setting determines what language the agent understands (speech to text) and influences TTS pronunciation, but it will not enforce the agent to generate responses in a certain language . You have to set that in the prompt yourself . Try adding a very clear instruction in your prompt such as "always respond in English" . You might also want to specify that all confirmations, including order numbers, should be spoken in English. Additionally, consider these factors: - The voice you select (voiceId) is the primary determinant of accent, while the language setting may influence accent and pronunciation to some degree - The language code is passed to the TTS provider, which may have subtle effects on pronunciation and accent - For multilingual mode, it auto-detects the language based on the text If the issue persists after strengthening your prompt instructions, you may want to test with a specific English language setting instead of multilingual to see if that resolves the code-switching behavior.
​ To learn more, see the sources I considered: [[1] Set language for your agent](https://docs.retellai.com/agent/language) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
m
@AI Evy the prompt is very explicit that he should speak english but in the previous conversation it was also very clear that it was english so what should i fix here?
a
Thanks for the follow-up, @Maurizio Isendoorn. I'll get back to you soon.
### Answer Based on the sources, here are specific steps to fix this issue: Switch from Multilingual to English Language Setting The core issue is that multilingual mode auto-detects language based on the text, which can cause unexpected language switching [(1) ]() . Even with an explicit English prompt, the multilingual setting may still trigger code-switching [(2) ]() . Solution: 1. Change your agent's language setting from "multilingual" to "English" [(1) ]() 2. Keep your explicit English instructions in the prompt [(2) ]() According to a similar case in the sources, when an agent was set to Spanish but kept speaking English, the fix was to add clear language instructions in the prompt . However, your situation is reversed - you have English prompts but multilingual is overriding them. Why This Happens: - The language setting determines what language the agent understands (speech-to-text) [(1) ]() - It will NOT enforce the agent to generate responses in a certain language - you have to set that in the prompt yourself - With multilingual, the system auto-detects language, which can cause it to switch languages even when the conversation context is clear Additional Considerations: - English prompts work better in multilingual settings, but the auto-detection can still cause issues [(2) ]() - The voice you select (voiceId) is the primary determinant of accent [(1) ]() - The language code is passed to the TTS provider, which may have subtle effects on pronunciation Try switching to
the English language setting while keeping your explicit prompt instructions. This should prevent the unwanted German responses when confirming order numbers.
​ To learn more, see the sources I considered: [[1] Set language for your agent](https://docs.retellai.com/agent/language) [[2] Agent Language not taking effect in Voice](https://discord.com/channels/1186424376300679209/1400434278633967616) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.