要約
大規模言語モデル(LLM)は、適切な指示プロンプトによって様々な自然言語処理タスクを実行することができる。しかし、効果的なプロンプトを手動で設計することは困難であり、時間がかかる。既存の自動プロンプト最適化手法は柔軟性や効率性に欠ける。本論文では、有限のプロンプト候補から、与えられた入力に対して最適なプロンプトを自動的に選択する効果的なアプローチを提案する。我々のアプローチは3つのステップから構成される:(1)学習データをクラスタリングし、LLMベースのプロンプト生成器を用いて各クラスタのプロンプト候補を生成する。(2)入力との関連性に基づいてプロンプトをランク付けするプロンプト評価器を訓練するために、入力-プロンプト-出力のタプルのデータセットを合成する。(3)プロンプト評価器を用いて、新しい入力に対して最適なプロンプトをテスト時に選択する。このアプローチでは、プロンプトの汎用性と固有性のバランスをとり、リソースを大量に消費する訓練と推論の必要性を排除している。ゼロショットの質問応答データセットにおいて、競争力のある性能を示す:GSM8K、MultiArith、AQuA。
要約(オリジナル)
Large Language Models (LLMs) can perform various natural language processing tasks with suitable instruction prompts. However, designing effective prompts manually is challenging and time-consuming. Existing methods for automatic prompt optimization either lack flexibility or efficiency. In this paper, we propose an effective approach to automatically select the optimal prompt for a given input from a finite set of synthetic candidate prompts. Our approach consists of three steps: (1) clustering the training data and generating candidate prompts for each cluster using an LLM-based prompt generator; (2) synthesizing a dataset of input-prompt-output tuples for training a prompt evaluator to rank the prompts based on their relevance to the input; (3) using the prompt evaluator to select the best prompt for a new input at test time. Our approach balances prompt generality-specificity and eliminates the need for resource-intensive training and inference. It demonstrates competitive performance on zero-shot question-answering datasets: GSM8K, MultiArith, and AQuA.
arxiv情報
| 著者 | Viet-Tung Do,Van-Khanh Hoang,Duy-Hung Nguyen,Shahab Sabahi,Jeff Yang,Hajime Hotta,Minh-Tien Nguyen,Hung Le |
| 発行日 | 2024-04-03 13:20:24+00:00 |
| arxivサイト | arxiv_id(pdf) |