Planning-Coding Separation in LLM-Based Code Generation: An Empirical Study

| Source: arXiv AI

Tags: Code Generation, LLM Planning, Planner-Coder Separation, Coding Agents, Model Routing

An empirical study finds code generation works almost as well when one LLM plans and another writes code, and a large planner paired with a much smaller coder can sometimes match the large model alone.

Details

The authors run what they call the first comprehensive study of planning-coding separation, where planning and coding are assigned to different LLMs. Nearly all planner-coder combinations were about as competitive as using one model for both tasks, and pairing a stronger planner with a stronger coder usually improved results. A large planner with a much smaller coder could sometimes match the large model doing both. Further training of the coder generally helped across combinations. For teams building coding agents, this supports routing planning to a strong model and code writing to a cheaper one to cut inference cost.