Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
119 tokens/sec
GPT-4o
56 tokens/sec
Gemini 2.5 Pro Pro
43 tokens/sec
o3 Pro
6 tokens/sec
GPT-4.1 Pro
47 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

The Behavior of Large Language Models When Prompted to Generate Code Explanations (2311.01490v2)

Published 2 Nov 2023 in cs.SE and cs.AI

Abstract: This paper systematically investigates the generation of code explanations by LLMs for code examples commonly encountered in introductory programming courses. Our findings reveal significant variations in the nature of code explanations produced by LLMs, influenced by factors such as the wording of the prompt, the specific code examples under consideration, the programming language involved, the temperature parameter, and the version of the LLM. However, a consistent pattern emerges for Java and Python, where explanations exhibit a Flesch-Kincaid readability level of approximately 7-8 grade and a consistent lexical density, indicating the proportion of meaningful words relative to the total explanation size. Additionally, the generated explanations consistently achieve high scores for correctness, but lower scores on three other metrics: completeness, conciseness, and specificity.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (4)
  1. Priti Oli (6 papers)
  2. Rabin Banjade (6 papers)
  3. Jeevan Chapagain (4 papers)
  4. Vasile Rus (6 papers)
Citations (2)

Summary

We haven't generated a summary for this paper yet.