mlsanityData to 7 Oct 2026

Improving ChatGPT Prompt for Code Generation

arXiv 2305.08360 ↗First posted 15 May 2023cs.SEcited by 28

Not on the map. Why?

Abstract (arXiv)

Automated code generation can be a powerful technique for software development, significantly reducing developers' efforts and time required to create new code by generating it automatically based on requirements. Recently, OpenAI's language model ChatGPT has emerged as a powerful tool for generating human-like responses to a wide range of textual inputs (i.e., prompts), including those related to code generation. However, the effectiveness of ChatGPT for code generation is not well understood, and the generation performance could be heavily influenced by the choice of prompt. To answer these questions, we conducted experiments using the CodeXGlue dataset to evaluate ChatGPT's capabilities for two code generation tasks, including text-to-code and code-to-code generation. We designed prompts by leveraging the chain-of-thought strategy with multi-step optimizations. Our results showed that by carefully designing prompts to guide ChatGPT, the generation performance can be improved substantially. We also analyzed the factors that influenced the prompt design and provided insights that could guide future research.

Key facts. Cited by 28 papers in the map (data through 7 Oct 2026). First posted on arXiv 15 May 2023.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 12; 2024: 12; 2025: 1; 2026: 3.

28 papers.

Sort:

By area:

  1. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
  2. 2023Large Language Models are Complex Table Parserscited by 28
  3. 2023LLM-Assisted Code Cleaning For Training Accurate Code Generatorscited by 27
  4. 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
  5. 2023AI-assisted Code Authoring at Scale: Fine-tuning, deploying, and mixed methods evaluationcited by 20
  6. 2024UniCoder: Scaling Code Large Language Model via Universal Codecited by 18
  7. 2024OMPGPT: A Generative Pre-trained Transformer Model for OpenMPcited by 16
  8. 2023Supersonic: Learning to Generate Source Code Optimizations in C/C++cited by 15
  9. 2023Benchmarking Causal Study to Interpret Large Language Models for Source Codecited by 14
  10. 2024A Comparative Study of DSL Code Generation: Fine-Tuning vs. Optimized Retrieval Augmentationcited by 8
  11. 2023FlakyFix: Using Large Language Models for Predicting Flaky Test Fix Categories and Test Code Repaircited by 6
  12. 2023Coding by Design: GPT-4 empowers Agile Model Driven Developmentcited by 6
16 more
  1. 2024SGSH: Stimulate Large Language Models with Skeleton Heuristics for Knowledge Base Question Generationcited by 6
  2. 2024Instruct or Interact? Exploring and Eliciting LLMs' Capability in Code Snippet Adaptation Through Prompt Engineeringcited by 6
  3. 2023Exploring the Limits of ChatGPT in Software Security Applicationscited by 5
  4. 2024A Survey on Neural Question Generation: Methods, Applications, and Prospectscited by 5
  5. 2024Research and application of artificial intelligence based webshell detection model: A literature reviewcited by 4
  6. 2024SmartLLMSentry: A Comprehensive LLM Based Smart Contract Vulnerability Detection Frameworkcited by 3
  7. 2023Assessing the Promise and Pitfalls of ChatGPT for Automated Code Generationcited by 2
  8. 2024Large Language Models are Few-shot Generators: Proposing Hybrid Prompt Algorithm To Generate Webshell Escape Samplescited by 2
  9. 2023Exploring Large Language Models in Resolving Environment-Related Crash Bugs: Localizing and Repairingcited by 1
  10. 2024Plan with Code: Comparing approaches for robust NL to DSL generationcited by 1
  11. 2024LLM as a code generator in Agile Model Driven Developmentcited by 1
  12. 2025SnipGen: A Mining Repository Framework for Evaluating LLMs for Codecited by 1
  13. 2024Task-oriented Prompt Enhancement via Script Generationcited by 0
  14. 2026Towards Comprehensive Benchmarking Infrastructure for LLMs In Software Engineeringcited by 0
  15. 2026Large Language Models for Code Generation from Multilingual Prompts: A Curated Benchmark and a Study on Code Qualitycited by 0
  16. 2026Do Influence Tactics Matter? Investigating Prompt Framing Effects in LLM Code Generationcited by 0

Similar, not cited

Close in wording, no citation either way

  1. 2024Evaluating ChatGPT-3.5 Efficiency in Solving Coding Problems of Different Complexity Levels: An Empirical Analysis
  2. 2025Do Prompt Patterns Affect Code Quality? A First Empirical Assessment of ChatGPT-Generated Code
  3. 2023ChatGPT is a Remarkable Tool -- For Experts
  4. 2024The Impact of Prompt Programming on Function-Level Code Generation
  5. 2023A Systematic Study and Comprehensive Evaluation of ChatGPT on Benchmark Datasets
  6. 2023Self-collaboration Code Generation via ChatGPT
  7. 2025A Showdown of ChatGPT vs DeepSeek in Solving Programming Tasks
  8. 2023ChatGPT for Robotics: Design Principles and Model Abilities