Self-planning Code Generation with Large Language Model

AI-generated keywords: Self-Planning Code Generation Language Models Requirements Engineering Case Study

AI-generated Key Points

  • The paper proposes a self-planning code generation method with large language models (LLMs) to generate complex code from human intent.
  • The approach consists of two phases: planning and implementation.
  • In the planning phase, the LLM plans out solution steps from the provided intent combined with in-context learning.
  • In the implementation phase, the model generates code step by step guided by the solution steps.
  • The self-planning code generation has been evaluated on multiple datasets and demonstrated superiority over naive direct generation approaches with LLMs.
  • However, some problems were discovered during practice that need further attention, such as limited information in provided intent and unstable performance due to sensitivity to examples.
  • The paper suggests exploring beyond code writing into requirements analysis and incorporating requirements engineering methodology with LLMs for software development.
  • A case study validates this approach's effectiveness but highlights its limitations as a forward and limited solution.
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Xue Jiang, Yihong Dong, Lecheng Wang, Qiwei Shang, Ge Li

License: CC BY 4.0

Abstract: Although large language models have demonstrated impressive ability in code generation, they are still struggling to address the complicated intent provided by humans. It is widely acknowledged that humans typically employ planning to decompose complex problems and schedule the solution steps prior to implementation. Thus we introduce planning into code generation to help the model understand complex intent and reduce the difficulty of problem solving. This paper proposes a self-planning code generation method with large language model, which consists of two phases, namely planning phase and implementation phase. Specifically, in the planning phase, the language model plans out the solution steps from the intent combined with in-context learning. Then it enters the implementation phase, where the model generates code step by step, guided by the solution steps. The effectiveness of self-planning code generation has been rigorously evaluated on multiple code generation datasets and the results have demonstrated a marked superiority over naive direct generation approaches with language model. The improvement in performance is substantial, highlighting the significance of self-planning in code generation tasks.

Submitted to arXiv on 12 Mar. 2023

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2303.06689v1

This paper proposes a self-planning code generation method with large language models (LLMs) to address the difficulty of generating complex code from human intent. The proposed approach consists of two phases: planning and implementation. In the planning phase, the LLM plans out solution steps from the provided intent combined with in-context learning. Then, in the implementation phase, the model generates code step by step guided by the solution steps. The effectiveness of self-planning code generation has been rigorously evaluated on multiple datasets, demonstrating a marked superiority over naive direct generation approaches with LLMs. However, during practice some problems were discovered that need further attention. One issue is that the plan-based approach is still limited by a lack of information in the provided intent. Adding more information such as usage examples or detailed descriptions can improve performance. Another problem is unstable performance due to sensitivity to examples, making it difficult to control what the model learns from prompts. Additionally, replicating irrelevant steps in prompts can occur if there is not enough confidence to generate a plan. The paper suggests exploring beyond code writing into requirements analysis and incorporating requirements engineering methodology with LLMs for software development. Furthermore, solving real-world problems through programs using similar methods as this paper could provide logical and well-thought-out solutions. A case study validates this approach's effectiveness but highlights its limitations as a forward and limited solution. In conclusion, this paper proposes an effective self-planning approach for code generation that outperforms naive direct generation on multiple datasets and discusses promising future works for advancing software engineering one step forward.
Created on 03 May. 2023

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.