mlsanityData to 7 Oct 2026

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

arXiv 2304.11384 ↗First posted 22 Apr 2023cs.SEcited by 71

Not on the map. Why?

Abstract (arXiv)

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 during the pre-training process of LLMs to build the semantic connection between the natural language and programming language, and (2) comments in the real-world projects, which are collected for the pre-training, usually contain different developers' intents. We thus postulate that the LLMs can already understand the code from different perspectives after the pre-training. Indeed, experiments on two large-scale datasets demonstrate the rationale of our insights: by adopting the in-context learning paradigm and giving adequate prompts to the LLM (e.g., providing it with ten or more examples), the LLM can significantly outperform a state-of-the-art supervised learning approach on generating comments with multiple intents. Results also show that customized strategies for constructing the prompts and post-processing strategies for reranking the results can both boost the LLM's performances, which shed light on future research directions for using LLMs to achieve comment generation.

Key facts. Cited by 71 papers in the map (data through 7 Oct 2026). First posted on arXiv 22 Apr 2023.

Builds on

No reference list yet.

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 8; 2024: 32; 2025: 23; 2026: 8.

71 papers.

Sort:

By area:

  1. 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
  2. 2024AI Agents Under Threat: A Survey of Key Security Challenges and Future Pathwayscited by 122
  3. 2024EvoCodeBench: An Evolving Code Generation Benchmark Aligned with Real-World Code Repositoriescited by 71
  4. 2024MarsCode Agent: AI-native Automated Bug Fixingcited by 68
  5. 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
  6. 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
  7. 2025LLM-based Agents Suffer from Hallucinations: A Survey of Taxonomy, Methods, and Directionscited by 49
  8. 2023Look Before You Leap: An Exploratory Study of Uncertainty Measurement for Large Language Modelscited by 40
  9. 2025SWE-QA: Can Language Models Answer Repository-level Code Questions?cited by 37
  10. 2024Source Code Summarization in the Era of Large Language Modelscited by 30
  11. 2023Exploring Parameter-Efficient Fine-Tuning Techniques for Code Generation with Large Language Modelscited by 28
  12. 2023A Comparative Analysis of Large Language Models for Code Documentation Generationcited by 24
38 more
  1. 2024The Future of AI-Driven Software Engineeringcited by 23
  2. 2024An Empirical Study on LLM-based Agents for Automated Bug Fixingcited by 23
  3. 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
  4. 2024A Pair Programming Framework for Code Generation via Multi-Plan Exploration and Feedback-Driven Refinementcited by 21
  5. 2024NLPerturbator: Studying the Robustness of Code LLMs to Natural Language Variationscited by 19
  6. 2024Comparison of Static Application Security Testing Tools and Large Language Models for Repo-level Vulnerability Detectioncited by 18
  7. 2024Evaluating Software Development Agents: Patch Patterns, Code Quality, and Issue Complexity in Real-World GitHub Scenarioscited by 16
  8. 2025Large Language Models (LLMs) for Source Code Analysis: applications, models and datasetscited by 15
  9. 2024Calibration of Large Language Models on Code Summarizationcited by 12
  10. 2025Reflections on the Reproducibility of Commercial LLM Performance in Empirical Software Engineering Studiescited by 12
  11. 2024KADEL: Knowledge-Aware Denoising Learning for Commit Message Generationcited by 10
  12. 2024RAMBO: Enhancing RAG-based Repository-Level Method Body Completioncited by 10
  13. 2024Output Format Biases in the Evaluation of Large Language Models for Code Translationcited by 9
  14. 2024Natural Language Outlines for Code: Literate Programming in the LLM Eracited by 9
  15. 2024A Deep Dive Into Large Language Model Code Generation Mistakes: What and Why?cited by 9
  16. 2025Exploring the Security Threats of Knowledge Base Poisoning in Retrieval-Augmented Code Generationcited by 9
  17. 2024Model Editing for LLMs4Code: How Far are We?cited by 8
  18. 2024Can Developers Prompt? A Controlled Experiment for Code Documentation Generationcited by 7
  19. 2024Prompting and Fine-tuning Large Language Models for Automated Code Review Comment Generationcited by 7
  20. 2023Exploring Large Language Models for Code Explanationcited by 6
  21. 2024ESALE: Enhancing Code-Summary Alignment Learning for Source Code Summarizationcited by 6
  22. 2024Instruct or Interact? Exploring and Eliciting LLMs' Capability in Code Snippet Adaptation Through Prompt Engineeringcited by 6
  23. 2025Large Language Models are Qualified Benchmark Builders: Rebuilding Pre-Training Datasets for Advancing Code Intelligence Taskscited by 6
  24. 2023Semantic Similarity Loss for Neural Source Code Summarizationcited by 5
  25. 2025Generative AI for Self-Adaptive Systems: State of the Art and Research Roadmapcited by 5
  26. 2025Too Easily Fooled? Prompt Injection Breaks LLMs on Frustratingly Simple Multiple-Choice Questionscited by 4
  27. 2025LLM Agents for Automated Web Vulnerability Reproduction: Are We There Yet?cited by 4
  28. 2025Issue-Oriented Agent-Based Framework for Automated Review Comment Generationcited by 4
  29. 2023Language Models are Better Bug Detector Through Code-Pair Classificationcited by 3
  30. 2024Log Parsing using LLMs with Self-Generated In-Context Learning and Self-Correctioncited by 3
  31. 2025Leveraging Metamemory Agent for Enhanced Data-Free Code Generation in Large Language Modelscited by 3
  32. 2025Commenting Higher-level Code Unit: Full Code, Reduced Code, or Hierarchical Code Summarizationcited by 3
  33. 2026Atomizer: An LLM-based Collaborative Multi-Agent Framework for Intent-Driven Commit Untanglingcited by 3
  34. 2024MESIA: Understanding and Leveraging Supplementary Nature of Method-level Comments for Automatic Comment Generationcited by 2
  35. 2024Icing on the Cake: Automatic Code Summarization at Ericssoncited by 2
  36. 2024Exploring the Integration of Large Language Models in Industrial Test Maintenance Processescited by 2
  37. 2024Can the Rookies Cut the Tough Cookie? Exploring the Use of LLMs for SQL Equivalence Checkingcited by 2
  38. 2025Zero-Shot Cross-Domain Code Search without Fine-Tuningcited by 2

50 most cited of 71 All 71 (JSON)