Evaluating the Quality of Code Comments Generated by Large Language Models for Novice Programmers

Aysa Xuemo Fan, Arun Balajiee Lekshmi Narayanan, Mohammad Hassany, Jiaze Ke
9/22/2024
cs.SEcs.AIcs.HC

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Large Language Models (LLMs) show promise in generating code comments for novice programmers, but their educational effectiveness remains under-evaluated. This study assesses the instructional quality of code comments produced by GPT-4, GPT-3.5-Turbo, and Llama2, compared to expert-developed comments, focusing on their suitability for novices. Analyzing a dataset of ``easy'' level Java solutions from LeetCode, we find that GPT-4 exhibits comparable quality to expert comments in aspects critical for beginners, such as clarity, beginner-friendliness, concept elucidation, and step-by-step guidance. GPT-4 outperforms Llama2 in discussing complexity (chi-square = 11.40, p = 0.001) and is perceived as significantly more supportive for beginners than GPT-3.5 and Llama2 with Mann-Whitney U-statistics = 300.5 and 322.5, p = 0.0017 and 0.0003). This study highlights the potential of LLMs for generating code comments tailored to novice programmers.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{fan2024evaluating,
  title  = {Evaluating the Quality of Code Comments Generated by Large Language Models for Novice Programmers},
  author = {Aysa Xuemo Fan and Arun Balajiee Lekshmi Narayanan and Mohammad Hassany and Jiaze Ke},
  year   = {2024},
  eprint = {2409.14368},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.14368v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.14368.svg)](https://codeofpaper.com/paper/2409.14368)

Discussion