Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learning
National University of Defense Technology · Peking University
Abstract
Code comment generation aims at generating natural language descriptions for a code snippet to facilitate developers' program comprehension activities. Despite being studied for a long time, a bottleneck for existing approaches is that given a code snippet, they can only generate one comment while developers usually need to know information from diverse perspectives such as what is the functionality of this code snippet and how to use it. To tackle this limitation, this study empirically investigates the feasibility of utilizing large language models (LLMs) to generate comments that can fulfill developers' diverse intents. Our intuition is based on the facts that (1) the code and its pairwise comment are used…
Citation impact
- FWCI
- 88.34
- Percentile
- 100%
- References
- 47
Authors
8Topics & keywords
- Snippet
- Computer science
- Natural language
- Artificial intelligence
- Context (archaeology)
- Code (set theory)
- Natural language processing
- Data science
- Quality Education