Use case: Ensuring the AI Agent responds in the correct language

Do you want to use your AI Agent on a website active in multiple countries or languages? This article explains how to configure your Agent to respond in the correct language—and consistently stick to that language throughout the conversation.

Ensure the AI Agent responds in the correct language

By default, the AI Agent will try to answer in the language of the user’s first message. However, it may fall back to Dutch if all knowledge is written in Dutch, or default to English when the user input isn’t clearly written in a specific language.

Instruction to maintain language consistency

Add the following instruction to the Domain Knowledge to ensure the AI Agent always responds in the correct language:

Unless the input is clearly in English, assume it is Dutch and respond in Dutch. You should not switch languages in the middle of a conversation. Even if the user shares their address, mentions a country, or includes something in a different language (Dutch or English), always stick to the language in which the conversation started.

Use multilingual instructions

If you use literal instructions, make sure they are written in all the languages your Agent should support.

Example:

NL: Als iemand een vraag stelt over een ander onderwerp dan X, zeg je: hier kan ik je niet mee helpen. 

EN: If someone asks about a different topic than X, say: I'm sorry, I can't help you with this.

Handling borrowed words

Borrowed words like “order” or “printer” exist in multiple languages. To avoid confusion, provide clear examples in your instructions.

Example:

For questions about order status, refer to the track and trace code in the confirmation email.

User: Wat is de status van mijn order? 

Assistant: Je kunt de status van je order vinden in de track en trace code in de e-mail met de orderbevestiging.

User: What is the status of my order? 

Assistant: You can find the status of your order in the track and trace code in the e-mail with the confirmation of your order.

Add Domain Knowledge in multiple languages

If you notice the Agent often defaults to one language (such as Dutch), consider adding knowledge content in multiple languages. This helps the AI Agent maintain the correct context and tone.

Configure multilingual chat widgets

To allow users to chat in their own language immediately, configure separate chat widgets for each language or country.

Settings per language/country

  • Go to the Chat Widget settings
  • Under ‘Localization’, set the language per widget
  • Use Google Tag Manager to show the correct widget based on URL or country

 

Benefits

  • The user is addressed directly in their own language
  • Content and tone of voice match local expectations
  • Country- or language-specific information is displayed accurately

Instructions for sharing the correct links per language

Add instructions to indicate which URLs should be used for each language.

Example:

If you are addressed in French, only share links ending in .fr. For example, share www.mijnwebsite.fr/producten instead of the Dutch or English version.

User: Quels sont les prix des abonnements? 

Assistant: Vous pouvez consulter les prix des abonnements ici : www.mijnwebsite.fr/abonnements.

Key considerations

  • Language detection: The Agent determines the language based on the first message, the conversation summary, and instructions. If unclear, it will default to English.
  • Domain recognition limitation: The AI Agent cannot detect which domain it is being used on. If your website serves multiple countries that speak the same language (e.g., Belgium and the Netherlands), configure the Agent to ask users from which country they are.

FAQ

Can I use one AI Agent for multiple languages?

Yes, as long as you provide the correct instructions and configurations for language detection and consistency.

Why does the AI sometimes respond in Dutch to English questions?

This often happens if most knowledge is in Dutch or due to borrowed words. Add clear instructions and examples to avoid this.

What if the AI Agent switches languages during the conversation?

Add a strict instruction that prevents this, as shown in the example above.