Analyzing Prompt Influence on Automated Method Generation: An Empirical Study with Copilot
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
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2022Competition-Level Code Generation with AlphaCodecited by 1,427
- 2019PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarizationcited by 1,100
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2021Prompt Programming for Large Language Models: Beyond the Few-Shot Paradigmcited by 599
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
- 2021Design Guidelines for Prompt Engineering Text-to-Image Generative Modelscited by 216
- 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 216
- 2022Conversing with Copilot: Exploring Prompt Engineering for Solving CS1 Problems Using Natural Languagecited by 81
- 2023On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilotcited by 64
- 2022CCTEST: Testing and Repairing Code Completion Systemscited by 35
Built on by
Citing papers per year: 2024: 1; 2025: 2; 2026: 3.
6 papers.
- 2024The Impact of Prompt Programming on Function-Level Code Generationcited by 13
- 2025Human-AI Experience in Integrated Development Environments: A Systematic Literature Reviewcited by 5
- 2025Do Prompt Patterns Affect Code Quality? A First Empirical Assessment of ChatGPT-Generated Codecited by 4
- 2026Scaffold, Not Vocabulary? A Controlled, Two-Tier, Pre-Registered Study of a Popperian Code-Generation Skillcited by 2
- 2026Do Influence Tactics Matter? Investigating Prompt Framing Effects in LLM Code Generationcited 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
- 2026Do Influence Tactics Matter? Investigating Prompt Framing Effects in LLM Code Generation11 Aug 2026
- 2026Scaffold, Not Vocabulary? A Controlled, Two-Tier, Pre-Registered Study of a Popperian Code-Generation Skill4 Jun 2026
- 2025Do Prompt Patterns Affect Code Quality? A First Empirical Assessment of ChatGPT-Generated Code18 Apr 2025
- 2025Human-AI Experience in Integrated Development Environments: A Systematic Literature Review8 Mar 2025
- 2024The Impact of Prompt Programming on Function-Level Code Generation29 Dec 2024