LangChoiceBench: Measuring and Explaining Programming-Language Choice in LLMs

Lukas Twist, Twm Stone, Helen Yannakoudakis, Jie M. Zhang
8/6/2026
cs.SEcs.CL
benchmark-dataset

No confident code implementation found for this paper.

Abstract

Large language models (LLMs) have been shown to exhibit strong Python preferences when generating project-level code, but there is currently no systematic way to measure this behaviour across new models. To bridge this gap, we introduce LangChoiceBench, a project-level code-generation benchmark for measuring Python preference, recommendation-implementation consistency, and language diversity.

Show full abstract

LangChoiceBench covers 28 projects across seven software areas where Python is often a poor default. We evaluate 25 diverse LLMs and find that Python remains heavily over-selected, recommendation-implementation consistency is low, and smaller open-weight models generally show stronger Python preference and lower language diversity. We further analyse 9,826 reasoning traces and find that most Python choices are automatic or driven primarily by ease, rather than explicit consideration of project requirements. In a smaller but important set of cases, models fabricate contextual support for choosing Python - a failure mode we call phantom evidence - or produce code that contradicts the language selected in their own reasoning.

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{twist2026langchoicebench,
  title  = {LangChoiceBench: Measuring and Explaining Programming-Language Choice in LLMs},
  author = {Lukas Twist and Twm Stone and Helen Yannakoudakis and Jie M. Zhang},
  year   = {2026},
  eprint = {2608.06041},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2608.06041v1}
}

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

Discussion