An Empirical Study of the Non-determinism of ChatGPT in Code Generation
Not on the map. Why?
Cited by 24 in LLM agents and tool use, but placed by its own abstract, which didn’t fit.
Abstract (arXiv)
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; nondeterministically returning very different codes for the same prompt. Non-determinism is a potential menace to scientific conclusion validity. When non-determinism is high, scientific conclusions simply cannot be relied upon unless researchers change their behaviour to control for it in their empirical analyses. This paper conducts an empirical study to demonstrate that non-determinism is, indeed, high, thereby underlining the need for this behavioural change. We choose to study ChatGPT because it is already highly prevalent in the code generation research literature. We report results from a study of 829 code generation problems from three code generation benchmarks (i.e., CodeContests, APPS, and HumanEval). Our results reveal high degrees of non-determinism: the ratio of coding tasks with zero equal test output across different requests is 75.76%, 51.00%, and 47.56% for CodeContests, APPS, and HumanEval, respectively. In addition, we find that setting the temperature to 0 does not guarantee determinism in code generation, although it indeed brings less non-determinism than the default configuration (temperature=1). These results confirm that there is, currently, a significant threat to scientific conclusion validity. In order to put LLM-based research on firmer scientific foundations, researchers need to take into account non-determinism in drawing their conclusions.
Key facts. Cited by 137 papers in the map (data through 14 Oct 2026). First posted on arXiv 5 Aug 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 9; 2024: 32; 2025: 46; 2026: 50.
137 papers.
Sort:
By area:
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2024LogicVista: Multimodal LLM Logical Reasoning Benchmark in Visual Contextscited by 245
- 2024Non-Determinism of "Deterministic" LLM Settingscited by 92
- 2023Are You Sure? Challenging LLMs Leads to Performance Drops in The FlipFlop Experimentcited by 77
- 2024CogBench: a large language model walks into a psychology labcited by 63
- 2024Query-Based Adversarial Prompt Generationcited by 62
- 2025Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inferencecited by 53
- 2024EDT: Improving Large Language Models' Generation by Entropy-based Dynamic Temperature Samplingcited by 45
- 2023Exploring the Sensitivity of LLMs' Decision-Making Capabilities: Insights from Prompt Variation and Hyperparameterscited by 32
- 2024CodeMind: Evaluating Large Language Models for Code Reasoningcited by 32
- 2024Easy Problems That LLMs Get Wrongcited by 30
- 2025Large Language Models Miss the Multi-Agent Markcited by 26
38 more
- 2024What Should We Engineer in Prompts? Training Humans in Requirement-Driven LLM Usecited by 24
- 2025Hallucination Detection in Large Language Models with Metamorphic Relationscited by 24
- 2023(Why) Is My Prompt Getting Worse? Rethinking Regression Testing for Evolving LLM APIscited by 23
- 2024CodeMirage: Hallucinations in Code Generated by Large Language Modelscited by 23
- 2025AgentBound: Securing Execution Boundaries of AI Agentscited by 23
- 2025QualityFlow: An Agentic Workflow for Program Synthesis Controlled by LLM Quality Checkscited by 22
- 2023METAL: Metamorphic Testing Framework for Analyzing Large-Language Model Qualitiescited by 20
- 2025Don't Judge Code by Its Cover: Exploring Biases in LLM Judges for Code Evaluationcited by 18
- 2024Scaling Up Video Summarization Pretraining with Large Language Modelscited by 17
- 2026On Randomness in Agentic Evalscited by 17
- 2025Give LLMs a Security Course: Securing Retrieval-Augmented Code Generation via Knowledge Injectioncited by 16
- 2025Exploring the Potential of Diffusion Large Language Models in Code Generationcited by 16
- 2025An Empirical Study on Failures in Automated Issue Solvingcited by 16
- 2023Benchmarking and Explaining Large Language Model-based Code Generation: A Causality-Centric Approachcited by 15
- 2024HLM-Cite: Hybrid Language Model Workflow for Text-based Scientific Citation Predictioncited by 15
- 2024MAG-V: A Multi-Agent Framework for Synthetic Data Generation and Verificationcited by 12
- 2025Reflections on the Reproducibility of Commercial LLM Performance in Empirical Software Engineering Studiescited by 12
- 2024Fairness Testing of Large Language Models in Role-Playingcited by 11
- 2025EdgeLoRA: An Efficient Multi-Tenant LLM Serving System on Edge Devicescited by 11
- 2026TrajAudit: Automated Failure Diagnosis for Agentic Coding Systemscited by 11
- 2023Language Models as a Service: Overview of a New Paradigm and its Challengescited by 10
- 2025Agentic AI Process Observability: Discovering Behavioral Variabilitycited by 10
- 2025Failure Modes in LLM Systems: A System-Level Taxonomy for Reliable AI Applicationscited by 10
- 2024Guiding Enumerative Program Synthesis with Large Language Modelscited by 9
- 2024Statically Contextualizing Large Language Models with Typed Holescited by 9
- 2025Exploring the Security Threats of Knowledge Base Poisoning in Retrieval-Augmented Code Generationcited by 9
- 2026Replayable Financial Agents: A Determinism-Faithfulness Assurance Harness for Tool-Using LLM Agentscited by 7
- 2026Toward Expert Investment Teams:A Multi-Agent LLM System with Fine-Grained Trading Taskscited by 7
- 2024An Insight into Security Code Review with LLMs: Capabilities, Obstacles, and Influential Factorscited by 6
- 2024Rethinking Software Engineering in the Foundation Model Era: A Curated Catalogue of Challenges in the Development of Trustworthy FMwarecited by 6
- 2024Validating LLM-Generated Programs with Metamorphic Prompt Testingcited by 6
- 2024The Cognitive Capabilities of Generative AI: A Comparative Analysis with Human Benchmarkscited by 6
- 2026When Agents Fail: A Comprehensive Study of Bugs in LLM Agents with Automated Labelingcited by 6
- 2024Search-based Optimisation of LLM Learning Shots for Story Point Estimationcited by 5
- 2025Towards Advancing Code Generation with Large Language Models: A Research Roadmapcited by 5
- 2025AutoMisty: A Multi-Agent LLM Framework for Automated Code Generation in the Misty Social Robotcited by 5
- 2024Generative AI to Generate Test Data Generatorscited by 4
- 2024To what extent is ChatGPT useful for language teacher lesson plan creation?cited by 4
50 most cited of 137 All 137 (JSON)
- 2026Twenty Days Later: A Pre-Registered Test of History-Based Forecasts of Brand Mentions in Gemini Answers14 Oct 2026
- 2026AgentSpy: Making AI Agent Behavior Observable5 Oct 2026
- 2026To Explore The Strange New World Beyond Data Distribution: System Behavior, Causality Tax, and Non-causal Base Model2 Oct 2026
- 2026When More Data Is Not Enough: The Context-Sufficiency Frontier in Generative AI Personalization30 Sep 2026
- 2026SafeLLM4SE: Statistical Evaluation and Reporting for LLM-based Software Engineering Systems29 Sep 2026
- 2026More Programs or More Rolls? Separating Coverage from Specialization in LLM Harnesses26 Sep 2026
- 2026ORCA: Evaluating LLMs on Data Science Code Translation25 Sep 2026
- 2026Analyzing and Mitigating Cost-Inefficient Behaviors in Coding Agents25 Sep 2026
- 2026How Reproducible Are Evaluation Conclusions? A Self-Audit of LLM-Inferred Prompt Structure24 Sep 2026
- 2026LEGIT: Credentialing Protocol for Trustworthy AI Agent Marketplaces18 Sep 2026
- 2026T-GADE: Thermodynamical Generative-AI-Driven Evolution of LLM Artifacts10 Sep 2026
- 2026Clean Engineering, Unstable Measurement: A Preregistered Reliability Failure of Black-Box LLM Observers on Shared Endpoints3 Sep 2026
38 more
- 2026Specification Portability Across LLM Development Agents: Cross-Agent Compatibility in Specification-Driven Software Migration21 Aug 2026
- 2026Engineering Reliable Coding Agents: Evaluating and Operating the System Around the Model14 Aug 2026
- 2026A MARL Centered Reference Architecture for Large Language Model Augmentation in Smart Manufacturing7 Aug 2026
- 2026LangChoiceBench: Measuring and Explaining Programming-Language Choice in LLMs6 Aug 2026
- 2026EduPluginBench: Executable Assurance for AI-Generated Educational Plugins1 Aug 2026
- 2026SenWorld: A Digital-Twin Simulation for Generating Context-Rich Evaluation Data22 Jul 2026
- 2026Understanding Agent-Reactive Bugs at the Model-Harness Boundary: An Empirical Study of LLM Agent Issue Reports17 Jul 2026
- 2026Large Language Models for Code Generation from Multilingual Prompts: A Curated Benchmark and a Study on Code Quality16 Jul 2026
- 2026Where Does the Noise Come From? A Variance-Components Decomposition of Non-Determinism in LLM Brand Answers14 Jul 2026
- 2026Code-MUE: Measuring Code LLMs' Uncertainty through Execution-based Semantic Interaction Graphs14 Jul 2026
- 2026Reasoning effort, not tool access, buys first-try reliability in agentic code generation: an observational study2 Jul 2026
- 2026From Registry to Repository: How AI Agent Skills Are Written, Adapted, and Maintained1 Jul 2026
- 2026MANGO: Automated Multi-Agent Test Oracle Generation for Vision-Language-Action Models23 Jun 2026
- 2026The Alignment Problem in Constrained Code Generation19 Jun 2026
- 2026AI-driven Software Development: A Pragmatic Path to Agentic Development Processes13 Jun 2026
- 2026TrajAudit: Automated Failure Diagnosis for Agentic Coding Systems26 May 2026
- 2026Leveraging LLMs for Grammar Adaptation: A Study on Metamodel-Grammar Co-Evolution20 May 2026
- 2026Beyond Execution: Static-Analysis Rewards and Hint-Conditioned Diffusion RL for Code Generation16 May 2026
- 2026ARIADNE: Agentic Reward-Informed Adaptive Decision Exploration via Blackboard-Driven MCTS for Competitive Program Generation4 May 2026
- 2026STELLAR-E: a Synthetic, Tailored, End-to-end LLM Application Rigorous Evaluator27 Apr 2026
- 2026Introducing Background Temperature to Characterise Hidden Randomness in Large Language Models24 Apr 2026
- 2026Co-Located Tests, Better AI Code: How Test Syntax Structure Affects Foundation Model Code Generation20 Apr 2026
- 2026Mitigating Prompt-Induced Cognitive Biases in General-Purpose AI for Software Engineering18 Apr 2026
- 2026Dataset-Level Metrics Attenuate Non-Determinism: A Fine-Grained Non-Determinism Evaluation in Diffusion Language Models15 Apr 2026
- 2026Compiled AI: Deterministic Code Generation for LLM-Based Workflow Automation6 Apr 2026
- 2026Toward Expert Investment Teams:A Multi-Agent LLM System with Fine-Grained Trading Tasks26 Feb 2026
- 2026Assessing Risks of Large Language Models in Mental Health Support: A Framework for Automated Clinical AI Red Teaming23 Feb 2026
- 2026Agent-Supported Foresight for AI Systemic Risks: AI Agents for Breadth, Experts for Judgment9 Feb 2026
- 2026On Randomness in Agentic Evals6 Feb 2026
- 2026Generics in science communication: Misaligned interpretations across laypeople, scientists, and large language models5 Feb 2026
- 2026A Guide to Large Language Models in Modeling and Simulation: From Core Techniques to Critical Challenges5 Feb 2026
- 2026MCERF: Advancing Multimodal LLM Evaluation of Engineering Documentation with Enhanced Retrieval31 Jan 2026
- 2026Age Matters: Analyzing Age-Related Discussions in App Reviews29 Jan 2026
- 2026Benchmarking Text-to-Python against Text-to-SQL: The Impact of Explicit Logic and Ambiguity22 Jan 2026
- 2026When Agents Fail: A Comprehensive Study of Bugs in LLM Agents with Automated Labeling21 Jan 2026
- 2026Replayable Financial Agents: A Determinism-Faithfulness Assurance Harness for Tool-Using LLM Agents17 Jan 2026
- 2026Agentic Pipelines in Embedded Software Engineering: Emerging Practices and Challenges15 Jan 2026
- 2026RISE: Rule-Driven SQL Dialect Translation via Query Reduction9 Jan 2026
50 newest of 137 All 137 (JSON)
- 2025Large Language Models Miss the Multi-Agent Markcited by 26
- 2025AgentBound: Securing Execution Boundaries of AI Agentscited by 23
- 2025QualityFlow: An Agentic Workflow for Program Synthesis Controlled by LLM Quality Checkscited by 22
- 2026On Randomness in Agentic Evalscited by 17
- 2025An Empirical Study on Failures in Automated Issue Solvingcited by 16
- 2024MAG-V: A Multi-Agent Framework for Synthetic Data Generation and Verificationcited by 12
- 2026TrajAudit: Automated Failure Diagnosis for Agentic Coding Systemscited by 11
- 2025Agentic AI Process Observability: Discovering Behavioral Variabilitycited by 10
- 2026Replayable Financial Agents: A Determinism-Faithfulness Assurance Harness for Tool-Using LLM Agentscited by 7
- 2026Toward Expert Investment Teams:A Multi-Agent LLM System with Fine-Grained Trading Taskscited by 7
- 2026When Agents Fail: A Comprehensive Study of Bugs in LLM Agents with Automated Labelingcited by 6
- 2025AutoMisty: A Multi-Agent LLM Framework for Automated Code Generation in the Misty Social Robotcited by 5
12 most cited of 23 All 23 (JSON)
- 2026AgentSpy: Making AI Agent Behavior Observable5 Oct 2026
- 2026Analyzing and Mitigating Cost-Inefficient Behaviors in Coding Agents25 Sep 2026
- 2026LEGIT: Credentialing Protocol for Trustworthy AI Agent Marketplaces18 Sep 2026
- 2026Engineering Reliable Coding Agents: Evaluating and Operating the System Around the Model14 Aug 2026
- 2026Understanding Agent-Reactive Bugs at the Model-Harness Boundary: An Empirical Study of LLM Agent Issue Reports17 Jul 2026
- 2026From Registry to Repository: How AI Agent Skills Are Written, Adapted, and Maintained1 Jul 2026
- 2026AI-driven Software Development: A Pragmatic Path to Agentic Development Processes13 Jun 2026
- 2026TrajAudit: Automated Failure Diagnosis for Agentic Coding Systems26 May 2026
- 2026ARIADNE: Agentic Reward-Informed Adaptive Decision Exploration via Blackboard-Driven MCTS for Competitive Program Generation4 May 2026
- 2026Toward Expert Investment Teams:A Multi-Agent LLM System with Fine-Grained Trading Tasks26 Feb 2026
- 2026On Randomness in Agentic Evals6 Feb 2026
- 2026When Agents Fail: A Comprehensive Study of Bugs in LLM Agents with Automated Labeling21 Jan 2026
12 newest of 23 All 23 (JSON)
- 2024LogicVista: Multimodal LLM Logical Reasoning Benchmark in Visual Contextscited by 245
- 2024CodeMind: Evaluating Large Language Models for Code Reasoningcited by 32
- 2024Easy Problems That LLMs Get Wrongcited by 30
- 2023(Why) Is My Prompt Getting Worse? Rethinking Regression Testing for Evolving LLM APIscited by 23
- 2024An Insight into Security Code Review with LLMs: Capabilities, Obstacles, and Influential Factorscited by 6
- 2025AuPair: Golden Example Pairs for Code Repaircited by 3
- 2026Reasoning effort, not tool access, buys first-try reliability in agentic code generation: an observational studycited by 2
- 2024T2 of Thoughts: Temperature Tree Elicits Reasoning in Large Language Modelscited by 1
- 2025Beyond Accuracy: Rethinking Hallucination and Regulatory Response in Generative AIcited by 1
- 2025Geo3DVQA: Evaluating Vision-Language Models for 3D Geospatial Reasoning from Aerial Imagerycited by 1
- 2026Reasoning effort, not tool access, buys first-try reliability in agentic code generation: an observational study2 Jul 2026
- 2025Geo3DVQA: Evaluating Vision-Language Models for 3D Geospatial Reasoning from Aerial Imagery8 Dec 2025
- 2025Beyond Accuracy: Rethinking Hallucination and Regulatory Response in Generative AI12 Sep 2025
- 2025AuPair: Golden Example Pairs for Code Repair12 Feb 2025
- 2024LogicVista: Multimodal LLM Logical Reasoning Benchmark in Visual Contexts6 Jul 2024
- 2024Easy Problems That LLMs Get Wrong30 May 2024
- 2024T2 of Thoughts: Temperature Tree Elicits Reasoning in Large Language Models23 May 2024
- 2024CodeMind: Evaluating Large Language Models for Code Reasoning15 Feb 2024
- 2024An Insight into Security Code Review with LLMs: Capabilities, Obstacles, and Influential Factors29 Jan 2024
- 2023(Why) Is My Prompt Getting Worse? Rethinking Regression Testing for Evolving LLM APIs18 Nov 2023
- 2025Give LLMs a Security Course: Securing Retrieval-Augmented Code Generation via Knowledge Injectioncited by 16
- 2025Exploring the Security Threats of Knowledge Base Poisoning in Retrieval-Augmented Code Generationcited by 9
- 2026MCERF: Advancing Multimodal LLM Evaluation of Engineering Documentation with Enhanced Retrievalcited by 2
- 2026MCERF: Advancing Multimodal LLM Evaluation of Engineering Documentation with Enhanced Retrieval31 Jan 2026
- 2025Give LLMs a Security Course: Securing Retrieval-Augmented Code Generation via Knowledge Injection23 Apr 2025
- 2025Exploring the Security Threats of Knowledge Base Poisoning in Retrieval-Augmented Code Generation5 Feb 2025
- 2024Query-Based Adversarial Prompt Generationcited by 62
- 2024Query-Based Adversarial Prompt Generation19 Feb 2024
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2024Non-Determinism of "Deterministic" LLM Settingscited by 92
- 2023Are You Sure? Challenging LLMs Leads to Performance Drops in The FlipFlop Experimentcited by 77
- 2024CogBench: a large language model walks into a psychology labcited by 63
- 2025Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inferencecited by 53
- 2024EDT: Improving Large Language Models' Generation by Entropy-based Dynamic Temperature Samplingcited by 45
- 2023Exploring the Sensitivity of LLMs' Decision-Making Capabilities: Insights from Prompt Variation and Hyperparameterscited by 32
- 2024What Should We Engineer in Prompts? Training Humans in Requirement-Driven LLM Usecited by 24
- 2025Hallucination Detection in Large Language Models with Metamorphic Relationscited by 24
- 2024CodeMirage: Hallucinations in Code Generated by Large Language Modelscited by 23
- 2023METAL: Metamorphic Testing Framework for Analyzing Large-Language Model Qualitiescited by 20
- 2025Don't Judge Code by Its Cover: Exploring Biases in LLM Judges for Code Evaluationcited by 18
12 most cited of 93 All 93 (JSON)
- 2026Twenty Days Later: A Pre-Registered Test of History-Based Forecasts of Brand Mentions in Gemini Answers14 Oct 2026
- 2026To Explore The Strange New World Beyond Data Distribution: System Behavior, Causality Tax, and Non-causal Base Model2 Oct 2026
- 2026When More Data Is Not Enough: The Context-Sufficiency Frontier in Generative AI Personalization30 Sep 2026
- 2026SafeLLM4SE: Statistical Evaluation and Reporting for LLM-based Software Engineering Systems29 Sep 2026
- 2026More Programs or More Rolls? Separating Coverage from Specialization in LLM Harnesses26 Sep 2026
- 2026ORCA: Evaluating LLMs on Data Science Code Translation25 Sep 2026
- 2026How Reproducible Are Evaluation Conclusions? A Self-Audit of LLM-Inferred Prompt Structure24 Sep 2026
- 2026T-GADE: Thermodynamical Generative-AI-Driven Evolution of LLM Artifacts10 Sep 2026
- 2026Clean Engineering, Unstable Measurement: A Preregistered Reliability Failure of Black-Box LLM Observers on Shared Endpoints3 Sep 2026
- 2026Specification Portability Across LLM Development Agents: Cross-Agent Compatibility in Specification-Driven Software Migration21 Aug 2026
- 2026A MARL Centered Reference Architecture for Large Language Model Augmentation in Smart Manufacturing7 Aug 2026
- 2026LangChoiceBench: Measuring and Explaining Programming-Language Choice in LLMs6 Aug 2026
12 newest of 93 All 93 (JSON)