articleFeb 6, 2024Closed access

Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learning

National University of Defense Technology · Peking University

Indexed incrossref

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

124
total citations
FWCI
88.34
Percentile
100%
References
47
Citations per year

Authors

8

Topics & keywords

Keywords
  • Snippet
  • Computer science
  • Natural language
  • Artificial intelligence
  • Context (archaeology)
  • Code (set theory)
  • Natural language processing
  • Data science
UN Sustainable Development Goals
  • Quality Education
No related works found for this paper.

Funding