arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2108.11601cs.SEcs.CL
收藏

检索增强代码生成和摘要

Retrieval Augmented Code Generation and Summarization

University of California, Los Angeles(加利福尼亚大学洛杉矶分校);Columbia University(哥伦比亚大学)

Md Rizwan Parvez, Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, Kai-Wei Chang

摘要:

软件开发人员在软件开发过程中编写了大量的源代码和文档。本质上,开发人员经常回忆他们过去在实现软件或编写文档时编写的部分源代码或代码摘要。为了模仿开发人员的代码或摘要生成行为,我们提出了一个检索增强框架,REDCODER,检索相关的代码或摘要从检索数据库,并提供它们作为补充代码生成或摘要模型。Redcoder有几个独特之处。首先,它扩展了最先进的稠密检索技术,以搜索相关代码或摘要。其次,它可以与包括单峰(仅代码或自然语言描述)或双峰实例(代码描述对)的检索数据库一起工作。我们进行了实验和广泛的分析,在Java和Python的代码生成和摘要的两个基准数据集,和有前途的结果认可我们提出的检索增强框架的有效性。

英文摘要:

Software developers write a lot of source code and documentation during software development. Intrinsically, developers often recall parts of source code or code summaries that they had written in the past while implementing software or documenting them. To mimic developers' code or summary generation behavior, we propose a retrieval augmented framework, REDCODER, that retrieves relevant code or summaries from a retrieval database and provides them as a supplement to code generation or summarization models. REDCODER has a couple of uniqueness. First, it extends the state-of-the-art dense retrieval technique to search for relevant code or summaries. Second, it can work with retrieval databases that include unimodal (only code or natural language description) or bimodal instances (code-description pairs). We conduct experiments and extensive analysis on two benchmark datasets of code generation and summarization in Java and Python, and the promising results endorse the effectiveness of our proposed retrieval augmented framework.

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

↑