Evolving Code with A Large Language Model
This work addresses the integration of LLMs into genetic programming, offering a novel approach for code evolution, though it appears incremental as it builds on existing GP concepts with LLM enhancements.
The paper introduces LLM GP, a formalized evolutionary algorithm that uses Large Language Models to evolve code, differing from traditional Genetic Programming by leveraging LLMs for evolutionary operators through prompting and pattern matching.
Algorithms that use Large Language Models (LLMs) to evolve code arrived on the Genetic Programming (GP) scene very recently. We present LLM GP, a formalized LLM-based evolutionary algorithm designed to evolve code. Like GP, it uses evolutionary operators, but its designs and implementations of those operators radically differ from GP's because they enlist an LLM, using prompting and the LLM's pre-trained pattern matching and sequence completion capability. We also present a demonstration-level variant of LLM GP and share its code. By addressing algorithms that range from the formal to hands-on, we cover design and LLM-usage considerations as well as the scientific challenges that arise when using an LLM for genetic programming.