Connecting Large Language Models with Evolutionary Algorithms Yields Powerful Prompt Optimizers

要約

大規模言語モデル (LLM) はさまざまなタスクに優れていますが、慎重に作成されたプロンプトに依存しており、多くの場合、かなりの人的労力が必要です。
このプロセスを自動化するために、この論文では、EvoPrompt と呼ばれる離散プロンプト最適化のための新しいフレームワークを提案します。これは、優れたパフォーマンスと高速な収束を示す進化的アルゴリズム (EA) のアイデアを借用しています。
EA が個別のプロンプト (一貫性があり人間が判読できる必要がある自然言語表現) を処理できるようにするために、LLM を EA に接続します。
このアプローチにより、LLM の強力な言語処理機能と EA の効率的な最適化パフォーマンスを同時に活用できるようになります。
具体的には、勾配やパラメータを一切使用せず、EvoPrompt はプロンプトの母集団から開始し、進化的演算子に基づいて LLM を使用して新しいプロンプトを繰り返し生成し、開発セットに基づいて母集団を改善します。
言語理解と生成タスクにわたる 9 つのデータセット上で、GPT-3.5 や Alpaca を含むクローズドおよびオープンソース LLM の両方のプロンプトを最適化します。
EvoPrompt は、人間が操作したプロンプトや既存の自動プロンプト生成方法よりも、それぞれ最大 25% および 14% 大幅に優れています。
さらに、EvoPrompt は、LLM と EA を接続すると相乗効果が生まれることを実証しており、LLM と従来のアルゴリズムの組み合わせに関するさらなる研究を促す可能性があります。

要約(オリジナル)

Large Language Models (LLMs) excel in various tasks, but they rely on carefully crafted prompts that often demand substantial human effort. To automate this process, in this paper, we propose a novel framework for discrete prompt optimization, called EvoPrompt, which borrows the idea of evolutionary algorithms (EAs) as they exhibit good performance and fast convergence. To enable EAs to work on discrete prompts, which are natural language expressions that need to be coherent and human-readable, we connect LLMs with EAs. This approach allows us to simultaneously leverage the powerful language processing capabilities of LLMs and the efficient optimization performance of EAs. Specifically, abstaining from any gradients or parameters, EvoPrompt starts from a population of prompts and iteratively generates new prompts with LLMs based on the evolutionary operators, improving the population based on the development set. We optimize prompts for both closed- and open-source LLMs including GPT-3.5 and Alpaca, on 9 datasets spanning language understanding and generation tasks. EvoPrompt significantly outperforms human-engineered prompts and existing methods for automatic prompt generation by up to 25% and 14% respectively. Furthermore, EvoPrompt demonstrates that connecting LLMs with EAs creates synergies, which could inspire further research on the combination of LLMs and conventional algorithms.

arxiv情報

著者 Qingyan Guo,Rui Wang,Junliang Guo,Bei Li,Kaitao Song,Xu Tan,Guoqing Liu,Jiang Bian,Yujiu Yang
発行日 2023-09-15 16:50:09+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL パーマリンク