The Fact Selection Problem in LLM-Based Program Repair

选择(遗传算法) 计算机科学 人工智能
作者
Nikhil Parasaram,Huijie Yan,Boyu Yang,Zineb Flahy,Abriele Qudsi,Damian Ziaber,Earl T. Barr,Sergey Mechtaev
出处
期刊:Cornell University - arXiv 被引量:2
标识
DOI:10.48550/arxiv.2404.05520
摘要

Recent research has shown that incorporating bug-related facts, such as stack traces and GitHub issues, into prompts enhances the bug-fixing capabilities of large language models (LLMs). Considering the ever-increasing context window of these models, a critical question arises: what and how many facts should be included in prompts to maximise the chance of correctly fixing bugs? To answer this question, we conducted a large-scale study, employing over 19K prompts featuring various combinations of seven diverse facts to rectify 314 bugs from open-source Python projects within the BugsInPy benchmark. Our findings revealed that each fact, ranging from simple syntactic details like code context to semantic information previously unexplored in the context of LLMs such as angelic values, is beneficial. Specifically, each fact aids in fixing some bugs that would remain unresolved or only be fixed with a low success rate without it. Importantly, we discovered that the effectiveness of program repair prompts is non-monotonic over the number of used facts; using too many facts leads to subpar outcomes. These insights led us to define the fact selection problem: determining the optimal set of facts for inclusion in a prompt to maximise LLM's performance on a given task instance. We found that there is no one-size-fits-all set of facts for bug repair. Therefore, we developed a basic statistical model, named Maniple, which selects facts specific to a given bug to include in the prompt. This model significantly surpasses the performance of the best generic fact set. To underscore the significance of the fact selection problem, we benchmarked Maniple against the state-of-the-art zero-shot, non-conversational LLM-based bug repair methods. On our testing dataset of 157 bugs, Maniple repairs 88 bugs, 17% above the best configuration.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
慕青应助hxjtu采纳,获得10
1秒前
小知了完成签到,获得积分10
1秒前
可爱邓邓完成签到 ,获得积分10
1秒前
优雅含灵完成签到 ,获得积分10
2秒前
八号仓上半场完成签到,获得积分10
3秒前
今年我必胖20斤完成签到,获得积分10
5秒前
张亚博完成签到,获得积分10
6秒前
闪闪寄风完成签到,获得积分10
6秒前
hkh发布了新的文献求助10
7秒前
灯灯完成签到,获得积分10
7秒前
7秒前
老小孩完成签到 ,获得积分10
8秒前
8秒前
hikevin126完成签到,获得积分10
9秒前
9秒前
飞翔的梦完成签到,获得积分10
10秒前
getDoc完成签到,获得积分10
10秒前
yongzaizhuigan完成签到,获得积分0
12秒前
Tengami完成签到,获得积分10
12秒前
tfq200完成签到,获得积分10
12秒前
jndongwei发布了新的文献求助100
13秒前
qianlan发布了新的文献求助10
13秒前
snowdrift完成签到,获得积分10
15秒前
11完成签到,获得积分10
15秒前
典雅浩轩完成签到,获得积分10
15秒前
越幸运完成签到 ,获得积分10
15秒前
泡芙发布了新的文献求助10
16秒前
nadeem完成签到 ,获得积分10
16秒前
lx完成签到,获得积分10
17秒前
17秒前
种棵糖葫芦树完成签到 ,获得积分10
17秒前
大可完成签到 ,获得积分10
18秒前
qianlan完成签到,获得积分10
18秒前
slgzhangtao完成签到,获得积分10
19秒前
xixihaha完成签到,获得积分0
19秒前
巴山郎完成签到,获得积分10
19秒前
兜里全是糖完成签到,获得积分10
20秒前
madlin发布了新的文献求助50
20秒前
木质素爱好者完成签到,获得积分10
21秒前
hdbys完成签到,获得积分10
22秒前
高分求助中
Adhesion Science: Principles & Practice 1234
Signals, Systems, and Signal Processing 610
Inflectional Morphology in Harmonic Serialism 600
Competition Law: Cases and Materials, 5th edition 500
Petrology and Plate Tectonics,2025 400
Burger's Medicinal Chemistry and Drug Discovery 400
A Step-by-Step Guide to Qualitative Data Coding 2nd Edition 400
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 物理 内科学 复合材料 催化作用 物理化学 光电子学 电极 细胞生物学 基因 无机化学
热门帖子
关注 科研通微信公众号,转发送积分 6712274
求助须知:如何正确求助?哪些是违规求助? 8451246
关于积分的说明 18043404
捐赠科研通 5958733
什么是DOI,文献DOI怎么找? 2993333
邀请新用户注册赠送积分活动 1969238
关于科研通互助平台的介绍 1919274