PRewrite: Prompt Rewriting with Reinforcement Learning

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Kong, Weize, Hombaiah, Spurthi Amba, Zhang, Mingyang, Mei, Qiaozhu, Bendersky, Michael
Formato: Preprint
Publicado: 2024
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866916280785698816
author Kong, Weize
Hombaiah, Spurthi Amba
Zhang, Mingyang
Mei, Qiaozhu
Bendersky, Michael
author_facet Kong, Weize
Hombaiah, Spurthi Amba
Zhang, Mingyang
Mei, Qiaozhu
Bendersky, Michael
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2401_08189
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle PRewrite: Prompt Rewriting with Reinforcement Learning
Kong, Weize
Hombaiah, Spurthi Amba
Zhang, Mingyang
Mei, Qiaozhu
Bendersky, Michael
Artificial Intelligence
Computation and Language
Machine Learning
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.
title PRewrite: Prompt Rewriting with Reinforcement Learning
topic Artificial Intelligence
Computation and Language
Machine Learning
url https://arxiv.org/abs/2401.08189