Current approaches to program synthesis with Large Language Models (LLMs) exhibit a "near miss syndrome": they tend to generate programs that semantically resemble the correct answer (as measured by text similarity metrics or human evaluation), but achieve a low or even zero accuracy as measured by unit tests due to small imperfections, such as the wrong input or output format. This calls for an approach known as Synthesize, Execute, Debug (SED), whereby a draft of the solution is generated first, followed by a program repair phase addressing the failed tests. To effectively apply this approach to instruction-driven LLMs, one needs to determine which prompts perform best as instructions for LLMs, as well as strike a balance between repairing unsuccessful programs and replacing them with newly generated ones. We explore these trade-offs empirically, comparing replace-focused, repair-focused, and hybrid debug strategies, as well as different template-based and model-based prompt-generation techniques. We use OpenAI Codex as the LLM and Program Synthesis Benchmark 2 as a database of problem descriptions and tests for evaluation. The resulting framework outperforms both conventional usage of Codex without the repair phase and traditional genetic programming approaches.


翻译:基于大语言模型的完全自主编程 当前用大型语言模型进行程序合成的方法存在“近似且不精确”的问题,常常生成与正确答案语义上相似(根据文本相似度度量或人类评估),但在单元测试上实现低甚至零准确率,由于小的瑕疵,比如错误的输入或输出格式。这需要一种 Synthesize, Execute, Debug(SED)的方法,首先生成解决方案的草稿,然后进行程序修复阶段,以解决失败的测试。要有效地将这种方法应用于指令驱动型LLMs,就需要确定哪些提示最适合作为LLMs的指令,并在修复不成功的程序和替换它们为新生成的程序之间取得平衡。我们通过实证方法探讨这些权衡,比较了替换重点、修复重点和混合调试策略,以及不同的基于模板和模型的提示生成技术。我们使用OpenAI Codex作为LLM和Program Synthesis Benchmark 2作为问题描述和评估测试数据库。所得到的框架优于传统的不带修复阶段的Codex使用方法和传统的遗传编程方法。

0
下载
关闭预览

相关内容

【最受欢迎的概率书】《概率论:理论与实例》,490页pdf
专知会员服务
159+阅读 · 2020年11月13日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
75+阅读 · 2020年7月26日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
23+阅读 · 2019年10月18日
强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
Multi-Task Learning的几篇综述文章
深度学习自然语言处理
15+阅读 · 2020年6月15日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
无监督元学习表示学习
CreateAMind
25+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
Capsule Networks解析
机器学习研究会
10+阅读 · 2017年11月12日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Arxiv
1+阅读 · 2023年6月2日
VIP会员
相关VIP内容
【最受欢迎的概率书】《概率论:理论与实例》,490页pdf
专知会员服务
159+阅读 · 2020年11月13日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
75+阅读 · 2020年7月26日
FlowQA: Grasping Flow in History for Conversational Machine Comprehension
专知会员服务
23+阅读 · 2019年10月18日
强化学习最新教程,17页pdf
专知会员服务
167+阅读 · 2019年10月11日
机器学习入门的经验与建议
专知会员服务
90+阅读 · 2019年10月10日
相关资讯
VCIP 2022 Call for Demos
CCF多媒体专委会
1+阅读 · 2022年6月6日
Multi-Task Learning的几篇综述文章
深度学习自然语言处理
15+阅读 · 2020年6月15日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
无监督元学习表示学习
CreateAMind
25+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
16+阅读 · 2018年12月24日
【推荐】自然语言处理(NLP)指南
机器学习研究会
35+阅读 · 2017年11月17日
Capsule Networks解析
机器学习研究会
10+阅读 · 2017年11月12日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
1+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
国家自然科学基金
0+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员