esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
Let’s talk

I’ll build the agent for it.

How Do You Support Many Languages?

How an AI app serves users in many languages: reply language, token cost, quality per language and fixed facts, explained for your AI interview.

In short

Set the reply language from the user's account in code, measure quality and cost for each language, and keep facts like fees and dates in a table the model doesn't write. Models speak many languages, but how well, and at what cost, depends on the language.

10 min readIntermediateOccasional · estimateFacts checked 27 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

To support many languages, I first set the reply language from the user's account, and tell the model in the system prompt. Then I plan for two gaps. Quality varies by language, so I test each one I support on its own. Cost varies too, because some languages take far more tokens for the same text. Fees and dates come from a table in code, never from the model.

What does supporting many languages mean, in plain words?

Your app has users who write in Hindi, Arabic, Spanish and English. They expect answers in their own language, and those answers have to be correct in every one.

Think of a bank call centre that hires staff who speak several languages. Each agent still needs the same fee rules, and a fee quoted wrongly in Hindi is as wrong as one quoted in English. In an AI app, a customer types "¿Cuánto cuesta el cargo por retraso en mi tarjeta?" (How much is the late fee on my card?). The answer has to be in Spanish, and the fee has to match the bank's table.

Key words

Reply language
The language the answer is written in. It should come from the saved account.
Locale
The language and region settings, such as Hindi used in India. It sets dates and number formats.
System prompt
The developer's instructions to the model, sent with every customer message.
Tokeniser
The part that cuts text into small pieces, called tokens, before the model reads it.
Per-language test set
Questions with checked answers, written for one language and scored on their own.

Why is it harder than translating the text?

One model can serve many languages. The XLM-R research paper, from 2019, trained one model on one hundred languages at once. Performance still varies by language, and Anthropic says the same of Claude, with the strongest results in widely spoken languages.

  • “Performance varies by language, with particularly strong capabilities in widely spoken languages.”

    Anthropic, on Claude

  • “This induces unfair treatment for some language communities in regard to the cost of accessing commercial language services”

    Petrov and co-authors, 2023 paper

Tokens are the second gap. The tokeniser cuts text into pieces before the model sees it, and for some languages it cuts more pieces for the same meaning. A 2023 paper at NeurIPS, an AI research conference, found translations whose token lengths differ by up to 15 times in some cases. For a product, that means a bigger bill, slower replies and less room in the context window (the text the model can read in one go) for the same policy text.

How does one message travel through the system?

Here is the path for one message, from the customer's screen to the reply. Each box does one job, and fixed facts never depend on the model's own wording.

One message, from question to checked reply

Customer message

in any language the bank supports

Reply language

from the saved account, set in code

Model

writes the reply in that language

Facts and checks in code

Fee from the table

the model asks, the table answers

Language and numbers

a failed reply goes to a retry

Reply sent

checked, in the right language

  1. 1The message arrives, and the app loads the saved language, whatever language the message is in.
  2. 2The language goes into the system prompt, so the reply follows it.
  3. 3The model asks the fee table for each number it needs.
  4. 4The draft reply goes through the checks.
  5. 5A checked reply is sent to the customer.
A customer's message is answered in the language saved on their account. The model asks the fee table for each number, and a check in code looks at the language and the numbers before anything is sent. Only a checked reply goes out.
  1. 1

    Set the language

    Read the saved locale. If there is none, detect the language first, then store it on the account.

  2. 2

    Keep facts in data

    Fees, dates and legal wording come from a table the bank owns, never typed by the model.

  3. 3

    Store documents as written

    Keep each policy in its own language, and test that a question in another language still finds the right passage.

  4. 4

    Check before sending

    Code checks the reply language and the numbers. A reply that fails goes to a retry or to a person.

Tip

In an interview, name where each fixed fact comes from: the account for the language, the table for the numbers.

Should one model handle every language, or should you translate through English?

Two designs are common. In the first, one model reads and writes each language directly. In the second, the app translates into English, answers, and translates back. Each has a cost, so I'd pick by test results.

  • Option A

    One model, direct

    Reads and writes the language itself. Fewer steps, so fewer places for meaning to slip. Quality still has to be tested per language.

  • Option B

    Translate in and out

    Easy to bolt onto an English system. Each hop can lose meaning, and it adds delay and cost.

  • Option C

    Mix them

    Direct for the main languages, translation for rare ones, with the same test set for both paths.

Direct model or translate through English

Path A: direct

Read and write directly

fewer hops, less meaning lost

Path B: translate

Translate in and out

each hop can lose meaning

Same test set

scored per language, for both paths

  1. 1Path A's wording goes straight to the test set.
  2. 2Path B's translated answer goes to the same test set.
Two paths to one answer, judged by the same test set. The direct path keeps the wording, and the translated path adds a hop that can drift. Both must pass the per-language test before they ship.

How do you know it works in every language?

Anthropic's guidance is to measure output quality in each language you support. In practice that means a test set for each language, with expected answers checked by someone who speaks it.

  • One test set per language

    Build it from real customer questions in that language.

  • A native speaker checks

    Someone who speaks the language writes or checks the expected answers.

  • Score each language apart

    A weak language can't hide in the average of the others.

  • Watch live replies

    Sample replies by language, and send weak ones to a person.

How would you launch a bank's help chat in eight languages?

Start with the three languages that cover most customers, each with its own test set and a native reviewer. Fee and date answers come from the bank's approved table in every language. The other languages wait until they pass the same bar, and until a person can take over a chat when the assistant is unsure.

Cost is a launch number too. Some languages can use more tokens for the same reply, so I'd measure the cost per language in the first week.

What does the interviewer want to hear?

A strong answer covers

  • Set the reply language from the account, and say why.
  • Name the two gaps: quality varies, and some languages cost more tokens.
  • Compare a direct model with translating through English, and say how you'd choose.
  • Keep fees, dates and legal wording in data, never in the model's words.
  • Test each language on its own, with native reviewers.
  • Say the limits: some languages will lag, so launch in waves.

Common traps

  • Trap"Translating everything to English first is always safest."

    BetterIt works, but each hop can lose meaning and adds delay. Test it against a direct model.

  • Trap"One English test is enough, the model handles every language."

    BetterAnthropic says performance varies by language. Test every language you support.

  • Trap"Let the model guess the language from the message."

    BetterThe account holds the language. Set it in the system prompt on every call.

Can you spot the problem?

Spot the bug

The account is set to Hindi and rupees. A customer gets an English reply that quotes a fee in dollars. Which line causes it?

Quick check

A bank's assistant is strong in English but weaker in Swahili. What do you do first?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q005Why do token counts differ across languages and models?10 min
  2. Q368Build a cost model for the system.12 min
  3. Q369How do you design for low latency?13 min
  4. Q372Design an eval and monitoring platform.11 min
  5. Q267How do you evaluate safety?13 min

Last updated on 27 November 2026

Building an assistant for customers in many languages?

I design and build AI products and agents, the screens and the system behind them. Book a short call and say which languages and channels you need.