Fully Autonomous Programming with Large Language Models

04/20/2023
by   Vadim Liventsev, et al.
0

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.

READ FULL TEXT
research
07/16/2020

Synthesize, Execute and Debug: Learning to Repair for Neural Program Synthesis

The use of deep learning techniques has achieved significant progress fo...
research
07/13/2017

On Repair with Probabilistic Attribute Grammars

Program synthesis and repair have emerged as an exciting area of researc...
research
05/02/2023

Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generation

Program synthesis has been long studied with recent approaches focused o...
research
05/21/2022

Improving automatically generated code from Codex via Automated Program Repair

Large language models, e.g., Codex and AlphaCode, have shown capability ...
research
06/16/2023

Demystifying GPT Self-Repair for Code Generation

Large Language Models (LLMs) have shown remarkable aptitude in code gene...
research
08/27/2021

HyperGI: Automated Detection and Repair of Information Flow Leakage

Maintaining confidential information control in software is a persistent...

Please sign up or login with your details

Forgot password? Click here to reset