paper-with-me

Papers

Can Developers Prompt? A Controlled Experiment for Code Documentation Generation

2024-08-01

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.

📄 PDF Abstract BibTeX arXiv:2408.00686

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Revolutionizing API Documentation through Summarization

2024-01-21 · AmirHossein Naghshzan, Sylvie Ratte

This study tackles the challenges associated with interpreting Application Programming Interface (API) documentation, an integral aspect of software development. Official API documentation, while essential, can be length…

Extractive SummarizationNavigate

Precision in Practice: Knowledge Guided Code Summarizing Grounded in Industrial Expectations

2026-02-03 · Jintai Li, Songqiang Chen, Shuo Jin, Xiaoyuan Xie arxiv

Code summaries are essential for helping developers understand code functionality and reducing maintenance and collaboration costs. Although recent advances in large language models (LLMs) have significantly improved aut…

Semantic Similarity

Towards Code Summarization of APIs Based on Unofficial Documentation Using NLP Techniques

2022-08-12 · AmirHossein Naghshzan

Each programming language comes with official documentation to guide developers with APIs, methods, and classes. However, in some cases, official documentation is not an efficient way to get the needed information. As a …

Code Summarization

ASSERTIFY: Utilizing Large Language Models to Generate Assertions for Production Code

2024-11-25 · Mohammad Jalili Torkamani, Abhinav Sharma, Nikita Mehrotra, Rahul Purandare

Production assertions are statements embedded in the code to help developers validate their assumptions about the code. They assist developers in debugging, provide valuable documentation, and enhance code comprehension.…

Few-Shot LearningPrompt Engineering

Prompt-Driven Code Summarization: A Systematic Literature Review

2026-04-16 · Afia Farjana, Zaiyu Cheng, Antonio Mastropaolo arxiv

Software documentation is essential for program comprehension, developer onboarding, code review, and long-term maintenance. Yet producing quality documentation manually is time-consuming and frequently yields incomplete…

Prompt EngineeringZero-Shot Learning