Instance Needs More Care: Rewriting Prompts for Instances Yields Better Zero-Shot Performance

要約

大規模言語モデル(LLM)がゼロショットでタスクを実行できるようにすることは、タスク固有のアノテーションが不要という省力化により、魅力的な目標となっている。LLMのゼロショットのパフォーマンスを向上させるために、先行研究はより効果的なタスク指示(例えば「ステップバイステップで考えよう」)の考案に焦点を当ててきた。しかし、我々は、LLMがゼロショットで正しく問題を解くためには、個々のテストインスタンスに対して、より注意深く設計され、カスタマイズされた命令が必要であると主張する。そのため、我々はPRoMPTdを提案する。PRoMPTdは、個々のテスト入力に対するタスクプロンプトを、より具体的で曖昧さのない完全なものに書き換え、タスクLLMにより良いガイダンスを提供するアプローチである。タスクLLMとしてGPT-4を用い、算数、論理推論、コード生成を含む8つのデータセットでPRoMPTdを評価した。その結果、HumanEvalの複雑なMATHタスクで約10%、コード生成タスクで約5% の絶対値の改善を達成し、従来のゼロショット手法を上回った。さらに、プロンプトを書き換えることで、LLMが各テストインスタンスをどのように解決するかの解釈可能性を向上させることができ、敵対的プロンプトに対する防御メカニズムとして活用できる可能性があることも示した。ソースコードとデータセットは https://github.com/salokr/PRoMPTd から入手できる。

要約(オリジナル)

Enabling large language models (LLMs) to perform tasks in zero-shot has been an appealing goal owing to its labor-saving (i.e., requiring no task-specific annotations); as such, zero-shot prompting approaches also enjoy better task generalizability. To improve LLMs’ zero-shot performance, prior work has focused on devising more effective task instructions (e.g., “let’s think step by step” ). However, we argue that, in order for an LLM to solve them correctly in zero-shot, individual test instances need more carefully designed and customized instructions. To this end, we propose PRoMPTd, an approach that rewrites the task prompt for each individual test input to be more specific, unambiguous, and complete, so as to provide better guidance to the task LLM. We evaluated PRoMPTd on eight datasets covering tasks including arithmetics, logical reasoning, and code generation, using GPT-4 as the task LLM. Notably, \algoname achieves an absolute improvement of around 10\% on the complex MATH dataset and 5\% on the code generation task on HumanEval, outperforming conventional zero-shot methods. In addition, we also showed that the rewritten prompt can provide better interpretability of how the LLM resolves each test instance, which can potentially be leveraged as a defense mechanism against adversarial prompting. The source code and dataset can be obtained from https://github.com/salokr/PRoMPTd

arxiv情報

著者 Saurabh Srivastava,Chengyue Huang,Weiguo Fan,Ziyu Yao
発行日 2023-10-03 14:51:34+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, DeepL

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