Abstract
Effective prompt engineering remains a central challenge in fully harnessing the capabilities of LLMs. While well-designed prompts can dramatically enhance performance, crafting them typically demands expert intuition and a nuanced understanding of the task. Moreover, the most impactful prompts often hinge on subtle semantic cues, ones that may elude human perception but are crucial for guiding LLM behavior. In this paper, we introduce PRL (Prompts from Reinforcement Learning), a novel RL-based approach for automatic prompt generation. Unlike previous methods, PRL can produce novel few-shot examples that were not seen during training. Our approach achieves state-of-the-art performance across a range of benchmarks, including text classification, simplification, and summarization. On the classification task, it surpasses prior methods by 2.58% over APE and 1.00% over EvoPrompt. Additionally, it improves the average ROUGE scores on the summarization task by 4.32 over APE and by 2.12 over EvoPrompt and the SARI score on simplification by 6.93 over APE and by 6.01 over EvoPrompt. Our code is available at this https URL .
Abstract (translated)
有效的提示工程仍然是充分发挥大型语言模型(LLM)能力的核心挑战。虽然设计良好的提示可以显著提升性能,但制作这些提示通常需要专家的直觉和对任务的细致理解。更重要的是,最具影响力的提示往往依赖于细微的语言线索,这类线索可能不易被人类察觉,但却对于指导LLM的行为至关重要。在这篇论文中,我们介绍了PRL(来自强化学习的Prompt),这是一种基于强化学习的自动提示生成新方法。不同于以往的方法,PRL能够产生在训练过程中未见过的新颖少量样本示例。我们的方法在文本分类、简化和摘要等不同基准测试上均取得了最先进的性能表现。在分类任务上,它比APE高出2.58%,比EvoPrompt高出1%;在摘要生成任务中,平均ROUGE得分比APE高4.32,比EvoPrompt高2.12;而在简化任务中,SARI评分比APE高6.93,比EvoPrompt高6.01。我们的代码可在[这里](https://this https URL)获取。
URL
https://arxiv.org/abs/2505.14412