How Do You Prompt Across Languages?
How to tell a model which language to reply in, why quality and cost change by language, and how to test each one, explained simply for your AI interview.
In short
Name the reply language in the system prompt, pass in the language your user picked, and test every language you ship. Quality and cost change from one language to the next, so an English test is not enough.
13 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.
Across languages, I do three things. First, I name the reply language in the system prompt, and pass in the one the user picked in the app, because the model should not guess. Second, I expect quality and cost to change by language, since some languages take far more tokens for the same text. Third, I test each language on real messages, graded by native speakers, and only ship the ones that pass.
The first step is to tell the model which language to use. A model can guess from the user's message, and it often guesses right. But for a production app I don't want a guess. I put the reply language in the system prompt, because that instruction holds across the whole chat. If the customer picks a language in the app, I pass that choice into the system prompt from the code.
Languages are not equal, though. A model can be strong in one language and weaker in another, and the same text can need very different numbers of tokens depending on the language. A 2023 study of the tokenizers of its time found the same text could differ in token length by up to 15 times in some cases. So a chat in some languages may cost more and fill more of the context window than the English one. I budget for that, and I ask for native script, because Anthropic advises it for optimal results.
Then I test each language on its own set of real messages, graded by native speakers against a fixed rubric. A language that passes goes live. One that fails gets a fix to the prompt, or it waits. I also add a code check on each reply, because a reply can drift back into English halfway through a chat. Testing tells me whether a language is ready, and a prompt cannot do that for me.
What does prompting across languages mean, in plain words?
Prompting across languages means getting a model to read, think and answer well when your users write in more than one language. A chat can start in English, switch to Hindi, and end with a Tamil question. Your job is to make sure the reply is in the language the customer chose, and is as good as the English one.
Think of a front-desk teller at a bank. A customer who speaks Bengali is served in Bengali, and the teller checks the customer really understood the answer. A support bot for a lender has to do the same for every customer, whichever language they picked in the app.
A model reads text as tokens, the small pieces it works with. Some languages split into more pieces than others, so the same message can cost more to run and take up more of the context window (the amount of text the model can hold in one go). The usual prompting ideas still apply, but you also check each language.
Key words
- Locale
- The language and region a customer picks, such as Hindi for India.
- Target language
- The language the reply must be written in.
- Native script
- The writing system a language uses, such as Devanagari for Hindi.
- Transliteration
- Writing a language in another alphabet, such as Hindi in Latin letters.
- System prompt
- The instructions the developer sets for the model, which the customer doesn't see.
Why do quality and cost change from one language to another?
Models learn from unequal amounts of text, and languages break into tokens unequally. Anthropic says its performance varies by language, and that it is strongest in the widely spoken ones. It also says it keeps meaningful ability in languages with fewer digital resources.
“Large language models (LLMs) demonstrate impressive multilingual capability, but their performance varies substantially across different languages.”
Huang and colleagues, 2023 (arXiv paper)
“The same text translated into different languages can have drastically different tokenization lengths, with differences up to 15 times in some cases.”
Petrov and colleagues, 2023 (arXiv paper)
The tokenizer study (the tokenizer is the part that cuts text into tokens) also says this unequal treatment affects cost, speed and how much content fits as context. The numbers depend on the model and the tokenizer, so measure your own languages rather than trusting a rule of thumb.
- Translate first
English in the middle
Translate the message to English, answer in English, then translate back. It adds a step, and names, legal terms and tone can get lost on the way. Test both before you choose.
- Native prompt
Work in the language
Keep the chat in the customer's language, with clear language rules and native-speaker review. It needs more testing, but the customer reads the model's own wording, not a translation.
A 2023 study proposed a generic template prompt that stimulates cross-lingual and logical reasoning. It is one published method, so test it against your plain prompt in your own languages before you adopt it.
Tip
Don't claim English instructions always work better. The sources here don't show that. Say you test both on your own languages, and keep the one that scores higher.
How do you test and check each language?
Test each language on its own, with real messages and a fixed rubric. Anthropic's advice is to apply general evaluation methods to measure output quality in each language you support, and to test with any languages relevant to your use case.
- 1
Collect real messages
Take 200 real messages per language from past chats, with names and account numbers removed. Include lines such as "My refund is still pending after two weeks."
- 2
Write one rubric
Score accuracy, tone, the right script and whether the next step is clear. Use the same rubric for every language.
- 3
Let native speakers grade
A Hindi team grades the Hindi set. A developer can miss an odd phrase that a fluent reader spots at once.
- 4
Ship only the passing languages
A language that passes goes live. One that fails waits, and its prompt gets fixed first.
Testing each language before launch
A test set per language
200 Hindi messages
real chats from past support tickets, names removed
200 English messages
the same kinds of question
Score each reply
native speakers and a fixed rubric
Decide per language
Passes the bar
ship this language
Fails the bar
fix the prompt or hold it back
Live for that language
re-test after each model change
- 1The Hindi set's replies go to scoring.
- 2The English set's replies go to the same scoring, for comparison.
- 3A reply that meets the rubric counts as a pass.
- 4A language that fails is not shipped until it passes.
- 5Only a language that passes goes live.
A reply can also drift into English mid-chat, so add a code check on each reply. The script below checks the script of the reply, not its meaning. It is a shortcut. A Hindi reply full of English product names can fail it, so tune the threshold on real replies.
import unicodedata
from collections import Counter
SCRIPT = {"hi": "DEVANAGARI", "en": "LATIN"}
def check_reply(reply, locale):
# Code, not the prompt, checks the script of the reply.
# shortcut: checks script, not meaning; tune the 0.8 on real replies
names = [unicodedata.name(ch, "OTHER").split()[0] for ch in reply if ch.isalpha()]
counts = Counter(names)
total = sum(counts.values())
if total == 0:
return "NO TEXT: nothing to check"
share = counts[SCRIPT[locale]] / total
if share < 0.8:
return f"RETRY: only {share:.0%} of letters are {SCRIPT[locale]}"
return f"OK: reply is in {locale}"
print(check_reply("आपका रिफ़ंड स्वीकृत हो गया है।", "hi"))
print(check_reply("Your refund is approved.", "hi"))
print(check_reply("Aapka refund swikrit ho gaya hai.", "hi"))
print(check_reply("Your refund is approved.", "en"))Output
OK: reply is in hi RETRY: only 0% of letters are DEVANAGARI RETRY: only 0% of letters are DEVANAGARI OK: reply is in en
The check reads the Devanagari reply as Hindi, and flags the English reply and the transliterated one. Test your safety filters in every language too. OWASP, the open security group behind its 2026 list of top risks for AI apps, warns that low-resource and code-mixed inputs degrade the accuracy of filters, so a filter that works in English may miss an attack written in Tamil or in mixed Hindi and English.
How would you launch a support bot in five languages?
A bank wants its support bot live in English, Hindi, Tamil, Bengali and Telugu within one quarter. Here is how I would answer.
- Launch first
English and Hindi
The two languages with the most customers pass their own test sets first, then go live with a human fallback.
- Hold back
Tamil, Bengali, Telugu
Each waits for its own test set, native graders and a passing score. Until then, the customer gets a human agent.
I would not ship all five on the strength of English tests. Each language has its own failure modes, and the bank's own complaint log is the best test set for the real problems.
What does the interviewer want to hear?
A strong answer covers
- Name the reply language in the system prompt, from the app's choice.
- Quality and cost vary by language, and token counts differ.
- Native script over transliteration, and natural phrasing on request.
- Test each language on real messages, graded by native speakers.
- Check each reply in code, and test safety filters per language.
- Honest limits: some languages are weaker, and no prompt fixes that.
Common traps
Trap"Ask for the user's language and move on."
BetterThe model sometimes guesses wrong. Pass the choice from the app and check the reply in code.
Trap"We tested it in English, so it works everywhere."
BetterQuality changes by language. Test each language you ship with its own set and its own graders.
Trap"Translate everything to English first."
BetterIt adds a step and may lose names, legal terms and tone. Keep the chat in the customer's language where you can.
Can you spot the wrong reply?
Spot the wrong reply
A customer chose Hindi in the app. Which reply is in Hindi, in native script, with no English mixed in?
Quick check
A customer writes in Tamil, and the bank's staff read a summary of each chat in English. Which instruction states the languages clearly?
Can you answer these from memory?
Flash cards · tap a card to flip it
What will they ask next?
Last updated on 27 November 2026
Building a support bot for customers who speak more than one language?
I design and build AI agents and the products around them, with language checks and per-language tests in place. Book a short call and tell me which languages your customers use.