English

Testing the Effect of Code Documentation on Large Language Model Code Understanding

Software Engineering 2024-04-05 v1 Artificial Intelligence Computation and Language

Abstract

Large Language Models (LLMs) have demonstrated impressive abilities in recent years with regards to code generation and understanding. However, little work has investigated how documentation and other code properties affect an LLM's ability to understand and generate code or documentation. We present an empirical analysis of how underlying properties of code or documentation can affect an LLM's capabilities. We show that providing an LLM with "incorrect" documentation can greatly hinder code understanding, while incomplete or missing documentation does not seem to significantly affect an LLM's ability to understand code.

Keywords

Cite

@article{arxiv.2404.03114,
  title  = {Testing the Effect of Code Documentation on Large Language Model Code Understanding},
  author = {William Macke and Michael Doyle},
  journal= {arXiv preprint arXiv:2404.03114},
  year   = {2024}
}

Comments

7 pages, 5 figures, 2 tables. Accepted as a Findings paper in the "Generation" track to NAACL 2024. MITRE Public Release Case Number 23-4132

R2 v1 2026-06-28T15:43:36.104Z