CodeMixBench: Evaluating Code-Mixing Capabilities of LLMs Across 18 Languages

Yilun Yang, Yekun Chai
7/24/2025
cs.CL

Official code: Jeromeyluck/CodeMixBench (2 stars, last commit 2025-12-21).

Abstract

Code-mixing, the practice of switching between languages within a conversation, poses unique challenges for traditional NLP. Existing benchmarks are limited by their narrow language pairs and tasks, failing to adequately assess large language models' (LLMs) code-mixing abilities. Despite the recognized importance of code-mixing for multilingual users, research on LLMs in this context remains sparse. Additionally, current techniques for synthesizing code-mixed data are underdeveloped to generate code-mixing. In response, we introduce CodeMixBench, a comprehensive benchmark covering eight tasks, including three specific to LLMs and five traditional NLP tasks, and 18 languages across seven language families. We also propose a new method for generating large-scale synthetic code-mixed texts by combining word substitution with GPT-4 prompting. Our evaluation reveals consistent underperformance of LLMs on code-mixed datasets involving different language families. Enhancements in training data size, model scale, and few-shot learning could improve their performance. The code and dataset are available at https://github.com/Jeromeyluck/CodeMixBench.

View on arXivView PDF

Code Implementations(1)

Repository of 2025 EMNLP paper -- CodeMixBench: Evaluating Code-Mixing Capabilities of LLMs Across 18 Languages

20Python, Jupyter NotebookAug 2, 202410 months ago

Similar Papers

Cite this paper

@article{yang2025codemixbench,
  title  = {CodeMixBench: Evaluating Code-Mixing Capabilities of LLMs Across 18 Languages},
  author = {Yilun Yang and Yekun Chai},
  year   = {2025},
  eprint = {2507.18791},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2507.18791v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.18791.svg)](https://codeofpaper.com/paper/2507.18791)

Discussion