Apply to my task
arXiv:2601.03589 ★ 82 Jan 7, 2026

OLA: Models Get the Reply Language Wrong When You Mix Languages

Key result

You write a prompt in Spanish, drop in a couple of English terms (product-market fit, retention) — and the model replies entirely in English. Or the reverse: the instruction is in English, one Spanish word sneaks in — and the reply comes back in Spanish. This method lets you control the reply language when mixing languages in a prompt. Add "Reply in English" at the end — language accuracy goes from 21-75% to 96-100%. Models can generate in any language, but they're bad at guessing the expected one from implicit signals — an explicit instruction sidesteps the problem.

01

TL;DR

Models reply in the wrong language when a prompt mixes several languages — even when the context clearly signals which language is expected. Say a user writes a prompt in English and drops in a few Spanish words: the model answers entirely in Spanish, even though English was expected. Or the other way around: the instruction is in Spanish, the text to process is in English, and the model replies in English instead of Spanish.

The core problem is a strong bias toward the non-English language. As soon as a little text in another language shows up in the prompt (Korean, Chinese, Indonesian, and so on), models become far more likely to answer in that language, even when the prompt's main language and the context point to English. The gap is huge: from 96% success when Korean is expected down to 21-75% when English is expected. The cause: models lean on surface signals — the share of characters from each language in the prompt and the language of the last word (if the prompt ends with a non-English word, the reply will most likely be in that language). Chain-of-Thought doesn't help — it actually makes things worse.

A fix exists, but it's for model developers: Code-Switching Aware DPO with ~1000 examples dramatically improves things. For chat users — state the reply language explicitly whenever you mix languages in a prompt. Add at the end: "Reply in English" or "Responde en español". That sidesteps the problem almost completely.

Want this for your own case? Apply this study to your task: AI adapts its method to what you are working on and writes the prompt.

02

The Problem at a Glance

CASE 1: Dropping in words from another language (intra-sentential)
Prompt: "What is the reason for doing a calentamiento before the main workout?"
         [English grammar + a Spanish noun]
Expected: English (the main grammatical language)
Actually: Often Spanish

CASE 2: Instruction and content in different languages (inter-sentential)
Prompt: "Aquí tienes un borrador de artículo en inglés: [text]. Encuentra los errores."
         [instruction in Spanish + content in English]
Expected: Spanish (the instruction language, for comprehension tasks)
Actually: Often English
03

The Problem in Action

Task: You're analyzing a startup's launch strategy. You write the prompt in Spanish but use English terms (product-market fit, retention, churn) because that's what you're used to.

Prompt WITHOUT an explicit language:

Analiza esta go-to-market strategy para un B2B SaaS:
- Enfoque en clientes enterprise
- Customer acquisition cost de unos $5000
- Lifetime value estimado en $50000
¿Qué hay que considerar en los risk factors?

Result: The model will very likely answer in English, because: 1. The last word of the prompt is English ("factors")
2. Latin-script English words make up a big chunk of the prompt (~40-50%) 3. Models are biased away from the primary language when languages are switched

Prompt WITH an explicit language:

Analiza esta go-to-market strategy para un B2B SaaS:
- Enfoque en clientes enterprise
- Customer acquisition cost de unos $5000
- Lifetime value estimado en $50000
¿Qué hay que considerar en los risk factors?

Responde en español.

Result: The model will answer in Spanish with ~97-100% accuracy (instead of 21-75% without the explicit instruction).

04

Why This Happens

Models don't analyze the deep structure of language — they rely on surface signals:

  1. The share of characters from each language — the more Cyrillic, Hangul or Chinese characters in the prompt, the higher the chance the reply will be in that language. The model counts characters; it doesn't analyze grammatical structure.

  2. The language of the last word — the strongest factor of all. If the prompt ends with a Korean, Chinese or Spanish word, the model becomes far more likely to answer in that language. This is recency bias — the most recent context outweighs everything else.

  3. Bias toward the non-English language — if the prompt contains even a little text in another language, models pick it for the reply "by default". The likely reason: in the training data, code-switching examples more often had non-English answers.

Chain-of-Thought makes it worse — when you ask the model to "think out loud", accuracy DROPS (by up to -50% in some cases). That means the model has no internal criteria for figuring out the expected language — it can't "reason its way" to the right answer.

Post-training (SFT+RLHF/DPO) amplifies the bias — aligning models to user instructions paradoxically makes things worse for English in code-switched prompts. Most likely, the alignment data has few examples where mixed languages still call for an English answer.

05

Prompt Template

To guard against surprise language switches:

{your prompt with mixed languages}

Reply in {English/Spanish/another language}.

Examples: - Reply in English. - Responde en español. - Reply in English only.

When you should always add it: - You use English terms in a prompt written in another language - You give the instruction in one language and the content to process in another - The last word of the prompt isn't in the language you want the answer in - "Foreign" characters make up >20-30% of the prompt

06

Why It Works

An explicit instruction bypasses the surface heuristics. When the reply language is stated outright, models follow the instruction with 96-100% accuracy (even the very same models that scored 21-75% without it). This proves the problem is NOT a lack of language ability — models CAN generate in any language. The problem is inferring the expected language from implicit signals.

Levers you control: - Explicitness — the more specific ("in Spanish"), the better. "Preferably in Spanish" works worse. - Position — at the end of the prompt is more effective (the last word carries a lot of weight). - Repetition — if the prompt is long and multi-step, repeat the language instruction in the middle and at the end.

07

Limitations

⚠️ Doesn't help against "raw" glitches: Stating the language does NOT protect against stray characters from a third language (say, sudden Japanese or Chinese characters in the middle of Spanish text). This problem shows up more often in models after DPO/RLHF training.

⚠️ Text quality suffers: Even when the model replies in the right language after an explicit instruction, the text can sound unnatural — literal translations instead of established loanwords, calques instead of idioms. Especially noticeable with an instruction in one language and content in English.

⚠️ The problem is systemic; the fix is a band-aid: The study shows the problem lies in how models are trained (not enough alignment data for code-switched contexts). An explicit instruction is a workaround, not a fix for the root cause.

08

Resources

OLA: Output Language Alignment in Code-Switched LLM Interactions
Juhyun Oh, Haneul Yoo, Faiz Ghifari Haznitrama, Alice Oh
KAIST
The OLA benchmark is available: github.com/juhyunohh/OLA

Research digest

Key result

You write a prompt in Spanish, drop in a couple of English terms (product-market fit, retention) — and the model replies entirely in English. Or the reverse: the instruction is in English, one Spanish word sneaks in — and the reply comes back in Spanish. This method lets you control the reply language when mixing languages in a prompt. Add "Reply in English" at the end — language accuracy goes from 21-75% to 96-100%. Models can generate in any language, but they're bad at guessing the expected one from implicit signals — an explicit instruction sidesteps the problem.

Principle

Models rely on three surface signals instead of deep context analysis: (1) the share of characters from each language in the prompt — the more of a given script, the more often the reply is in that language; (2) the language of the last word — the strongest factor, recency bias outweighs everything else; (3) a systemic bias toward the non-English language — if there's even a little text in another language, the model picks it for the reply. The model counts characters and remembers the last word; it doesn't analyze grammatical structure. That's why an explicit instruction at the end of the prompt ("Reply in English") bypasses all three heuristics — the model follows a direct order instead of guessing from signals.

Why it works

Models have NO trouble generating in any language — the problem is figuring out the expected language from implicit signals. An explicit instruction removes the need to guess. The numbers prove it: the same models that hit 21-75% accuracy without an instruction deliver 96-100% with one. Interestingly, Chain-of-Thought makes things worse (down to -50% accuracy) — the model can't "reason" about the language because it has no internal criteria for it. It leans on heuristics from training data, where code-switching examples more often had non-English answers. Stating the language overrides these patterns and sends a clear signal.

When to apply

Multilingual communication → specifically when you use terms from another language (English terms in a Spanish prompt), or give the instruction in one language plus content to process in another, especially when the last word of the prompt isn't in the language you need for the answer, or when "foreign" characters make up more than 20-30% of the prompt. NOT suitable for guarding against stray third-language characters (sudden Chinese characters inside Spanish text) — that's a different problem, and stating the language doesn't fix it.

Mini recipe

1. Decide on the language you need: Which language should the answer be in? (regardless of which language most of the prompt is in) 2. Add an explicit instruction: At the end of the prompt add Reply in English. or Responde en español. — the more specific the wording, the better ("preferably" works worse) 3. If the prompt is long: Repeat the language instruction in the middle and at the end — especially if a big block of text in another language follows the instruction

Examples

[BAD]: "Analiza esta go-to-market strategy para un B2B SaaS: enfoque en clientes enterprise, customer acquisition cost de unos $5000. ¿Qué hay que considerar en los risk factors?" — the last word is English (factors), English words make up ~40% of the prompt, the model will answer in English instead of Spanish [GOOD]: "Analiza esta go-to-market strategy para un B2B SaaS: enfoque en clientes enterprise, costo de adquisición de clientes (CAC) de unos $5000, valor de vida del cliente (LTV) de $50000. ¿Qué factores de riesgo hay que considerar? Responde en español." — the explicit instruction bypasses the last-word and character-share heuristics, accuracy 96-100%

In plain words

In Plain Words: 2601.03589

In Plain Words

OLA: OutputLanguageAlignment in Code-SwitchedLLMInteractions

Today's models still behave like bad self-taught interpreters: they don't grasp what the conversation is about, they just try to guess the language from the last few words they heard. This is called the language alignment problem. When you mix English and Spanish in one request, the model short-circuits. Instead of analyzing the sentence structure and working out which language is the main one, it latches onto random chunks of text and switches to them completely. So you ask something in English, throw in a couple of Spanish terms, and the model dumps an answer on you in Spanish, even though you never asked for that.

It's like walking into a restaurant in Paris, ordering in French, stumbling and slipping in a couple of English words — and the waiter instantly switches to broken English and refuses to go back to French. Sure, he understood you, but the conversation is broken because he decided he knows better than you which language you'd rather speak. It looks dumb, it's annoying, and it completely wrecks the context of complex work where every letter matters.

The OLA (Output Language Alignment) study turned up a funny fact: models aren't idiots, they know both languages perfectly well. When told outright "answer in English", accuracy shoots up to 96-100%. Remove that instruction, and accuracy drops to an embarrassing 21-75%. The issue isn't that the model "forgot" the language; it's the sloppy heuristics it uses to infer it. It acts like a lazy student who tries to guess the answer from the professor's face instead of simply reading the question to the end.

This principle holds for any interaction with an LLM, whether you're writing code with comments in different languages or translating complex documents. The model will always try to mimic the "freshest" or most prominent chunk of text in the prompt. If an instruction in Spanish contains a huge block of English code or logs, there's an 80% chance the model decides we're speaking English now. To the model, context isn't meaning — it's which characters statistically dominate.

The main takeaway is simple: never count on the model's "intelligence" to pick the language. If your prompt has even a couple of words in another language, spell out the reply language explicitly. Without a direct command, the model will keep fumbling as it tries to adapt to random noise in the text. Either you take control, or you get an answer in a language you have zero use for right now. In the world of AI, politeness and leaving things unsaid only get in the way.

ArXiv ID: 2601.03589 | Generated: 2026-01-08 06:50 | Nova Research

AI lab assistant

Apply this study to your task

Describe what you're working on. AI takes the method and the measured results from this paper and adapts them to your case, or writes a ready prompt built on them.

Based on OLA: Models Get the Reply Language Wrong When You Mix Languages arXiv:2601.03589

Sign in to apply this study New accounts get 50 free credits.