智能体
arxiv.org ·
研究:提示词自然语言差异对大模型自动代码生成的影响
该 arXiv 论文(cs.SE)研究输入提示词所用自然语言对 LLM 代码生成性能的影响,并评估翻译作为缓解语言偏置策略的效果。作者在 AtCoder、LeetCode、BigCodeBench 上以英语、日语、中文三种语言呈现同一问题,使用 GPT-4o、o3-mini、DeepSeek-V3.2、Llama-3、Qwen2.5-Coder-14B、Qwen2.5-Coder-0.5B 和 GitHub Copilot 共 7 个模型,以生成代码通过全部测试用例的数量衡量准确率。结果显示:数据集官方支持的语言取得最高中位准确率;翻译可提升准确率,但效果因数据集和模型类型而异;AtCoder 中叙述型、较长的问题陈述占比更高,提示词的叙述性与上下文长度是与语言偏置及翻译效果相关的重要因素。
AI推荐理由 arXiv 预印本,作者与实验设置明确:在 AtCoder、LeetCode、BigCodeBench 上以英/日/中三种语言提示词测试 7 个模型(GPT-4o、o3-mini、DeepSeek-V3.2、Llama-3、Qwen2.5-Coder-14B/0.5B、GitHub Copilot),报告语言偏置存在、官方支持语言中位准确率最高、翻译可提升但不稳定。属可验证的实证研究,对提示工程与多语言代码生成有参考价值;局限是仅摘要级信息、未给出具体数值,且为预印本未经同行评审。
72
正文
Computer Science > Software Engineering
arXiv:2609.18311 (cs)
[Submitted on 16 Sep 2026]
Title:A Study on the Impact of Natural Language Differences in Prompts on Automatic Code Generation Using LLMs
Authors:Haruka Tokumasu, Masanari Kondo, Alexander Serebrenik, Dong Wang, Kei Koyanagi, Kotaro Noguchi, Naoyasu Ubayashi, Yasutaka Kamei
View a PDF of the paper titled A Study on the Impact of Natural Language Differences in Prompts on Automatic Code Generation Using LLMs, by Haruka Tokumasu and 7 other authors
View PDF
HTML (experimental)
Abstract:Large Language Models (LLMs) have demonstrated remarkable performance in automatic code generation tasks, thereby encouraging new research in this area. Although numerous studies have explored LLM-based code generation, the impact of the natural language in input prompts remains unexplored (language bias). This study aims to (1) quantify how the natural language of input prompts influences LLM-based code generation performance and (2) evaluate a mitigation strategy to reduce language bias in code generation. We assess code generation Accuracy on AtCoder, LeetCode, and BigCodeBench. To quantify the language bias on code generation, each problem is presented in English, Japanese, and Chinese. We use seven LLMs (GPT-4o, o3-mini, DeepSeek-V3.2, Llama-3, Qwen2.5-Coder-14B, Qwen2.5-Coder-0.5B, and GitHub Copilot) and assess their performance in terms of Accuracy (the number of problems for which generated code passes all test cases). We compare Accuracy before and after translation to evaluate the effectiveness of translation as a mitigation strategy. We observed that the natural language of problem statements affects LLM-based code generation performance. Specifically, the languages officially supported by each dataset achieved the highest median Accuracy. Also, translation improved Accuracy, but its effectiveness was not consistent across datasets and model types. We found that AtCoder contained a particularly high proportion of narrative-style problem statements and longer problem statements. Natural language significantly affects LLM code generation accuracy. Translation can mitigate language bias in some settings, but its effectiveness depends on the dataset and model type. Furthermore, the narrative aspects and context length of input prompts are important factors related to language bias and the effectiveness of translation as a mitigation strategy.
Comments:
Subjects:
Software Engineering (cs.SE)
Cite as:
arXiv:2609.18311 [cs.SE]
(or
arXiv:2609.18311v1 [cs.SE] for this version)
https://doi.org/10.48550/arXiv.2609.18311
Focus to learn more
arXiv-issued DOI via DataCite (pending registration)
Submission history
From: Haruka Tokumasu [view email]
[v1]
Wed, 16 Sep 2026 08:32:09 UTC (983 KB)
Full-text links:
Access Paper:
View a PDF of the paper titled A Study on the Impact of Natural Language Differences in Prompts on Automatic Code Generation Using LLMs, by Haruka Tokumasu and 7 other authors
View PDF
HTML (experimental)
TeX Source
view license
Current browse context:
cs.SE
new
|
recent
| 2026-09
Change to browse by:
cs
References & Citations
NASA ADS
Google Scholar
Semantic Scholar
export BibTeX citation
Loading...
BibTeX formatted citation
×
loading...
Data provided by:
Bookmark
Bibliographic Tools
Bibliographic and Citation Tools
Bibliographic Explorer Toggle
Bibliographic Explorer (What is the Explorer?)
Connected Papers Toggle
Connected Papers (What is Connected Papers?)
Litmaps Toggle
Litmaps (What is Litmaps?)
scite.ai Toggle
scite Smart Citations (What are Smart Citations?)
Code, Data, Media
Code, Data and Media Associated with this Article
alphaXiv Toggle
alphaXiv (What is alphaXiv?)
Links to Code Toggle
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub Toggle
DagsHub (What is DagsHub?)
GotitPub Toggle
Gotit.pub (What is GotitPub?)
Huggingface Toggle
Hugging Face (What is Huggingface?)
ScienceCast Toggle
ScienceCast (What is ScienceCast?)
Demos
Demos
Replicate Toggle
Replicate (What is Replicate?)
Spaces Toggle
Hugging Face Spaces (What is Spaces?)
Spaces Toggle
TXYZ.AI (What is TXYZ.AI?)
Related Papers
Recommenders and Search Tools
Link to Influence Flower
Influence Flower (What are Influence Flowers?)
Core recommender toggle
CORE Recommender (What is CORE?)
Author
Venue
Institution
Topic
About arXivLabs
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.
Which authors of this paper are endorsers? |
Disable MathJax (What is MathJax?)