Code Roulette: How Prompt Variability Affects LLM Code Generation
Open accessThe DOI matches its Crossref record; 8 of the 37 references it cites were found in a registry or an index, and 29 are not checked yet.
Abstract
Code generation is one of the most active areas of application of Large Language Models (LLMs). While LLMs lower barriers to writing code and accelerate development process, the overall quality of generated programs depends on the quality of given prompts. Specifically, functionality and quality of generated code can be sensitive to user’s background and familiarity with software development. It is therefore important to quantify LLM’s sensitivity to variations in the input. To this end we propose an evaluation pipeline for LLM code generation with a focus on measuring sensitivity to prompt augmentations, completely agnostic to a specific programming tasks and LLMs, and thus widely applicable. We provide extensive experimental evidence illustrating utility of our method and share our code for the benefit of the community.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
WordNet: a lexical database for English
Miller, G. A. (1995) · Communications of the ACM · doi:10.1145/219717.219748 · Cited by 14,015
Use of Ranks in One-Criterion Variance Analysis
Kruskal, W. H., & Wallis, W. A. (1952) · Journal of the American Statistical Association · doi:10.1080/01621459.1952.10483441 · Cited by 13,912 · cited 1×
“Taking into account relatively small sizes of our evaluation datasets (not more than 22 tasks per dataset), we have conducted Kruskal-Wallis H-test [20] to test the difference in sensitivity across datasets.”
A Comparison of Alternative Tests of Significance for the Problem of $m$ Rankings
Friedman, M. (1940) · The Annals of Mathematical Statistics · doi:10.1214/aoms/1177731944 · Cited by 2,785
A Call for Clarity in Reporting BLEU Scores
Post, M. (2018) · Proceedings of the Third Conference on Machine Translation: Research Papers · doi:10.18653/v1/w18-6319 · Cited by 2,112 · cited 3×
“The generated paraphrases are semantically similar and diverse, with BERT score varying between 0.95 and 1.0 and Sacre BLEU metric varying be-tween 0 and 1.0.”
InfluentialComputational thinking and thinking about computing
Wing, J. M. (2008) · Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences · doi:10.1098/rsta.2008.0118 · Cited by 1,784 · cited 1×
“Computational thinking is a type of analytical thinking that draws on concepts fundamental to computing [39].”
Program Synthesis with Large Language Models
Austin, J., Odena, A., Nye, M., Bosma, M., Michalewski, H., Dohan, D., Jiang, E., Cai, C., Terry, M., Le, Q., et al. (2021) · arXiv · doi:10.48550/arxiv.2108.07732 · Cited by 388
Benchmarking Prompt Sensitivity in Large Language Models
Razavi, A., Soltangheis, M., Arabzadeh, N., Salamat, S., Zihayat, M., & Bagheri, E. (2025) · Lecture notes in computer science · doi:10.1007/978-3-031-88714-7_29 · Cited by 150
Out of the BLEU: how should we assess quality of the Code Generation models?
Evtikhiev, M., Bogomolov, E., Sokolov, Y., & Bryksin, T. (2023) · Journal of Systems and Software · doi:10.1016/j.jss.2023.111741 · Cited by 127
Subramonyam, H., Thakkar, D., Ku, A., Dieber, J., & Sinha, A. K. (2025) · CHI Conference on Human Factors in Computing Systems · doi:10.1145/3706598.3713166 · Cited by 84
EvoCodeBench: An Evolving Code Generation Benchmark with Domain-Specific Evaluations
Li, J., Li, G., Zhang, X., Zhao, Y., Dong, Y., Jin, Z., Li, B., Huang, F., & Li, Y. (2024) · neural information processing systems · doi:10.52202/079017-1837 · Cited by 83
CS1-LLM: Integrating LLMs into CS1 Instruction
Vadaparty, A., Zingaro, D., Smith IV, D. H., Padala, M., Alvarado, C., Gorson Benario, J., & Porter, L. (2024) · Proceedings of the 2024 on Innovation and Technology in Computer Science Education V. 1 · doi:10.1145/3649217.3653584 · Cited by 77
The Impact of Prompt Programming on Function-Level Code Generation
Khojah, R., Neto, F. G. D. O., Mohamad, M., & Leitner, P. (2025) · IEEE Transactions on Software Engineering · doi:10.1109/tse.2025.3587794 · Cited by 76 · cited 1×
“Khojah et al. [19] evaluate the impact of prompt techniques in LLMs’ code generation tasks concerning correctness, similarity, and quality.”
Prompt Perturbation in Retrieval-Augmented Generation based Large Language Models
Hu, Z., Wang, C., Shu, Y., Paik, H.-Y., & Zhu, L. (2024) · ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD) · doi:10.1145/3637528.3671932 · Cited by 76
Framework for evaluating code generation ability of large language models
Yeo, S., Ma, Y., Kim, S. C., Jun, H., & Kim, T. (2024) · ETRI Journal · doi:10.4218/etrij.2023-0357 · Cited by 54
NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variations
Chen, J., Li, Z., Hu, X., & Xia, X. (2026) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3745764 · Cited by 44 · cited 1×
“Recent research by Chen et al. [4] investigated robustness of code LLMs to variations that could be expected in real world application based on a literature review and survey of professionals who use LLMs for code.”
Revisiting Code Similarity Evaluation with Abstract Syntax Tree Edit Distance
Song, Y., Lothritz, C., Tang, X., Bissyandé, T. F., & Klein, J. (2024) · Proceedings of the conference - Association for Computational Linguistics. Meeting · doi:10.18653/v1/2024.acl-short.3 · Cited by 41
Heinonen, A., Lehtelä, B., Hellas, A., & Fagerholm, F. (2023) · Information and Software Technology · doi:10.1016/j.infsof.2023.107300 · Cited by 29
Towards Detecting Prompt Knowledge Gaps for Improved LLM-guided Issue Resolution
Ehsani, R., Pathak, S., & Chatterjee, P. (2025) · International Conference on Mining Software Repositories (MSR) · doi:10.1109/msr66628.2025.00107 · Cited by 27 · cited 1×
“Ehsani et al. explored where developers understanding of LLM responses can come apart and developed a tool to offer templates to developers to improve prompts and enable LLM-driven issue resolution [8].”
Teaching Computational Thinking: An Integrative Approach for Middle and High School Learning
Neumann, M. D., Dion, L., & Snapp, R. R. (2021) · The MIT Press eBooks · doi:10.7551/mitpress/11209.001.0001 · Cited by 14
Requirements Are All You Need: The Final Frontier for End-User Software Engineering
Robinson, D., Cabrera, C., Gordon, A. D., Lawrence, N. D., & Mennen, L. (2025) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3708524 · Cited by 12
Self-citationPoitras, E., Crane, B., & Siegel, A. (2024) · Proceedings of the 2024 on ACM Virtual Global Computing Education Conference V. 1 · doi:10.1145/3649165.3690111 · Cited by 9
Effectiveness of symmetric metamorphic relations on validating the stability of code generation LLM
Chan, P. Y. P., Keung, J., & Yang, Z. (2024) · Journal of Systems and Software · doi:10.1016/j.jss.2024.112330 · Cited by 8
CodeArena: A Collective Evaluation Platform for LLM Code GenerationPreprint
Du, M., Luu, A. T., Ji, B., Wu, X., Huang, D., Zhuo, T. Y., Liu, Q., & Ng, S.-K. (2025) · arXiv (Cornell University) · doi:10.48550/arxiv.2503.01295 · Cited by 7 · cited 1×
“CodeArena [7] is an online evaluation platform that periodically integrates novel coding tasks in an open repository and offers programming interfaces (APIs) for users’ interaction.”
LLM Performance for Code Generation on Noisy TasksPreprint
Sendyka, R., Cabrera, C., Paleyes, A., Robinson, D., & Lawrence, N. D. (2025) · arXiv (Cornell University) · doi:10.48550/arxiv.2505.23598 · Cited by 2
Self-citationLiguo Chen Qi Guo Hongrui Jia Zhengran Zeng Xin Wang Yijiang Xu Jian Wu Yidong Wang Qing Gao Jindong Wang et al. 2024. A Survey on Evaluating Large Language Models in Code Generation Tasks. arXiv e-prints (2024) arXiv–2408.
(n.d.)
UnresolvedMark Chen Jerry Tworek Heewoo Jun Qiming Yuan Henrique Ponde de Oliveira Pinto Jared Kaplan Harri Edwards Yuri Burda Nicholas Joseph Greg Brockman Alex Ray Raul Puri Gretchen Krueger Michael Petrov Heidy Khlaaf Girish Sastry Pamela Mishkin Brooke Chan Scott Gray Nick Ryder Mikhail Pavlov Alethea Pow
(n.d.)
UnresolvedAryan Gulati, Brando Miranda, Eric Chen, Emily Xia, Kai Fronsdal, Bruno de Moraes Dumont, and Sanmi Koyejo. 2024. Putnam-AXIOM: A functional and static benchmark for measuring higher level mathematical reasoning. In The 4th Workshop on Mathematical Reasoning and AI at NeurIPS’24.
Aryan, G. (2024)
UnresolvedNaman Jain, King Han, Alex Gu, Wen-Ding Li, Fanjia Yan, Tianjun Zhang, Sida Wang, Armando Solar-Lezama, Koushik Sen, and Ion Stoica. 2025. LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Code. In The Thirteenth International Conference on Learning Representatio
Naman, J. (2025)
UnresolvedCarlos E Jimenez, John Yang, Alexander Wettig, Shunyu Yao, Kexin Pei, Ofir Press, and Karthik R Narasimhan. 2023. SWE-bench: Can Language Models Resolve Real-world GitHub Issues?. In The Twelfth International Conference on Learning Representations.
Jimenez Carlos, E. (2023)
UnresolvedJenny T Liang Melissa Lin Nikitha Rao and Brad A Myers. 2024. Prompts are programs too! Understanding how developers build software containing prompts. arXiv [cs.SE] (Sept. 2024).
(n.d.)
UnresolvedEdward Ma. 2019. NLP Augmentation. https://github.com/makcedward/nlpaug.
(n.d.)
UnresolvedLincoln Murr Morgan Grainger and David Gao. 2023. Testing LLMS on code generation with varying levels of prompt specificity. URL https://arxiv.org/abs/2311.07599 (2023).
(n.d.)
UnresolvedJum C. Nunnally and Ira H. Bernstein. 1994. Psychometric Theory (3rd ed.). McGraw-Hill, New York. xxiv + 752 pages.
Nunnally Jum, C. (1994)
UnresolvedMelanie Sclar, Yejin Choi, Yulia Tsvetkov, and Alane Suhr. 2023. Quantifying Language Models’ Sensitivity to Spurious Features in Prompt Design or: How I learned to start worrying about prompt formatting. In The Twelfth International Conference on Learning Representations.
Melanie, S. (2023)
UnresolvedXinchen Wang Pengfei Gao Chao Peng Ruida Hu and Cuiyun Gao. 2025. CodeVisionary: An Agent-based Framework for Evaluating Large Language Models in Code Generation. arXiv e-prints (2025) arXiv–2504.
(n.d.)
UnresolvedTianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q Weinberger, and Yoav Artzi. 2020. BERTScore: Evaluating Text Generation with BERT. In International Conference on Learning Representations.
Tianyi, Z. (2020)
UnresolvedZiyin Zhang Chaoyu Chen Bingchang Liu Cong Liao Zi Gong Hang Yu Jianguo Li and Rui Wang. 2023. Unifying the perspectives of nlp and software engineering: A survey on language models for code. arXiv preprint arXiv:https://arXiv.org/abs/2311.07989 (2023).
(n.d.)
Unresolved
Research works printed but not linked: 2
- [9] Mennatallah El-Assady, Wolfgang Jentner, Fabian Sperrle, Rita Sevastjanova, Annette Hautli-Janisz, Miriam Butt, and Daniel Keim. 2019. Lingvis.Io - A linguistic visual analytics framework. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: System Demonstrations . Association for Computational Linguistics, Stroudsburg, PA, USA, 13-18. -
- [13] Jiaxin Guo, Daimeng Wei, Yuanchang Luo, Shimin Tao, Hengchao Shang, Zongyao Li, Shaojun Li, Jinlong Yang, Zhanglin Wu, Zhiqiang Rao, and Hao Yang. 2024. M-ped: Multi-prompt ensemble decoding for Large Language Models. arXiv [cs.CL] (Dec. 2024). -
Cited by
Articulating Assumptions in AI-Generated Scientific Analyses through Task DecompositionPreprint
Hammad, A., & Nojiri, M. (2026) · arXiv (Cornell University) · doi:10.48550/arxiv.2607.05762 · Cited by 4
It’s Not Just the Prompt: Model Choice Dominates LLM Creative Output
Haase, J., Gonnermann-Müller, J., Hanel, P. H. P., Leins, N., Kosch, T., Mendling, J., & Pokutta, S. (2026) · CHI Conference Extended Abstracts on Human Factors in Computing Systems (CHI EA) · doi:10.1145/3772363.3799284 · Cited by 2
A Road Map for Tamed Interactions with Large Language Models
Scotti, V., Keim, J., Hey, T., Metzger, A., Koziolek, A., & Mirandola, R. (2026) · ACM Transactions on Software Engineering and Methodology · doi:10.1145/3832776 · Cited by 2
“Ourobjective with LSL is toenable reasoning about:(i) control-flowproperties(e.g., reachability, termination), (ii) structural validity of outputs, (iii) consistency of interaction contracts, (iv) presence of recovery strategies.”
Bui, T., Zhang, T., Thung, F., Xiong, Y., Jiang, P., Zhou, X., & Lo, D. (2026) · Lecture notes in computer science · doi:10.1007/978-981-92-5737-9_5 · Cited by 2
Prompt Fairness: Sub-group Disparities in LLMs
Zhong, M., Teku, N., & Tandon, R. (2025) · Asilomar Conference on Signals, Systems and Computers (ACSSC) · doi:10.1109/ieeeconf67917.2025.11443738 · Cited by 3
Metadata
- Authors
- Paleyes, A., Robinson, D., Sendyka, R., Cabrera, C., & Lawrence, N. D.
- Affiliations
- University of Cambridge (GB)
- Venue
- Proceedings of the 3rd International Workshop on Large Language Models For Code
- Publisher
- ACM
- Published
- 2026-04-12
- Pages
- 59-66
- OpenAlex
- W4417348373
- Semantic Scholar
- 4ba630f9b207b400a00873254ae9e94986cf7290
- Cited by
- 8
- References
- 37
- Citations by year
- 2026: 8
- FWCI
- 85.38
- Type
- conference paper
- Language
- en
- Open access
- hybrid
- doi.org
- Locations
- International Workshop on Large Language Models for Code (LLM4Code) (publishedVersion, cc-by)
- arXiv (Cornell University) (submittedVersion, cc-by)
- arXiv (Cornell University) (cc-by)
- Funders
- Accelerate Program for Scientific Discovery (n/a)
- Topics
- Physical Sciences › Computer Science › Information Systems › Software Engineering Research
- Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
- Physical Sciences › Computer Science › Computer Science Applications › Teaching and Learning Programming
- Keywords
- LLM-based code generation, prompt augmentation, input sensitivity, evaluation pipeline, large language models
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.