Large Language Models Prompting With Episodic Memory

要約

プロンプトの最適化は、さまざまな自然言語処理 (NLP) タスク、特にトレーニング サンプルがプロンプトに直接組み込まれる少数ショット学習のシナリオで大規模言語モデル (LLM) のパフォーマンスを向上させるために不可欠です。
ショット数の少ないサンプルでプロンプトを最適化することへの関心が高まっているにもかかわらず、プロンプトを最適化するための既存の方法は、リソースを大量に消費するか、パフォーマンスが不十分であることがよくあります。
この研究では、シンプルで効率的で強力な一般化機能を実証する新しいプロンプト最適化手法である、エピソード記憶による PrOmpting (POEM) を提案します。
私たちは強化学習 (RL) の課題として即時最適化に取り組み、エピソード記憶を使用して入力データの組み合わせ、少数のショットの例の順列、トレーニング中に観察された報酬をアーカイブします。
テスト段階では、エピソード記憶にある上位 k 個の最も類似したトレーニング サンプルから最高の合計報酬を生み出すシーケンスを選択することにより、各テスト クエリのサンプルのシーケンスを最適化します。
私たちの結果は、POEM がさまざまなテキスト分類タスクにおいて TEMPERA や RLPrompt などの最近の技術より 5.3% 以上優れていることを示しています。
さらに、私たちのアプローチは、より広範な言語理解タスクによく適応し、例を順序付けるための従来のヒューリスティックな方法よりも常に優れています。

要約(オリジナル)

Prompt optimization is essential for enhancing the performance of Large Language Models (LLMs) in a range of Natural Language Processing (NLP) tasks, particularly in scenarios of few-shot learning where training examples are incorporated directly into the prompt. Despite the growing interest in optimizing prompts with few-shot examples, existing methods for prompt optimization are often resource-intensive or perform inadequately. In this work, we propose PrOmpting with Episodic Memory (POEM), a novel prompt optimization technique that is simple, efficient, and demonstrates strong generalization capabilities. We approach prompt optimization as a Reinforcement Learning (RL) challenge, using episodic memory to archive combinations of input data, permutations of few-shot examples, and the rewards observed during training. In the testing phase, we optimize the sequence of examples for each test query by selecting the sequence that yields the highest total rewards from the top-k most similar training examples in the episodic memory. Our results show that POEM outperforms recent techniques like TEMPERA and RLPrompt by over 5.3% in various text classification tasks. Furthermore, our approach adapts well to broader language understanding tasks, consistently outperforming conventional heuristic methods for ordering examples.

arxiv情報

著者 Dai Do,Quan Tran,Svetha Venkatesh,Hung Le
発行日 2024-08-14 11:19:28+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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