Using GPT-4 for Source Code Documentation

Activity: Talk or presentationPoster presentationscience-to-science

Description

Writing good software documentation imposes significant effort. Large Language Models (LLMs) could potentially streamline that process, though. So, the question arises whether current LLMs are able to generate valid code documentation for classes and methods on basis of the bare code. According to literature, various such models have the capability to generate documentation that is on par with or even superior to reference documentation. In our experimental study using zero-shot prompting, we found that the model GPT-4 by OpenAI leads to poor results when measuring similarity to the reference documentation on class level. Thus, GPT-4 is not yet usable for generating class documentation. On method level, however, the model achieved higher similarity ratings and can be considered applicable for the use case.
Period28 Aug 2024
Event title50th Euromicro Conference Series on Software Engineering and Advanced Applications (SEAA), Paris, France, August 28-30, 2024
Event typeConference
LocationFranceShow on map

Fields of science

  • 102006 Computer supported cooperative work (CSCW)
  • 102016 IT security
  • 102027 Web engineering
  • 502050 Business informatics
  • 102040 Quantum computing 
  • 102020 Medical informatics
  • 502032 Quality management
  • 503015 Subject didactics of technical sciences
  • 102022 Software development
  • 102034 Cyber-physical systems
  • 102015 Information systems
  • 509026 Digitalisation research

JKU Focus areas

  • Digital Transformation