An Empirical Study of the Non-Determinism of ChatGPT in Code Generation
King's College London · Harman (United Kingdom) · +3 more institutions
Abstract
There has been a recent explosion of research on Large Language Models (LLMs) for software engineering tasks, in particular code generation. However, results from LLMs can be highly unstable; non-deterministically returning very different code for the same prompt. Such non-determinism affects the correctness and consistency of the generated code, undermines developers’ trust in LLMs, and yields low reproducibility in LLM-based papers. Nevertheless, there is no work investigating how serious this non-determinism threat is. To fill this gap, this article conducts an empirical study on the non-determinism of ChatGPT in code generation. We chose to study ChatGPT because it is already highly prevalent in the code…
Citation impact
- FWCI
- 14.29
- Percentile
- 100%
- References
- 42
Authors
4- SOShuyin OuyangCorresponding
King's College London, Harman (United Kingdom), University of Bristol, The London College, University College London
- JMJie M. Zhang
King's College London, Harman (United Kingdom), University of Bristol, The London College, University College London
- MHMark Harman
King's College London, Harman (United Kingdom), University of Bristol, The London College, University College London
- MWMeng Wang
King's College London, Harman (United Kingdom), University of Bristol, The London College, University College London
Topics & keywords
- Computer science
- Determinism
- Code generation
- Programming language
- Code (set theory)
- Software engineering
- Computer security
- Epistemology