CSWBench: Evaluating Context-Sensitive Code-Switching in Creative Writing

Zewen Jiang, Yahan Li, Chenlu Guo, Diana Inkpen, Yuan Wu +1 more
10/14/2026
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Large language models (LLMs) have demonstrated multilingual capabilities across diverse language generation and understanding tasks. Yet effective code-switching requires more than multilingual proficiency: models must decide when, where, and why to switch languages in ways that fit the surrounding context. This context-sensitive ability remains insufficiently evaluated. We introduce CSWBench, a benchmark for evaluating context-sensitive code-switching in creative writing through two complementary settings: Focused Narrative and Extended Narrative. We further propose CSWEval, a theory-informed framework with two complementary levels: event-level evaluation of Licensing, Contextual Appropriateness, and Functional Gain, and whole-text evaluation of task-specific quality---overall literary and narrative quality in Focused Narrative and quality emphasizing multilingual organization in Extended Narrative. Evaluating twelve LLMs, we find that models exhibit meaningful but uneven code-switching competence across narrative contexts. Model differences are particularly pronounced in multilingual literary integration, while multilingual-focused dimensions show stronger difficulty effects overall than the general narrative dimensions; narratively salient switches are associated with stronger contextual and functional realization; and event-level CS quality is moderately associated with whole-text performance.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{jiang2026cswbench,
  title  = {CSWBench: Evaluating Context-Sensitive Code-Switching in Creative Writing},
  author = {Zewen Jiang and Yahan Li and Chenlu Guo and Diana Inkpen and Yuan Wu and Yi Chang},
  year   = {2026},
  eprint = {2610.20272},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.20272v1}
}

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/2610.20272.svg)](https://codeofpaper.com/paper/2610.20272)

Discussion