Prompt engineering, as an efficient and effective way to leverage Large Language Models (LLM), has drawn a lot of attention from the research community. The existing research primarily emphasizes the importance of adapting prompts to specific tasks, rather than specific LLMs. However, a good prompt is not solely defined by its wording, but also binds to the nature of the LLM in question. In this work, we first quantitatively demonstrate that different prompts should be adapted to different LLMs to enhance their capabilities across various downstream tasks in NLP. Then we novelly propose a model-adaptive prompt optimizer (MAPO) method that optimizes the original prompts for each specific LLM in downstream tasks. Extensive experiments indicate that the proposed method can effectively refine prompts for an LLM, leading to significant improvements over various downstream tasks.
翻译:提示工程作为一种高效利用大语言模型(LLM)的方法,已引起研究界的广泛关注。现有研究主要强调针对特定任务而非特定LLM进行提示适配的重要性。然而,优秀的提示不仅取决于其措辞,还与目标LLM的特性密切相关。本研究首先通过量化分析证明,为不同LLM适配不同的提示能有效提升其在自然语言处理各类下游任务中的表现。随后,我们创新性地提出一种模型自适应提示优化器(MAPO)方法,该方法可为下游任务中的特定LLM优化原始提示。大量实验表明,所提方法能有效优化针对LLM的提示,从而在多种下游任务上实现显著性能提升。