Inside PromptBreeder: Google DeepMind New Self-Improving Prompt Technique
Last Updated on November 5, 2023 by Editorial Team
Author(s): Jesus Rodriguez
Originally published on Towards AI.
I recently started an AI-focused educational newsletter, that already has over 160,000 subscribers. TheSequence is a no-BS (meaning no hype, no news, etc) ML-oriented newsletter that takes 5 minutes to read. The goal is to keep you up to date with machine learning projects, research papers, and concepts. Please give it a try by subscribing below:
TheSequence U+007C Jesus Rodriguez U+007C Substack
The best source to stay up-to-date with the developments in the machine learning, artificial intelligence, and dataβ¦
thesequence.substack.com
Reasoning and prompt evolution/optimization are being recognized as the next significant frontier for large language models(LLMs). We have all been dazzled by projects like AutoGPT or BabyAGI that constantly evolve prompts to achieve a specific goal in a way that resembles reasoning. Among the various strategies employed to enhance the reasoning capabilities of LLMs, one of the prominent ones is Chain-of-Thought Prompting, often hailed for its effectiveness. However, itβs worth noting that manually crafted prompt strategies tend to fall short of optimal performance.
Recently, researchers from Google DeepMind unveiled PROMPTBREEDER , a self-improving prompt algorithm that uses evolutionary techniques to arrive to the best prompts for a given task. PROMPTBREEDER addresses some of the limitations of CoT with a simple and super clever algorithm that improves the prompts in a self-referential manner.
The Foundation
The concept behind PROMPTBREEDER , developed by Google DeepMind, draws inspiration from emerging areas of research:
1. Prompting Strategy: Chain-of-Thought Prompting (CoT) stands out as a widely adopted approach. It facilitates intermediate reasoning steps by providing few-shot prompts to LLMs, leading to significant improvements in arithmetic, commonsense, and symbolic reasoning, especially for more powerful LLMs.
2. Self-Referential Self-Improvement: The pursuit of creating an open-ended system capable of self-improvement, as well as enhancing the way it improves itself, has been a long-standing challenge in AI research. A popular technique in this area is introspective neural networks with a self-referential weight matrix, allowing it to modify its own weights. A more scalable version of this concept has been proposed by Irie et al. in 2022.
3. Open-Endedness and LLMs: PROMPTBREEDER builds upon the idea that LLMs are adept at generating variations from examples and possess the ability to quantify novelty. In contrast to other systems, Promptbreeder explores the domain of prompts autonomously. It represents a transition from βlearning from dataβ to βlearning what data to learn from.β
Diving Deeper
Conceptually, PROMPTBREEDER can be considered a self-referential self-improvement in LLMs. The working process of Promptbreeder can be summarized as follows:
1. Task-Prompt Mutation: PROMPTBREEDER starts with a population of task prompts, which are subjected to mutations, resulting in various variants.
2. Fitness Evaluation: The fitness of these modified task prompts is assessed using a training dataset, measuring how effectively the LLM responds to them.
3. Continual Evolution: This mutation and assessment process is iterated over several generations, akin to biological evolution.
When faced with a problem description and equipped with an initial set of general βthinking-stylesβ and mutation-prompts, PROMPTBREEDER sets in motion a dynamic process. This process gives rise to a population of evolutionary units, each typically comprised of two task-prompts and a mutation-prompt.
In the quest for prompt evolution, PROMPTBREEDER adopts a well-established binary tournament genetic algorithm framework pioneered by Harvey in 2011. To gauge the prowess of a task-prompt, its performance undergoes scrutiny against a random selection of training data.
Across multiple generations, PROMPTBREEDER embarks on a transformative journey. It introduces mutations to task-prompts and mutation-prompts, harnessing five distinct classes of mutation operators. This evolutionary journey leads to the emergence of task-prompts that are increasingly attuned to specific domains, while concurrently nurturing mutation-prompts that progressively refine their utility through a self-referential process.
PROMPTBREEDER leverages seed sets of mutation-prompts, thinking-styles, and domain-specific problem descriptions to generate task-prompts and mutation-prompts. LLMs are utilized as mutation operators. Over multiple generations, PB observes prompts adapting to specific domains, showcasing its effectiveness in various areas, including mathematics, commonsense reasoning, arithmetic, and ethics.
Unlike some existing prompting methods like Chain-of-Thought, PROMPTBREEDER stands out by not requiring parameter updates for self-referential self-improvement. This approach hints at a promising future where larger and more capable LLMs can further amplify its benefits.
PROMPTBREEDERβs foundation rests upon the insight that LLMs can generate variations of input text. Task-prompts are strings used to condition LLMs for better responses when followed by further input. To evaluate task-prompts, a batch of Q&A pairs is sampled from the training set of the relevant domain. Promptbreeder employs an evolutionary algorithm, with the mutation operator being an LLM conditioned on a mutation-prompt.
An intriguing aspect of PROMPTBREEDER is its self-referential mechanism, which extends to both task-prompts and mutation-prompts. This meta-level algorithm utilizes LLMs conditioned on a hyper-mutation prompt to evolve mutation-prompts. The process begins by initializing a population of mutated task-prompts, with each unit of evolution consisting of a set of task-prompts, a mutation-prompt, and, in some cases, a set of correct workings out.
In conclusion, PROMPTBREEDER presents a promising approach to enhancing the capabilities of large language models through self-referential self-improvement. Its potential lies in its ability to autonomously evolve prompts, adapt to specific domains, and offer a path towards more efficient and capable LLMs without the need for constant parameter updates.β
Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming aΒ sponsor.
Published via Towards AI