Use case: Deploying the AI Agent for multiple countries/languages

Learn how to configure a single AI Agent that can be used across multiple countries and languages.

It is possible to deploy one AI Agent on a website that operates in multiple countries and/or languages. However, this requires some additional settings in the Domain Knowledge of your AI Agent.

Step 1: Ensure the AI Agent responds in the language of the question

By default, the AI Agent will answer in the language in which the question is asked. However, there may be cases where the AI Agent still uses the wrong language.

Below are some tips to prevent this:

  • Add a general instruction: In the Domain knowledge add an instruction to teach the AI Agent how to consequently use the correct language.
    Example instruction:
    You are an AI chatbot that strictly adheres to the language in which the user starts the conversation. Automatically detect the language of the user's first message and continue communicating exclusively in that language throughout the entire conversation. Do not switch to another language, even if the user uses a different language in later messages. If the user addresses you in another language, politely remind them that you will only communicate in the original language of the conversation. Always respond in full and natural sentences, appropriate to the chosen language.
  • Write literal instructions in multiple languages
    If you use literal instructions, always write them in all the languages the AI Agent should speak.
    Example:
    If someone asks a question about a different topic than X, you say:"I'm sorry, I can't help you with this."
    If someone asks this in Dutch, respond with: "Hier kan ik je niet mee helpen."

  • Add examples in instructions
    Words, such as 'order', 'printer', and 'plant', are used in multiple languages. If your AI Agent has many instructions in which these words appear in a different language than English, this could result in an English question containing one of these words being answered in that language.

    In this case, it is important to add examples to the instructions so that the AI Agent understands how to respond.
    Example:
    For questions about the status of an order, refer to the track and trace code in the order confirmation email.

    Example interaction:
    User: Wat is de status van mijn order?
    AI Agent: 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?
    AI Agent: You can find the status of your order in the track and trace code in the email with the confirmation of your order.

  • Write the Domain Knowledge in English
    If a large part of the added knowledge is written in a different language than English, the AI Agent might be more inclined to respond in that language. If you notice that the AI Agent switches to English too quickly, you can add the Domain Knowledge in multiple languages.

Step 2: Configure chat widgets per country/language

To provide an optimal user experience, you can set up different chat widgets and display a specific widget per country or language on your website. You can change the language of the widget under localize in the Chat Widget settings. This ensures that visitors from different countries automatically see the AI Agent in their own language. 

By setting up a separate widget per language or region, you ensure that:

  • The AI Agent is immediately accessible in the correct language.
  • The tone of voice and content are tailored to the local audience.
  • Any country- or language-specific information is correctly displayed.

You can use Google Tag Manager to add the different widgets to the corresponding URL's. See this article for more information about this. 

Step 3: Instructions for sharing the correct URLs per language

To ensure that the AI Agent shares the correct URLs based on the language it is addressed in, you need to add a clear instruction in the Domain Knowledge. This will specify which URLs should be used for different languages.

Example:
"When addressed in French, only share links that end in .fr. For example, if someone asks for product information, provide a link such as www.mywebsite.fr/products instead of the Dutch or English version."

You can also add a concrete example, such as:
User: Quels sont les prix des abonnements?
AI Agent: Vous pouvez consulter les prix des abonnements ici : www.mijnwebsite.fr/abonnements.

By adding this instruction, you ensure that the AI Agent always shares the correct links based on the language in which it is addressed.

Note: The AI Agent cannot see from which domain the chat originates. If your website is active in multiple countries that speak the same language, you may need to first have the AI Agent ask which country the end user is from. This prevents, for example, Belgian customers from receiving a Dutch URL.