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.
翻译:近期,利用大型语言模型(LLM)演化代码的算法已进入遗传编程(GP)领域。我们提出LLM GP——一种形式化的基于LLM的演化算法,专门用于代码演化。与GP类似,该算法采用演化算子,但其算子设计与实现方式与传统GP截然不同:它通过提示工程及LLM预训练的模式匹配与序列补全能力来调用LLM。我们还介绍了LLM GP的演示级变体并公开其代码。通过涵盖从形式化到实践操作的各类算法,我们探讨了设计考量、LLM使用策略,以及将LLM应用于遗传编程时所面临的科学挑战。