Skip to content
All posts

Building AI features for users in more than one language

How to make an LLM feature work for customers who write in different languages: deciding which languages to support, keeping answers in the right language, retrieval across languages, testing and review.

Shubham Somani 4 min read

Many AI features are built and tested in English, then launched to customers who write in Spanish, German, Japanese or a mix of several languages in the same message. Models often handle this surprisingly well in a demo. In production, the gaps show up quietly: a reply in the wrong language, a search that misses the right document, a summary that drops a name it couldn’t spell.

None of this needs a separate product per language. It needs a few deliberate decisions. Here’s how we’d build an AI feature for users in more than one language.

Decide which languages you actually support

“It works in any language” isn’t a promise you can test.

  • Look at your real traffic to see which languages customers write in, rather than guessing.
  • Pick a short list of supported languages that you will test and review, and treat the rest as best effort.
  • Say so in the product where it matters, so customers in a best-effort language know what to expect.

Keep answers in the right language

The most common complaint is simple: the user wrote in one language and got an answer in another.

  • Detect the language of each request, and pass it to the model as an explicit instruction rather than hoping it notices.
  • Respect the user’s settings where you have them. An account language or browser preference is a better signal than one short message.
  • Decide what happens with mixed input, such as a French question about an English document, and write that rule down.
  • Keep fixed text out of the model. Buttons, error messages and legal wording belong in your normal translation files, not in generated output.

Make retrieval work across languages

If your feature searches documents, language affects what it finds.

  • Check whether your search matches across languages. A question in Portuguese may not find the answer in an English help article unless your setup supports that.
  • Store the language with each document, so you can filter, prefer or label results.
  • Test retrieval separately per language before blaming the model. Our post on why RAG isn’t working covers the usual causes.

Handle names, numbers and formats carefully

  • Keep names, product terms and codes exactly as written. Ask the model not to translate them, and check that it doesn’t.
  • Format dates, currencies and numbers in code using the user’s locale, from structured fields rather than free text. See getting reliable JSON from an LLM.
  • Keep a glossary of your product’s terms and their approved translations, and include the relevant entries in the prompt.

Test every supported language

A test set written only in English tells you little about everyone else.

  • Build test cases in each supported language, ideally from real, anonymised requests.
  • Have a fluent speaker review samples, not just an automated score. Tone and formality vary a lot between languages and markets.
  • Compare quality per language after every prompt or model change. We cover the setup in test your LLM feature before users do.

Watch it after launch

The short checklist

  • Choose supported languages from real traffic and test those
  • Detect the language and instruct the model to answer in it
  • Keep interface text and legal wording in translation files
  • Test retrieval across languages and store each document’s language
  • Keep names exact and format dates and money in code
  • Review samples with fluent speakers and track quality per language

If your customers don’t all write in English and you want your AI feature to work for all of them, see our fixed-scope offers or book a 30-minute call.