Planning-Driven Programming: A Large Language Model Programming Workflow

The strong performance of large language models (LLMs) raises extensive discussion on their application to code generation.Recent research suggests continuous program refinements through visible tests to improve code generation accuracy in LLMs.However, these methods suffer from LLMs' inefficiency and limited reasoning capacity.In this work, we propose an LLM programming workflow (LPW) designed to improve both initial code generation and subsequent refinements within a structured two-phase workflow.Specifically, the solution generation phase formulates a solution plan, which is then verified through visible tests to specify the intended natural language solution.Subsequently, the code implementation phase drafts an initial code according to the solution plan and its verification.If the generated code fails the visible tests, the plan verification serves as the intended solution to consistently inform the refinement process for correcting bugs.Compared to state-of-the-art methods across various existing LLMs, LPW significantly improves the Pass@1 accuracy by up to 16.4% on well-established text-tocode generation benchmarks.LPW also sets new state-of-the-art Pass@1 accuracy, achieving 98.2% on HumanEval, 84.8% on MBPP, 59.3% on LiveCode, 62.6% on APPS, and 34.7% on CodeContests, using GPT-4o as the backbone.

Authors

Institutions

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.acl-long.621
Citations
1
Primary Topic
Model-Driven Software Engineering Techniques
Type
article
Field-Weighted Citation Impact
2.31
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Planning-Driven Programming: A Large Language Model Programming Workflow

Yanchuan Chang, Nir Lipovetzky, Krista A. Ehinger, Chao Lei
1 citations
Model-Driven Software Engineering Techniques
2.31
article

Planning-Driven Programming: A Large Language Model Programming Workflow

Yanchuan Chang, Nir Lipovetzky, Krista A. Ehinger, Chao Lei
article en
1 citations

Abstract

The strong performance of large language models (LLMs) raises extensive discussion on their application to code generation.Recent research suggests continuous program refinements through visible tests to improve code generation accuracy in LLMs.However, these methods suffer from LLMs' inefficiency and limited reasoning capacity.In this work, we propose an LLM programming workflow (LPW) designed to improve both initial code generation and subsequent refinements within a structured two-phase workflow.Specifically, the solution generation phase formulates a solution plan, which is then verified through visible tests to specify the intended natural language solution.Subsequently, the code implementation phase drafts an initial code according to the solution plan and its verification.If the generated code fails the visible tests, the plan verification serves as the intended solution to consistently inform the refinement process for correcting bugs.Compared to state-of-the-art methods across various existing LLMs, LPW significantly improves the Pass@1 accuracy by up to 16.4% on well-established text-tocode generation benchmarks.LPW also sets new state-of-the-art Pass@1 accuracy, achieving 98.2% on HumanEval, 84.8% on MBPP, 59.3% on LiveCode, 62.6% on APPS, and 34.7% on CodeContests, using GPT-4o as the backbone.

The University of Melbourne (AU)
Openalex Percentile: Top 11%
Model-Driven Software Engineering Techniques
2.31
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.