An Empirical Study on Self-correcting Large Language Models for Data Science Code Generation
Not on the map. Why?
Abstract (arXiv)
Large Language Models (LLMs) have recently advanced many applications on software engineering tasks, particularly the potential for code generation. Among contemporary challenges, code generated by LLMs often suffers from inaccuracies and hallucinations, requiring external inputs to correct. One recent strategy to fix these issues is to refine the code generated from LLMs using the input from the model itself (self-augmented). In this work, we proposed a novel method, namely CoT-SelfEvolve. CoT-SelfEvolve iteratively and automatically refines code through a self-correcting process, guided by a chain of thought constructed from real-world programming problem feedback. Focusing on data science code, including Python libraries such as NumPy and Pandas, our evaluations on the DS-1000 dataset demonstrate that CoT-SelfEvolve significantly outperforms existing models in solving complex problems. The framework shows substantial improvements in both initial code generation and subsequent iterations, with the model's accuracy increasing significantly with each additional iteration. This highlights the effectiveness of using chain-of-thought prompting to address complexities revealed by program executor traceback error messages. We also discuss how CoT-SelfEvolve can be integrated into continuous software engineering environments, providing a practical solution for improving LLM-based code generation.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 33 of its 54 references that are in the map. First posted on arXiv 28 Aug 2024.
Builds on
33 of 54 references.
References · 33
- 2023GPT-4 Technical Reportcited by 18,132
- 2017Proximal Policy Optimization Algorithmscited by 14,441
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,072
- 2023Reflexion: Language Agents with Verbal Reinforcement Learningcited by 4,064
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,317
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
- 2022LaMDA: Language Models for Dialog Applicationscited by 1,218
- 2020BLEURT: Learning Robust Metrics for Text Generationcited by 1,196
- 2023Teaching Large Language Models to Self-Debugcited by 963
- 2021Measuring Coding Challenge Competence With APPScited by 879
21 more
- 2023DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelinescited by 803
- 2022DS-1000: A Natural and Reliable Benchmark for Data Science Code Generationcited by 442
- 2023How is ChatGPT's behavior changing over time?cited by 265
- 2023Pretraining Language Models with Human Preferencescited by 245
- 2022GitHub Copilot AI pair programmer: Asset or Liability?cited by 150
- 2023Chain of Hindsight Aligns Language Models with Feedbackcited by 147
- 2021SimCLS: A Simple Framework for Contrastive Learning of Abstractive Summarizationcited by 131
- 2023Keep the Conversation Going: Fixing 162 out of 337 bugs for 0.42 each using ChatGPTcited by 125
- 2015Minimum Risk Training for Neural Machine Translationcited by 114
- 2023InferFix: End-to-End Program Repair with LLMscited by 113
- 2023Improving Code Generation by Training with Natural Language Feedbackcited by 75
- 2023Self-Verification Improves Few-Shot Clinical Information Extractioncited by 52
- 2023Learning to Generate Better Than Your LLMcited by 49
- 2019Getafix: Learning to Fix Bugs Automaticallycited by 40
- 2024A Systematic Literature Review on Large Language Models for Automated Program Repaircited by 37
- 2024How Likely Do LLMs with CoT Mimic Human Reasoning?cited by 34
- 2023A Critical Review of Large Language Model on Software Engineering: An Example from ChatGPT and Automated Program Repaircited by 29
- 2020TextGAIL: Generative Adversarial Imitation Learning for Text Generationcited by 28
- 2019Deep Reinforcement Learning with Distributional Semantic Rewards for Abstractive Summarizationcited by 24
- 2021BERTTune: Fine-Tuning Neural Machine Translation with BERTScorecited by 18
- 2023Continually Improving Extractive QA via Human Feedbackcited by 11
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2023Self-planning Code Generation with Large Language Models
- 2025Prompt engineering and framework: implementation to increase code reliability based guideline for LLMs
- 2025SRLCG: Self-Rectified Large-Scale Code Generation with Multidimensional Chain-of-Thought and Dynamic Backtracking
- 2025Revisit Self-Debugging with Self-Generated Tests for Code Generation
- 2026CodeEval: A pedagogical approach for targeted evaluation of code-trained Large Language Models
- 2025CODESYNC: Synchronizing Large Language Models with Dynamic Code Evolution at Scale
- 2023Enhancing Large Language Models in Coding Through Multi-Perspective Self-Consistency
- 2025Are They All Good? Evaluating the Quality of CoTs in LLM-based Code Generation