[論文レビュー] Large Language Models Are Human-Level Prompt Engineers
この論文は Automatic Prompt Engineer (APE) を紹介します。これは LLM駆動の手法で、自然言語指示を自動生成・選択して LLM を導く。多くのタスクで人間レベルのゼロショット性能を達成し、少数ショット学習と真実性の制御を強化します。
By conditioning on natural language instructions, large language models (LLMs) have displayed impressive capabilities as general-purpose computers. However, task performance depends significantly on the quality of the prompt used to steer the model, and most effective prompts have been handcrafted by humans. Inspired by classical program synthesis and the human approach to prompt engineering, we propose Automatic Prompt Engineer (APE) for automatic instruction generation and selection. In our method, we treat the instruction as the "program," optimized by searching over a pool of instruction candidates proposed by an LLM in order to maximize a chosen score function. To evaluate the quality of the selected instruction, we evaluate the zero-shot performance of another LLM following the selected instruction. Experiments on 24 NLP tasks show that our automatically generated instructions outperform the prior LLM baseline by a large margin and achieve better or comparable performance to the instructions generated by human annotators on 19/24 tasks. We conduct extensive qualitative and quantitative analyses to explore the performance of APE. We show that APE-engineered prompts can be applied to steer models toward truthfulness and/or informativeness, as well as to improve few-shot learning performance by simply prepending them to standard in-context learning prompts. Please check out our webpage at https://sites.google.com/view/automatic-prompt-engineer.
研究の動機と目的
- LLMs に対する効果的な指示を自動生成することで、プロンプト設計における人間の労力を低減させる動機づけ。
- 指示生成をブラックボックス最適化として扱われる自然言語プログラム合成として位置づける。
- 候補プロンプトの提案と品質評価の両方に LLM を活用する。
- 自動設計されたプロンプトが多様なタスクで人間が作成したプロンプトと互角、あるいはそれを上回ることを示す。
提案手法
- 指示生成を最適化として定式化する:期待スコア f(rho, D_train, M) を最大化する rho を見つける。
- デモから候補指示 U を生成する提案エンジンとして LLM を用いる。
- 訓練データ上で選択したスコア f を用いて候補を評価し、上位の成績を収める候補を選択する。
- デモから指示候補を生成するために forward または reverse 生成モードを用いる。
- 高スコア候補の周囲で提案集合を洗練させるために、反復モンテカルロ探索を任意で適用する。
- 実行正確度または対数確率をスコア関数として用い、計算資源を節約する適応的な多段階評価を行う。
実験結果
リサーチクエスチョン
- RQ1自動生成された指示はゼロショットおよび少数ショットタスクで、人間が作成したプロンプトと同等またはそれを上回ることができるか?
- RQ2LLM 生成プロンプトは、指示誘導および BIG-Bench タスクにおける貪欲なプロンプト選択を超える改善をもたらすか?
- RQ3APE は効果的なゼロショットのチェーン・オブ・思考プロンプトを発見し、出力を真実性や情報量へ導くことができるか?
主な発見
- APE は 24 Instruction Induction タスクと 21 の BIG-Bench タスクのうち 17 タスクで、人間のプロンプトと同等またはそれ以上のゼロショット性能を達成。
- InstructGPT を用いた 24 タスクの四分位範囲平均は、APE が人間が設計したプロンプトを上回ることを示している(IQM 0.810 対 0.749)。
- コンテキスト内デモンストレーションの前に APE 生成の指示を追加すると、ほとんどのタスクで少数ショット学習が改善される。
- APE は効果的なゼロショットのチェーン・オブ・思考プロンプトを発見し、モデルを真実性または情報量へ導くことができる。
- TruthfulQA では、APE 推奨プロンプトは強い真実性と情報量のトレードオフを達成し、場合によっては人間のプロンプトより高い true+informative 精度を生む。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。