The Prompt Alchemist: Automated LLM-Tailored Prompt Optimization for Test Case Generation

炼金术 考试(生物学) 计算机科学 历史 地质学 艺术史 古生物学
作者
Shuzheng Gao,Chaozheng Wang,Cuiyun Gao,Xiao‐Dong Jiao,Chun Yong Chong,Shan Gao,Michael R. Lyu
出处
期刊:Cornell University - arXiv
标识
DOI:10.48550/arxiv.2501.01329
摘要

Test cases are essential for validating the reliability and quality of software applications. Recent studies have demonstrated the capability of Large Language Models (LLMs) to generate useful test cases for given source code. However, the existing work primarily relies on human-written plain prompts, which often leads to suboptimal results since the performance of LLMs can be highly influenced by the prompts. Moreover, these approaches use the same prompt for all LLMs, overlooking the fact that different LLMs might be best suited to different prompts. Given the wide variety of possible prompt formulations, automatically discovering the optimal prompt for each LLM presents a significant challenge. Although there are methods on automated prompt optimization in the natural language processing field, they are hard to produce effective prompts for the test case generation task. First, the methods iteratively optimize prompts by simply combining and mutating existing ones without proper guidance, resulting in prompts that lack diversity and tend to repeat the same errors in the generated test cases. Second, the prompts are generally lack of domain contextual knowledge, limiting LLMs' performance in the task.

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
暗月皇发布了新的文献求助10
刚刚
传奇3应助Wtony采纳,获得10
2秒前
Wingler完成签到 ,获得积分10
2秒前
火山蜗牛完成签到,获得积分10
5秒前
sunsun10086完成签到 ,获得积分10
6秒前
7秒前
Vigour完成签到 ,获得积分10
8秒前
karulko完成签到,获得积分10
10秒前
10秒前
hejinyin完成签到,获得积分10
10秒前
PhD_Lee73完成签到 ,获得积分10
11秒前
科研通AI2S应助李y梅子采纳,获得10
12秒前
一阳完成签到,获得积分10
13秒前
13秒前
13秒前
简亓发布了新的文献求助10
13秒前
14秒前
jiang完成签到 ,获得积分10
14秒前
Kate发布了新的文献求助10
17秒前
18秒前
Luos完成签到,获得积分10
18秒前
tian发布了新的文献求助10
19秒前
AirHaicf发布了新的文献求助10
20秒前
21秒前
orixero应助简亓采纳,获得10
21秒前
动漫大师发布了新的文献求助10
22秒前
123完成签到 ,获得积分10
22秒前
yuancw完成签到 ,获得积分10
23秒前
23秒前
SLS完成签到,获得积分10
24秒前
南城完成签到 ,获得积分10
24秒前
willa完成签到 ,获得积分10
24秒前
huihui完成签到,获得积分10
24秒前
holi完成签到 ,获得积分10
25秒前
科研通AI2S应助Kate采纳,获得10
25秒前
专注的电脑完成签到,获得积分10
26秒前
Arrow完成签到,获得积分10
27秒前
zhubin完成签到 ,获得积分10
28秒前
28秒前
孤烟发布了新的文献求助10
28秒前
高分求助中
【此为提示信息,请勿应助】请按要求发布求助,避免被关 20000
Technologies supporting mass customization of apparel: A pilot project 450
Mixing the elements of mass customisation 360
Периодизация спортивной тренировки. Общая теория и её практическое применение 310
the MD Anderson Surgical Oncology Manual, Seventh Edition 300
Nucleophilic substitution in azasydnone-modified dinitroanisoles 300
Political Ideologies Their Origins and Impact 13th Edition 260
热门求助领域 (近24小时)
化学 材料科学 医学 生物 工程类 有机化学 物理 生物化学 纳米技术 计算机科学 化学工程 内科学 复合材料 物理化学 电极 遗传学 量子力学 基因 冶金 催化作用
热门帖子
关注 科研通微信公众号,转发送积分 3781113
求助须知:如何正确求助?哪些是违规求助? 3326545
关于积分的说明 10227650
捐赠科研通 3041675
什么是DOI,文献DOI怎么找? 1669552
邀请新用户注册赠送积分活动 799100
科研通“疑难数据库(出版商)”最低求助积分说明 758734