A Study on the Impact of Natural Language Differences in Prompts on Automatic Code Generation Using LLMs
- Source
- arxiv.org
- Author
- Haruka Tokumasu, Masanari Kondo, Alexander Serebrenik, Dong Wang, Kei Koyanagi, Kotaro Noguchi, Naoyasu Ubayashi, Yasutaka Kamei
- Date

Context
A new study tested whether the natural language of a coding prompt, not just its content, changes how often a returns correct code (arxiv.org). The authors took the same programming problems from three benchmarks, AtCoder, LeetCode, and BigCodeBench, translated each into English, Japanese, and Chinese, and ran seven models, including GPT-4o, DeepSeek-V3.2, and two sizes of Qwen2.5-Coder, against every version, checking whether the generated code passed the 's test cases. Accuracy was consistently highest when a problem was presented in the language each benchmark was officially built around, meaning the wording language itself, independent of the underlying problem, shifts how much working code comes back. Translating a prompt into that preferred language recovered some of the gap, but the paper reports the effect was inconsistent across datasets and models, and smaller for benchmarks whose problem statements were longer and more narrative in style.
- Each dataset's officially supported language (the language its problem statements were originally written in) produced the highest median accuracy across the seven models tested — accuracy dropped when the same problems were translated into a different language.
- Translating problems back into the dataset's native language before prompting improved accuracy on average, but the improvement was inconsistent — it did not reliably help across every dataset and model combination.
- AtCoder problems had an unusually high share of narrative-style and longer problem statements compared to LeetCode and BigCodeBench, and showed a stronger language-bias effect — pointing to narrative framing and prompt length, not just language choice, as contributing factors.
articleDo Influence Tactics Matter? Investigating Prompt Framing Effects in LLM Code GenerationAlex Deaconu, Anubhav Gupta, Manaal Basha, Nicholas Haydu, Gema Rodr\'iguez-P\'erez
articleWhen Who You Are Can Change the Code You Get: A Study of Persona-Induced Bias in LLM Code GenerationAnubhav Gupta, Mayara Costa Figueiredo, Leticia Santos Machado, Tanner Wright, Ivan Beschastnikh, Cleidson R. B. de Souza, Gema Rodr\'iguez-P\'erez
articleImproving the Energy-Efficiency of the Code Generated by LLMs through Effective PromptingRitika Rekhi, Bing Zhang, Md Arman Islam, Jaya Krishna Pasham, Yeswanth Chitturi, Akshay Paramesha, Isha Valiveti, Asif Imran, Bekir Turkkan, Tevfik Kosar
Checking sign-in…
Loading comments…