Host: The Japanese Society for Artificial Intelligence
Name : The 39th Annual Conference of the Japanese Society for Artificial Intelligence
Number : 39
Location : [in Japanese]
Date : May 27, 2025 - May 30, 2025
Large Language Models (LLMs) have recently shown promising advancements in automatic programming. However, most of the state-of-the-art LLMs are autoregressive models, which are limited to writing code sequentially. As a result, generating long code becomes time-consuming, and modifying a part of the generated code requires regenerating the entire code from scratch. This paper addresses these challenges by applying the concept of Template-based Code Generation (TBCG) to LLM-powered automatic programming. TBCG prepares predefined code templates and embeds specific values into placeholders to generate code with minimal manual effort. The proposed method reduces the need to repeatedly write frequent syntax elements and enables partial code modifications by having LLMs leverage such templates to generate code. In the experiment, we evaluate the proposed method on an HTML benchmark, demonstrating its effectiveness in both code generation and modification.