mlsanityData to 14 Oct 2026

Prompting and Fine-tuning Large Language Models for Automated Code Review Comment Generation

arXiv 2411.10129 ↗First posted 15 Nov 2024cs.SE cs.CL cs.LGcited by 7

Not on the map. Why?

Abstract (arXiv)

Generating accurate code review comments remains a significant challenge due to the inherently diverse and non-unique nature of the task output. Large language models pretrained on both programming and natural language data tend to perform well in code-oriented tasks. However, large-scale pretraining is not always feasible due to its environmental impact and project-specific generalizability issues. In this work, first we fine-tune open-source Large language models (LLM) in parameter-efficient, quantized low-rank (QLoRA) fashion on consumer-grade hardware to improve review comment generation. Recent studies demonstrate the efficacy of augmenting semantic metadata information into prompts to boost performance in other code-related tasks. To explore this in code review activities, we also prompt proprietary, closed-source LLMs augmenting the input code patch with function call graphs and code summaries. Both of our strategies improve the review comment generation performance, with function call graph augmented few-shot prompting on the GPT-3.5 model surpassing the pretrained baseline by around 90% BLEU-4 score on the CodeReviewer dataset. Moreover, few-shot prompted Gemini-1.0 Pro, QLoRA fine-tuned Code Llama and Llama 3.1 models achieve competitive results (ranging from 25% to 83% performance improvement) on this task. An additional human evaluation study further validates our experimental findings, reflecting real-world developers' perceptions of LLM-generated code review comments based on relevant qualitative metrics.

Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 43 of its 71 references that are in the map. First posted on arXiv 15 Nov 2024.

Builds on

43 of 71 references.

References · 43

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  2. 2020Language Models are Few-Shot Learnerscited by 32,419
  3. 2023GPT-4 Technical Reportcited by 18,396
  4. 2022Training language models to follow instructions with human feedbackcited by 15,971
  5. 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,599
  6. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,380
  7. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  8. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  9. 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,893
  10. 2019BERTScore: Evaluating Text Generation with BERTcited by 5,512
  11. 2021Prefix-Tuning: Optimizing Continuous Prompts for Generationcited by 3,915
  12. 2021The Power of Scale for Parameter-Efficient Prompt Tuningcited by 3,795
31 more
  1. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
  2. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
  3. 2022Self-Instruct: Aligning Language Models with Self-Generated Instructionscited by 2,724
  4. 2023Code Llama: Open Foundation Models for Codecited by 2,139
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  6. 2021What Makes Good In-Context Examples for GPT-3?cited by 1,195
  7. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  8. 2023StarCoder: may the source be with you!cited by 799
  9. 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
  10. 2023A Prompt Pattern Catalog to Enhance Prompt Engineering with ChatGPTcited by 619
  11. 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 609
  12. 2021Unified Pre-training for Program Understanding and Generationcited by 366
  13. 2023Magicoder: Empowering Code Generation with OSS-Instructcited by 256
  14. 2023Large Language Models Understand and Can be Enhanced by Emotional Stimulicited by 146
  15. 2022Few-shot training LLMs for project-specific code-summarizationcited by 129
  16. 2023The CoT Collection: Improving Zero-shot and Few-shot Learning of Language Models via Chain-of-Thought Fine-Tuningcited by 108
  17. 2022Automating Code Review Activities by Large-Scale Pre-trainingcited by 98
  18. 2023Automatic Semantic Augmentation of Language Model Prompts (for Code Summarization)cited by 72
  19. 2023Large Language Models are Few-Shot Summarizers: Multi-Intent Comment Generation via In-Context Learningcited by 72
  20. 2023A Survey of Large Language Models for Code: Evolution, Benchmarking, and Future Trendscited by 66
  21. 2022Using Pre-Trained Models to Boost Code Review Automationcited by 63
  22. 2021Towards Automating Code Review Activitiescited by 54
  23. 2023Principled Instructions Are All You Need for Questioning LLaMA-1/2, GPT-3.5/4cited by 48
  24. 2023What Makes Good In-context Demonstrations for Code Intelligence Tasks with LLMs?cited by 47
  25. 2023LLaMA-Reviewer: Advancing Code Review Automation with Large Language Models through Parameter-Efficient Fine-Tuningcited by 47
  26. 2023Exploring the Potential of ChatGPT in Automated Code Refinement: An Empirical Studycited by 44
  27. 2023Prompting Is All You Need: Automated Android Bug Replay with Large Language Modelscited by 40
  28. 2022Automatic Code Documentation Generation Using GPT-3cited by 37
  29. 2022AUGER: Automatically Generating Review Comments with Pre-training Modelscited by 23
  30. 2019CORE: Automating Review Recommendation for Code Changescited by 14
  31. 2022Modeling Review History for Reviewer Recommendation:A Hypergraph Approachcited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 3; 2026: 4.

7 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025LAURA: Enhancing Code Review Generation with Context-Enriched Retrieval-Augmented LLM
  2. 2025CodeReviewQA: The Code Review Comprehension Assessment for Large Language Models
  3. 2025Leveraging Reward Models for Guiding Code Review Comment Generation
  4. 2025Fine-Tuning Multilingual Language Models for Code Review: An Empirical Study on Industrial C# Projects
  5. 2024Distilling Desired Comments for Enhanced Code Review with Large Language Models
  6. 2026Rethinking Training Data for Generating Code Review Comments
  7. 2025Retrieval-Augmented Code Review Comment Generation
  8. 2024Comments as Natural Logic Pivots: Improve Code Generation via Comment Perspective