Skip to main content
QUICK REVIEW

[論文レビュー] SPRIG: Improving Large Language Model Performance by System Prompt Optimization

Lechen Zhang, Tolga Ergen|arXiv (Cornell University)|Oct 18, 2024
Topic ModelingComputer Science被引用数 3
ひとこと要約

本稿では、多様なタスクにわたる大規模言語モデルのパフォーマンスを向上させるために、システムプロンプトを最適化する遺伝的アルゴリズム「Sprig」を紹介する。Sprigは事前に定義されたプロンプトコンポーネントを段階的に組み合わせることで、タスク固有のプロンプト最適化と同等のパフォーマンスを達成し、タスクレベルのチューニングと組み合わせることで補完的な向上効果を示す。これは、モデル、言語、タスクの観点から強力な一般化性能を示している。

ABSTRACT

Large Language Models (LLMs) have shown impressive capabilities in many scenarios, but their performance depends, in part, on the choice of prompt. Past research has focused on optimizing prompts specific to a task. However, much less attention has been given to optimizing the general instructions included in a prompt, known as a system prompt. To address this gap, we propose SPRIG, an edit-based genetic algorithm that iteratively constructs prompts from prespecified components to maximize the model's performance in general scenarios. We evaluate the performance of system prompts on a collection of 47 different types of tasks to ensure generalizability. Our study finds that a single optimized system prompt performs on par with task prompts optimized for each individual task. Moreover, combining system and task-level optimizations leads to further improvement, which showcases their complementary nature. Experiments also reveal that the optimized system prompts generalize effectively across model families, parameter sizes, and languages. This study provides insights into the role of system-level instructions in maximizing LLM potential.

研究の動機と目的

  • LLMにおけるタスク固有のプロンプトではなく、一般化されたシステムプロンプトの最適化という未だ十分に検討されていない課題に取り組むこと。
  • 多様な状況においてモデルの振る舞いを向上させる、タスクに依存しない高パフォーマンスなシステムプロンプトを体系的に構築する手法を開発すること。
  • システムプロンプト最適化がタスクプロンプト最適化と組み合わせて、補完的な利益をもたらすかどうかを評価すること。
  • 最適化されたシステムプロンプトが、モデルファミリー、パラメータサイズ、言語の観点からどれほど一般化できるかを評価すること。
  • (例:推論、ロール、フォーマット)といったコンポーネントのうち、パフォーマンス向上に最も寄与するものは何かを特定すること。

提案手法

  • Sprigは、収集済みの戦略コロナから事前に定義されたプロンプトコンポーネントを組み合わせることで、システムプロンプトを進化させるエディットベースの遺伝的アルゴリズムを採用する。
  • アルゴリズムは、47の多様なタスクからなるベンチマークにおけるフィットネス評価を用いて、プロンプトコンポーネントの選択、クロスオーバー、突然変異を誘導する。
  • コンポーネントには、推論戦略(例:Chain-of-Thought)、ロール、フォーマットルール、メタ命令が含まれる。
  • 最適化は反復的に実施され、汎化性を確保するため、保留されたタスクセットでのパフォーマンスを測定する。
  • 本手法は、システムプロンプト最適化の単独適用と、タスクプロンプト最適化と組み合わせた場合の両方を評価する。
  • 潜在空間におけるモデル行動の変化を可視化するために、PCAを用いて隠れ状態活性化を分析する。
Figure 1: LLM prompts features both system-level instructions which may include CoT instructions, personas, and other rules ( orange ), task-specific instructions which may include details and examples ( blue ), and the instance itself ( green ). Here, we focus on optimizing the system instructions
Figure 1: LLM prompts features both system-level instructions which may include CoT instructions, personas, and other rules ( orange ), task-specific instructions which may include details and examples ( blue ), and the instance itself ( green ). Here, we focus on optimizing the system instructions

実験結果

リサーチクエスチョン

  • RQ11つの最適化済みシステムプロンプトが、タスク固有のプロンプト最適化と同等のパフォーマンスを達成できるか?
  • RQ2システムプロンプト最適化とタスクプロンプト最適化は、補完的な戦略を学習するのか。それらを組み合わせることでさらなるパフォーマンス向上が得られるか?
  • RQ3最適化済みのシステムプロンプトは、異なるモデルファミリー、パrameterサイズ、言語においてどれほど一般化できるか?
  • RQ4システムプロンプトコンポーネント(例:CoT、ロール、フォーマット)のうち、パフォーマンス向上に最も寄与するのはどれか?
  • RQ5システムプロンプト最適化は、隠れ状態分布を測定することで、モデルの潜在表現空間にどのように影響を与えるか?

主な発見

  • Sprigによる1つの最適化済みシステムプロンプトは、47の多様なタスクにおいて、タスク固有のプロンプト最適化と同等のパフォーマンスを達成した。
  • Sprigで最適化されたシステムプロンプトとタスク固有のプロンプト最適化を組み合わせることで、さらなるパフォーマンス向上が得られ、両者の補完的性質が裏付けられた。
  • Sprigは、知識ベースの質問を除くすべてのタスクタイプでChain-of-Thought(CoT)を上回り、言語理解タスクではProTeGiをも上回った。
  • SprigとProTeGiの組み合わせは、大多数のタスクタイプで最先端のパフォーマンスを上回り、CoTスタイルのコンポーネントが主な貢献要因であった。
  • 最適化済みのシステムプロンプトは、モデルファミリーおよび言語の観点からも効果的に一般化され、多言語環境下ではタスク最適化プロンプトを上回った。
  • システムプロンプト最適化は、モデルの潜在空間における隠れ状態分布を顕著にシフトさせたが、タスクプロンプト最適化は僅かな局所的効果しか示さなかった。
Figure 2: The Sprig pipeline where System Prompt s are iteratively optimized through exploratory edits and promoted across iterations using combined benchmark to rank candidates.
Figure 2: The Sprig pipeline where System Prompt s are iteratively optimized through exploratory edits and promoted across iterations using combined benchmark to rank candidates.

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。