• Home
  • Search
  • Multi-Intent Inline Code Comment Generation via Large Language Model
  • Cite Icon3
  • https://doi.org/10.1142/s0218194024500050Copy DOI Icon

Multi-Intent Inline Code Comment Generation via Large Language Model

  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

Code comment generation typically refers to the process of generating concise natural language descriptions for a piece of code, which facilitates program comprehension activities. Inline code comments, as a part of code comments, are also crucial for program comprehension. Recently, the emergence of large language models (LLMs) has significantly boosted the performance of natural language processing tasks. This naturally inspires us to explore the performance of the LLMs in the task of inline code comment generation. To this end, we evaluate open-source LLMs on a large-scale dataset and compare the results with the current state-of-the-art methods. Specifically, we explore the model performance in the following scenarios based on the widely used evaluation metrics (i.e. BLEU, Meteor, and ROUGE-L): (1) generation with simple instruction; (2) few-shot-guided generation with random examples selected from the database; (3) few-shot-guided generation with similar examples selected from the database; and (4) adopt the re-ranking strategy for the output of LLMs. Our findings reveal that: (1) under the simple instruction scenario, LLMs could not fully show the potential in the task of inline comment generation compared to the state-of-the-art models; (2) random few-shot leads to a slight improvement; (3) similar few-shot and re-ranking strategy could significantly enhance the performance of LLMs; and (4) for inline comment and code snippet pairs with different intents, why category achieves the best performance and what category achieves relatively poorer performance. That remains consistent across all four scenarios. Our findings shed light on future research directions for using LLMs in inline comment generation tasks.

Similar Papers
  • Research Article
  • Citations51

Large language models for biomedicine: foundations, opportunities, challenges, and best practices.

  • Apr 24, 2024
  • Journal of the American Medical Informatics Association : JAMIA
  • Satya S Sahoo +8
  • Research Article

#2924 Comparison of large language models and traditional natural language processing techniques in predicting arteriovenous fistula failure

  • May 23, 2024
  • Nephrology Dialysis Transplantation
  • Suman Lama +6
  • Research Article

Evaluating gpt-4 for zero-shot classification of bleeding and clotting events: Can large language models serve as second reviewers?

  • Nov 03, 2025
  • Blood
  • Samantha Rizzo +5
  • Research Article
  • Citations13

On the role of the UMLS in supporting diagnosis generation proposed by Large Language Models

  • Aug 13, 2024
  • Journal of Biomedical Informatics
  • Majid Afshar +4
  • Research Article
  • Citations24

A dataset and benchmark for hospital course summarization with adapted large language models.

  • Dec 30, 2024
  • Journal of the American Medical Informatics Association : JAMIA
  • Asad Aali +11
  • Research Article
  • Citations19

A novel prompting method for few-shot NER via LLMs

  • Aug 24, 2024
  • Natural Language Processing Journal
  • Qi Cheng +5
  • Research Article
  • Citations45

Custom Large Language Models Improve Accuracy: Comparing Retrieval Augmented Generation and Artificial Intelligence Agents to Non-Custom Models for Evidence-Based Medicine

  • Nov 07, 2024
  • Arthroscopy: The Journal of Arthroscopic and Related Surgery
  • Joshua J Woo +7
  • Research Article
  • Citations1

Logical and Physical Optimizations for SQL Query Execution over Large Language Models

  • Jun 17, 2025
  • Proceedings of the ACM on Management of Data
  • Dario Satriani +5
  • Research Article

A Large-Scale Empirical Evaluation of LLMs for Automated Self-Admitted Technical Debt Repayment

  • Feb 10, 2026
  • ACM Transactions on Software Engineering and Methodology
  • Mohammad Sadegh Sheikhaei +3
  • Research Article
  • Citations20

DialogueLLM: Context and emotion knowledge-tuned large language models for emotion recognition in conversations.

  • Dec 01, 2025
  • Neural networks : the official journal of the International Neural Network Society
  • Yazhou Zhang +6
  • Research Article
  • Citations67

The life cycle of large language models in education: A framework for understanding sources of bias

  • Jul 12, 2024
  • British Journal of Educational Technology
  • Jinsook Lee +4
  • Research Article

Can LLMs effectively provide game-theoretic-based scenarios for cybersecurity?

  • Dec 11, 2025
  • Frontiers in Computer Science
  • Daniele Proverbio +5
  • Research Article

Quality of Answers of Generative Large Language Models vs Peer Patients for Interpreting Lab Test Results for Lay Patients: Evaluation Study

  • Jan 23, 2024
  • ArXiv
  • Zhe He +8
  • Research Article

Evaluating large language models for clinical note processing: local fine-tuning and internal-external validation using electronic health records from South Asia.

  • Feb 25, 2026
  • BMC medical informatics and decision making
  • Seyed Alireza Hasheminasab +18
  • Conference Article
  • Citations2

AAVENUE: Detecting LLM Biases on NLU Tasks in AAVE via a Novel Benchmark

  • Jan 01, 2024
  • Abhay Gupta +3
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.