Studying How Configurations Impact Code Generation in LLMs: the Case of ChatGPT
Not on the map. Why?
Abstract (arXiv)
Leveraging LLMs for code generation is becoming increasingly common, as tools like ChatGPT can suggest method implementations with minimal input, such as a method signature and brief description. Empirical studies further highlight the effectiveness of LLMs in handling such tasks, demonstrating notable performance in code generation scenarios. However, LLMs are inherently non-deterministic, with their output influenced by parameters such as temperature, which regulates the model's level of creativity, and top-p, which controls the choice of the tokens that shall appear in the output. Despite their significance, the role of these parameters is often overlooked. This paper systematically studies the impact of these parameters, as well as the number of prompt repetitions required to account for non-determinism, in the context of 548 Java methods. We observe significantly different performances across different configurations of ChatGPT, with temperature having a marginal impact compared to the more prominent influence of the top-p parameter. Additionally, we show how creativity can enhance code generation tasks. Finally, we provide concrete recommendations for addressing the non-determinism of the model.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). First posted on arXiv 7 Feb 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 6; 2026: 2.
8 papers.
- 2025Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inferencecited by 53
- 2025A Study of LLMs' Preferences for Libraries and Programming Languagescited by 20
- 2025Reflections on the Reproducibility of Commercial LLM Performance in Empirical Software Engineering Studiescited by 12
- 2026Dataset-Level Metrics Attenuate Non-Determinism: A Fine-Grained Non-Determinism Evaluation in Diffusion Language Modelscited by 3
- 2025Library Hallucinations in LLM-Generated Code: A Risk Analysis Grounded in Developer Queriescited by 1
- 2025Context-Guided Decompilation: A Step Towards Re-executabilitycited by 1
- 2025Lifecycle-Aware code generation: Leveraging Software Engineering Phases in LLMscited by 0
- 2026Generation of Web Apps with Agentic IDEs: An Empirical Assessmentcited by 0
- 2026Generation of Web Apps with Agentic IDEs: An Empirical Assessment21 Aug 2026
- 2026Dataset-Level Metrics Attenuate Non-Determinism: A Fine-Grained Non-Determinism Evaluation in Diffusion Language Models15 Apr 2026
- 2025Context-Guided Decompilation: A Step Towards Re-executability3 Nov 2025
- 2025Reflections on the Reproducibility of Commercial LLM Performance in Empirical Software Engineering Studies29 Oct 2025
- 2025Lifecycle-Aware code generation: Leveraging Software Engineering Phases in LLMs28 Oct 2025
- 2025Library Hallucinations in LLM-Generated Code: A Risk Analysis Grounded in Developer Queries26 Sep 2025
- 2025Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inference11 Jun 2025
- 2025A Study of LLMs' Preferences for Libraries and Programming Languages21 Mar 2025