arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2209.02235cs.SE
收藏

使用GPT-3自动生成代码文档

Automatic Code Documentation Generation Using GPT-3

Junaed Younus Khan, Gias Uddin

摘要:

源代码文档是高效软件开发的重要工件。代码文档可以大大受益于自动化,因为手动文档通常是劳动,资源和时间密集型的。在本文中,我们使用Codex来自动创建代码文档。Codex是一个基于GPT-3的模型,在自然语言和程序设计语言上进行了预训练。我们发现,即使在一次性学习(即,仅提供一个用于训练的示例)。Codex在六种不同的程序设计语言上获得了20.6的BLEU总分(比早期的最先进技术提高了11.2%)。因此,Codex显示了前景,并保证了未来对自动代码文档生成的深入研究,以支持各种开发任务。

英文摘要:

Source code documentation is an important artifact for efficient software development. Code documentation could greatly benefit from automation since manual documentation is often labouring, resource and time-intensive. In this paper, we employed Codex for automatic code documentation creation. Codex is a GPT-3 based model pre-trained on both natural and programming languages. We find that Codex outperforms existing techniques even with basic settings like one-shot learning (i.e., providing only one example for training). Codex achieves an overall BLEU score of 20.6 for six different programming languages (11.2% improvement over earlier state-of-the-art techniques). Thus, Codex shows promise and warrants in-depth future studies for automatic code documentation generation to support diverse development tasks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑