Saved in:
Bibliographic Details
Main Authors: Dvivedi, Shubhang Shekhar, Vijay, Vyshnav, Pujari, Sai Leela Rahul, Lodh, Shoumik, Kumar, Dhruv
Format: Preprint
Published: 2023
Subjects:
Online Access:https://arxiv.org/abs/2312.10349
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866913332626194432
author Dvivedi, Shubhang Shekhar
Vijay, Vyshnav
Pujari, Sai Leela Rahul
Lodh, Shoumik
Kumar, Dhruv
author_facet Dvivedi, Shubhang Shekhar
Vijay, Vyshnav
Pujari, Sai Leela Rahul
Lodh, Shoumik
Kumar, Dhruv
contents This paper presents a comprehensive comparative analysis of Large Language Models (LLMs) for generation of code documentation. Code documentation is an essential part of the software writing process. The paper evaluates models such as GPT-3.5, GPT-4, Bard, Llama2, and Starchat on various parameters like Accuracy, Completeness, Relevance, Understandability, Readability and Time Taken for different levels of code documentation. Our evaluation employs a checklist-based system to minimize subjectivity, providing a more objective assessment. We find that, barring Starchat, all LLMs consistently outperform the original documentation. Notably, closed-source models GPT-3.5, GPT-4, and Bard exhibit superior performance across various parameters compared to open-source/source-available LLMs, namely LLama 2 and StarChat. Considering the time taken for generation, GPT-4 demonstrated the longest duration, followed by Llama2, Bard, with ChatGPT and Starchat having comparable generation times. Additionally, file level documentation had a considerably worse performance across all parameters (except for time taken) as compared to inline and function level documentation.
format Preprint
id arxiv_https___arxiv_org_abs_2312_10349
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle A Comparative Analysis of Large Language Models for Code Documentation Generation
Dvivedi, Shubhang Shekhar
Vijay, Vyshnav
Pujari, Sai Leela Rahul
Lodh, Shoumik
Kumar, Dhruv
Software Engineering
Artificial Intelligence
This paper presents a comprehensive comparative analysis of Large Language Models (LLMs) for generation of code documentation. Code documentation is an essential part of the software writing process. The paper evaluates models such as GPT-3.5, GPT-4, Bard, Llama2, and Starchat on various parameters like Accuracy, Completeness, Relevance, Understandability, Readability and Time Taken for different levels of code documentation. Our evaluation employs a checklist-based system to minimize subjectivity, providing a more objective assessment. We find that, barring Starchat, all LLMs consistently outperform the original documentation. Notably, closed-source models GPT-3.5, GPT-4, and Bard exhibit superior performance across various parameters compared to open-source/source-available LLMs, namely LLama 2 and StarChat. Considering the time taken for generation, GPT-4 demonstrated the longest duration, followed by Llama2, Bard, with ChatGPT and Starchat having comparable generation times. Additionally, file level documentation had a considerably worse performance across all parameters (except for time taken) as compared to inline and function level documentation.
title A Comparative Analysis of Large Language Models for Code Documentation Generation
topic Software Engineering
Artificial Intelligence
url https://arxiv.org/abs/2312.10349