mlsanityData to 7 Oct 2026

Analyzing Prompt Influence on Automated Method Generation: An Empirical Study with Copilot

arXiv 2402.08430 ↗First posted 13 Feb 2024cs.SE cs.AIcited by 6

Not on the map. Why?

Abstract (arXiv)

Generative AI is changing the way developers interact with software systems, providing services that can produce and deliver new content, crafted to satisfy the actual needs of developers. For instance, developers can ask for new code directly from within their IDEs by writing natural language prompts, and integrated services based on generative AI, such as Copilot, immediately respond to prompts by providing ready-to-use code snippets. Formulating the prompt appropriately, and incorporating the useful information while avoiding any information overload, can be an important factor in obtaining the right piece of code. The task of designing good prompts is known as prompt engineering. In this paper, we systematically investigate the influence of eight prompt features on the style and the content of prompts, on the level of correctness, complexity, size, and similarity to the developers' code of the generated code. We specifically consider the task of using Copilot with 124,800 prompts obtained by systematically combining the eight considered prompt features to generate the implementation of 200 Java methods. Results show how some prompt features, such as the presence of examples and the summary of the purpose of the method, can significantly influence the quality of the result.

Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Builds on 13 of its 28 references that are in the map. First posted on arXiv 13 Feb 2024.

Builds on

13 of 28 references.

References · 13

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2021Program Synthesis with Large Language Modelscited by 3,509
  3. 2022Competition-Level Code Generation with AlphaCodecited by 1,427
  4. 2019PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarizationcited by 1,100
  5. 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
  6. 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 599
  7. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
  8. 2021Design Guidelines for Prompt Engineering Text-to-Image Generative Modelscited by 216
  9. 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 216
  10. 2022Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Languagecited by 81
  11. 2023On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilotcited by 64
  12. 2022CCTEST: Testing and Repairing Code Completion Systemscited by 35
1 more
  1. 2023Prompts Matter: Insights and Strategies for Prompt Engineering in Automated Software Traceabilitycited by 15

Built on by

Cited by year (2026 to 7 Oct)

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

6 papers.