TL;DR
Multilingual users frequently mix languages (code-switch) when prompting LLMs, relying on implicit context to signal the desired response language. This paper introduces OLA, a new benchmark revealing that frontier LLMs systematically fail to infer these implicit language expectations, often defaulting to non-English responses due to surface-level heuristics. However, the authors show that a lightweight preference alignment technique (CS-DPO) trained on just 1,000 examples can significantly mitigate this issue and even generalize to unseen languages.
What Problem Does This Paper Address?
For multilingual individuals, alternating between languages within a single conversation—known as code-switching—is entirely natural. When these users prompt an LLM, they often mix languages implicitly. For instance, a user might write a sentence primarily in English but embed a few Korean noun phrases, or they might paste an English draft and ask for revisions using a Korean instruction.
In these scenarios, humans easily infer the expected output language using pragmatic and contextual cues. However, current LLMs frequently miss these implicit expectations. Instead of responding in the language the user naturally anticipates, they switch to an undesired language, forcing users to explicitly over-specify their instructions.
While prior work has explored "language confusion" (like a model failing to follow an explicit command like "Respond in Hindi"), this paper tackles a more nuanced and realistic challenge: Output Language Alignment (OLA) when the target language is left completely implicit within code-switched text.
Methods
The authors systematically analyze and address implicit language misalignment using two main approaches:
- The OLA Evaluation Framework: They categorize code-switched interactions into two distinct settings:
- Simple (Intra-sentential): Mixing occurs within a single sentence. The expected output language is the matrix language—the language providing the core grammatical framework (e.g., SVO word order).
- Complex (Inter-sentential): Instruction and content languages differ. The model must infer the output language based on task semantics (e.g., content understanding tasks should be answered in the instruction language, while content manipulation tasks should preserve the source content's language).
- Mitigation via CS-DPO: To fix the underlying alignment gap without relying on fragile prompt engineering, the authors introduce Code-Switching Aware Direct Preference Optimization (CS-DPO). They construct a small preference dataset where the "chosen" response aligns with the implicit matrix language, and the "rejected" response defaults to the embedded language.
Datasets
The study introduces and utilizes several datasets:
- OLA Benchmark: A human-verified evaluation dataset focusing primarily on Korean–English code-switching. It contains 537 prompts for the Simple setting and 1,110 samples for the Complex setting, curated from real-world interaction logs (WildChat) and synthesized using few-shot prompting.
- Multilingual Extensions: To test cross-lingual generalization, the authors extended the Simple setting to English–Chinese and English–Indonesian pairs.
- CS-DPO Training Set: A synthetic preference dataset consisting of 1,079 preference pairs derived from the LIMA dataset, used exclusively for fine-tuning open-weight models.
Key Insights and Ideas
- The "Non-English Default" Bias: LLM failures are not random; they are highly asymmetric. When Korean is the expected language, models achieve near-perfect accuracy. However, when English is expected, pass rates plummet. Models consistently default to the non-English script present in the context, a bias that holds true across Korean, Chinese, and Indonesian pairs.
- Surface Cues Over Semantics: Rather than performing deep linguistic or pragmatic reasoning, LLMs rely heavily on surface-level heuristics. Specifically, a model's output language choice strongly correlates with the overall script proportion in the prompt and exhibits a powerful recency bias toward the language of the very last word of the query.
- Chain-of-Thought (CoT) Makes It Worse: Instructing a model to explicitly "think about which language to respond in first" before answering actually degrades performance or introduces severe language asymmetries. This indicates that LLMs lack robust internal criteria for implicit language selection during their reasoning phases.
- An Alignment Issue, Not a Capability Issue: When given an "oracle" prompt with explicit language instructions (e.g., "Respond in English"), all models achieve near-perfect scores. This proves the bottleneck is purely intent inference, not multilingual generation capacity.
Key Results
- Baseline Performance Gaps: Even frontier models struggle on OLA. In the Simple setting, overall pass rates range from 60.9% to 85.8%. In the Complex setting, performance drops further to between 57.9% and 68.0%.
- Severe Asymmetry: As shown in the detailed breakdown below, GPT-5.1 achieves a 100% pass rate when Korean is expected in the Simple setting, but drops to a staggering 24.4% when English is expected.
- CS-DPO Success: Applying CS-DPO to OLMo 3.1 DPO yielded substantial improvements. It raised the English-target pass rate in the Simple setting by +8.92%. Remarkably, despite being trained only on English–Korean data, the model demonstrated cross-lingual generalization, boosting performance on the unseen English–Chinese pair by +16.60%.
Limitations and Future Work
The authors note several limitations that pave the way for future research:
- Single-Turn Limitation: The benchmark currently evaluates only single-turn interactions, leaving open the question of how language selection and alignment drift across a multi-turn dialogue.
- Human Verification Scale: Due to resource constraints, full native-speaker human validation was restricted to the English–Korean pairs; the Chinese and Indonesian extensions were verified only by the authors.
- Granular Error Mechanics: While the paper categorizes response-level vs. character-level intrusions, a deeper interpretive analysis is required to understand the exact tokenization and subword-level mechanics driving these errors.
Summary updated