RRGcode: Deep hierarchical search-based code generation

编码(集合论) 计算机科学 人工智能 程序设计语言 集合(抽象数据类型)
作者
Qianwen Gou,Yunwei Dong,Wu Yujiao,Qiao Ke
出处
期刊:Journal of Systems and Software [Elsevier BV]
卷期号:211: 111982-111982 被引量:5
标识
DOI:10.1016/j.jss.2024.111982
摘要

Retrieval-augmented code generation strengthens the generation model by using a retrieval model to select relevant code snippets from a code corpus. The synergy between retrieval and generation ensures that the generated code closely corresponds to the intended functionality. Existing methods simply feed the retrieved results to the generation model. However, if the retrieval corpus contains erroneous or sub-optimal code examples, there is a risk that the model may replicate these mistakes in the generated code. To tackle these problems, we propose RRGcode(Retrieval, Re-ranking, and Generation for code generation), a deep hierarchical search-based code generation framework that fine-tunes initial retrieved code rankings, reducing the risk of replicating errors from the retrieval corpus and enhancing the generation of higher-quality, more reliable code. Specifically, it first retrieves relevant code candidates from a large code corpus. Then, a re-ranking model reconstructs the search space through a detailed semantic comparison between code candidates and the query, ensuring that only the most relevant and accurate candidates are considered. Finally, the re-ranked top-K codes, along with the query, serve as input for the code generation model. Extensive experiments are conducted to evaluate the effectiveness of generated code by RRGcode, demonstrating state-of-the-art performance in code generation tasks.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
花花hau花花花完成签到,获得积分20
刚刚
MQ_Ningbo应助Ssyong采纳,获得10
刚刚
杨杨杨发布了新的文献求助10
刚刚
1秒前
科研通AI2S应助yi7777采纳,获得10
1秒前
lxr完成签到 ,获得积分20
1秒前
1秒前
2秒前
欢喜恶天完成签到,获得积分10
2秒前
Nole应助bee采纳,获得30
2秒前
2秒前
666666发布了新的文献求助10
2秒前
2秒前
3秒前
敏感绍辉完成签到,获得积分20
3秒前
香蕉觅云应助粟一烧烧采纳,获得20
3秒前
3秒前
3秒前
3秒前
可爱的函函应助aaaa采纳,获得10
4秒前
小马甲应助薏米采纳,获得10
4秒前
昏睡的惮发布了新的文献求助10
4秒前
Nole应助trfficgao采纳,获得10
4秒前
4秒前
13发布了新的文献求助10
5秒前
5秒前
5秒前
晴天娃娃完成签到,获得积分10
5秒前
Amor完成签到,获得积分20
6秒前
6秒前
ytdhfuyvjk完成签到,获得积分10
7秒前
涂涂发布了新的文献求助10
8秒前
lllh发布了新的文献求助10
8秒前
8秒前
大翟发布了新的文献求助10
8秒前
9秒前
Amor发布了新的文献求助10
9秒前
blablawindy完成签到,获得积分10
9秒前
舒适梦之给舒适梦之的求助进行了留言
10秒前
无私鸡翅完成签到 ,获得积分10
10秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
HYDROLYSE ACIDE DE QUELQUES DIOXASPIROCYCLANES 1000
Navigating Normative Orders. Interdisciplinary Perspectives 800
1 Peter and Christ's Descent to the Dead in Its Early Christian Reception 700
Essentials of Carbohydrate Chemistry and Biochemistry, 4th Edition 600
Organizational Behavior 510
Management and the Arts 510
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 内科学 物理 复合材料 催化作用 细胞生物学 无机化学 光电子学 物理化学 电极 基因
热门帖子
关注 科研通微信公众号,转发送积分 7741989
求助须知:如何正确求助?哪些是违规求助? 9290416
关于积分的说明 20201658
捐赠科研通 7320379
什么是DOI,文献DOI怎么找? 3306956
关于科研通互助平台的介绍 2458998
邀请新用户注册赠送积分活动 2317434