Fully Autonomous Programming with Large Language Models

Vadim Liventsev*, Anastasiia Grishina, Aki Härmä, Leon Moonen

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference article in proceedingAcademicpeer-review

Abstract

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.

Original languageEnglish
Title of host publicationGECCO 2023 - Proceedings of the 2023 Genetic and Evolutionary Computation Conference
PublisherThe Association for Computing Machinery, Inc.
Pages1146-1155
Number of pages10
ISBN (Electronic)9798400701191
DOIs
Publication statusPublished - 15 Jul 2023
Externally publishedYes
Event2023 Genetic and Evolutionary Computation Conference - Lisbon, Portugal
Duration: 15 Jul 202319 Jul 2023
https://gecco-2023.sigevo.org/HomePage

Conference

Conference2023 Genetic and Evolutionary Computation Conference
Abbreviated titleGECCO 2023
Country/TerritoryPortugal
CityLisbon
Period15/07/2319/07/23
Internet address

Keywords

  • automatic programming
  • large language models
  • program repair

Fingerprint

Dive into the research topics of 'Fully Autonomous Programming with Large Language Models'. Together they form a unique fingerprint.

Cite this