arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.08189cs.AIcs.CLcs.LG
收藏

PRewrite:基于强化学习的提示词重写

PRewrite: Prompt Rewriting with Reinforcement Learning

Google DeepMind(谷歌DeepMind);University of Michigan(密歇根大学)

Weize Kong, Spurthi Amba Hombaiah, Mingyang Zhang, Qiaozhu Mei, Michael Bendersky

AI总结:

本文提出PRewrite方法,利用强化学习训练大语言模型自动重写欠优化提示词,以提升下游任务性能,并在多个基准数据集上验证了其有效性。

摘要:

提示工程对于基于大语言模型(LLM)的应用开发至关重要。然而,它通常以“试错”方式手动完成,既耗时、低效又难以达到最优。即使对于看似效果良好的提示词,也始终存在一个挥之不去的问题:能否通过进一步修改使提示词变得更好?为了解决这些问题,本文研究了自动化提示工程。具体而言,我们提出了PRewrite,一种将欠优化的提示词自动重写为更有效提示词的方法。我们使用一个大语言模型来实例化提示词重写器。该重写器LLM通过强化学习进行训练,以优化在给定下游任务上的性能。我们在多个基准数据集上进行了实验,结果证明了PRewrite的有效性。

英文摘要:

Prompt engineering is critical for the development of LLM-based applications. However, it is usually done manually in a "trial and error" fashion that can be time consuming, ineffective, and sub-optimal. Even for the prompts which seemingly work well, there is always a lingering question: can the prompts be made better with further modifications? To address these problems, we investigate automated prompt engineering in this paper. Specifically, we propose PRewrite, an automated method to rewrite an under-optimized prompt to a more effective prompt. We instantiate the prompt rewriter using a LLM. The rewriter LLM is trained using reinforcement learning to optimize the performance on a given downstream task. We conduct experiments on diverse benchmark datasets, which demonstrates the effectiveness of PRewrite.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑