Self-Planning Code Generation with Large Language Models

Human knowledge: decompose complex problems into schedule solution steps prior to implementation

Two parts:

Human intent: What to do LLM Solver: How to do

self-planning

  1. The prompt is specilfally designed as k examples and the k is a small number.

  2. A step like “Check the number is prime” is better than “If a number is prime, it is not prime. Check if the number is divisible by any number between 2 and n-1. If the number is not dicisible by any number between 2 and n-1, it is prime”

Ealuation Methods