Self-planning Code Generation with Large Language Model
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.
Authors: Xue Jiang, Yihong Dong, Lecheng Wang, Qiwei Shang, Ge Li
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.
Ask questions about this paper to our AI assistant
You can also chat with multiple papers at once here.
Welcome to our AI assistant! Here are some important things to keep in mind:
- The assistant will only answer questions related to this specific paper.
- Please note that this is not a bot for casual chatting.
- If you want the answer in a language other than the language you chose for navigating the website, simply add "TRANSLATE IN LANGUAGE L" at the end of your query (replace "LANGUAGE L" with the language of your choice).
- For example, you could ask "Can you extract the most important aspect of the paper? TRANSLATE IN SPANISH".
- If you want to keep the history of your questions/answers you should create an account.
Assess the quality of the AI-generated content by voting
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.
Similar papers summarized with our AI tools
Navigate through even more similar papers through atree 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.