mlsanityData to 7 Oct 2026

Can Developers Prompt? A Controlled Experiment for Code Documentation Generation

arXiv 2408.00686 ↗First posted 1 Aug 2024cs.AI cs.HC cs.SEcited by 7

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  3. 2023Sparks of Artificial General Intelligence: Early experiments with GPT-4cited by 2,579
  4. 2021Pre-train, Prompt, and Predict: A Systematic Survey of Prompting Methods in Natural Language Processingcited by 2,222
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  6. 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 612
  7. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
  8. 2023Using an LLM to Help With Code Understandingcited by 222
  9. 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
  10. 2023Active Prompting with Chain-of-Thought for Large Language Modelscited by 154
  11. 2021Cutting Down on Prompts and Parameters: Simple Few-Shot Learning with Language Modelscited by 139
  12. 2022Few-shot training LLMs for project-specific code-summarizationcited by 128
18 more
  1. 2018Improving Automatic Source Code Summarization via Deep Reinforcement Learningcited by 99
  2. 2020Improved Code Summarization via a Graph Neural Networkcited by 79
  3. 2023A Large-Scale Survey on the Usability of AI Programming Assistants: Successes and Challengescited by 75
  4. 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
  5. 2023Is ChatGPT the Ultimate Programming Assistant -- How far is it?cited by 72
  6. 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 71
  7. 2023Prompting AI Art: An Investigation into the Creative Skill of Prompt Engineeringcited by 40
  8. 2023Automatic Code Summarization via ChatGPT: How Far Are We?cited by 34
  9. 2021Code Structure Guided Transformer for Source Code Summarizationcited by 29
  10. 2022M2TS: Multi-Scale Multi-Modal Approach Based on Transformer for Source Code Summarizationcited by 14
  11. 2020TranS^3: A Transformer-based Framework for Unifying Code Summarization and Code Searchcited by 11
  12. 2018A Simple NLP-based Approach to Support Onboarding and Retention in Open Source Communitiescited by 6
  13. 2022A Decade of Code Comment Quality Assessment: A Systematic Literature Reviewcited by 5
  14. 2023Demystifying Practices, Challenges and Expected Features of Using GitHub Copilotcited by 5
  15. 2023The role of interface design on prompt-mediated creativity in Generative AIcited by 3
  16. 2022An Exploratory Study of Documentation Strategies for Product Features in Popular GitHub Projectscited by 2
  17. 2019On Using Machine Learning to Identify Knowledge in API Reference Documentationcited by 1
  18. 2023From RSSE to BotSE: Potentials and Challenges Revisited after 15 Yearscited by 1

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 5; 2026: 2.

7 papers.