Can Developers Prompt? A Controlled Experiment for Code Documentation Generation
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) bear great potential for automating tedious development tasks such as creating and maintaining code documentation. However, it is unclear to what extent developers can effectively prompt LLMs to create concise and useful documentation. We report on a controlled experiment with 20 professionals and 30 computer science students tasked with code documentation generation for two Python functions. The experimental group freely entered ad-hoc prompts in a ChatGPT-like extension of Visual Studio Code, while the control group executed a predefined few-shot prompt. Our results reveal that professionals and students were unaware of or unable to apply prompt engineering techniques. Especially students perceived the documentation produced from ad-hoc prompts as significantly less readable, less concise, and less helpful than documentation from prepared prompts. Some professionals produced higher quality documentation by just including the keyword Docstring in their ad-hoc prompts. While students desired more support in formulating prompts, professionals appreciated the flexibility of ad-hoc prompting. Participants in both groups rarely assessed the output as perfect. Instead, they understood the tools as support to iteratively refine the documentation. Further research is needed to understand which prompting skills and preferences developers have and which support they need for certain tasks.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 30 of its 69 references that are in the map. First posted on arXiv 1 Aug 2024.
Builds on
30 of 69 references.
References · 30
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
- 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 612
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2023Using an LLM to Help With Code Understandingcited by 222
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2023Active Prompting with Chain-of-Thought for Large Language Modelscited by 154
- 2021Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Modelscited by 139
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
18 more
- 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 99
- 2020Improved Code Summarization via a Graph Neural Networkcited by 79
- 2023A Large-Scale Survey on the Usability of AI Programming Assistants: Successes and Challengescited by 75
- 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
- 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 72
- 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 71
- 2023Prompting AI Art: An Investigation into the Creative Skill of Prompt Engineeringcited by 40
- 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
- 2021Code Structure Guided Transformer for Source Code Summarizationcited by 29
- 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14
- 2020TranS^3: A Transformer-based Framework for Unifying Code Summarization and Code Searchcited by 11
- 2018A Simple NLP-based Approach to Support Onboarding and Retention in Open Source Communitiescited by 6
- 2022A Decade of Code Comment Quality Assessment: A Systematic Literature Reviewcited by 5
- 2023Demystifying Practices, Challenges and Expected Features of Using GitHub Copilotcited by 5
- 2023The role of interface design on prompt-mediated creativity in Generative AIcited by 3
- 2022An Exploratory Study of Documentation Strategies for Product Features in Popular GitHub Projectscited by 2
- 2019On Using Machine Learning to Identify Knowledge in API Reference Documentationcited by 1
- 2023From RSSE to BotSE: Potentials and Challenges Revisited after 15 Yearscited by 1
Built on by
Citing papers per year: 2025: 5; 2026: 2.
7 papers.
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Codingcited by 21
- 2025How Do Programming Students Use Generative AI?cited by 9
- 2025Human-AI Experience in Integrated Development Environments: A Systematic Literature Reviewcited by 5
- 2025Understanding and supporting how developers prompt for LLM-powered code editing in practicecited by 1
- 2025Expanding ML-Documentation Standards For Better Securitycited by 0
- 2026Prompt-Driven Code Summarization: A Systematic Literature Reviewcited by 0
- 2026From Overload to Insights: How AI Agents Can Support Scientists in Analyzing Complex Datacited by 0
- 2026From Overload to Insights: How AI Agents Can Support Scientists in Analyzing Complex Data18 Jul 2026
- 2026Prompt-Driven Code Summarization: A Systematic Literature Review16 Apr 2026
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Coding17 Nov 2025
- 2025Expanding ML-Documentation Standards For Better Security16 Jul 2025
- 2025Understanding and supporting how developers prompt for LLM-powered code editing in practice28 Apr 2025
- 2025Human-AI Experience in Integrated Development Environments: A Systematic Literature Review8 Mar 2025
- 2025How Do Programming Students Use Generative AI?17 Jan 2025