This repository contains the official implementation of the paper
PRL: Prompts from Reinforcement Learning
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.
PRL is based on the ms-swift framework.
Please follow the environment setup instructions provided in that repository.
You also need to download the benchmark datasets (Classification, Summarization, Simplification) from
👉 https://nlp.cs.princeton.edu/projects/lm-bff/datasets.tar
To train PRL on the MR dataset:
./scripts/mr/mr_qwen_qwen.sh
To run PRL on summarization tasks:
./scripts/sum/sum_qwen_qwen.sh
To evaluate PRL on simplification:
./scripts/sim/sim_qwen_qwen.sh
If you find our work useful, please consider citing:
@article{batorski2025prl,
title = {PRL: Prompts from Reinforcement Learning},
author = {Batorski, Pawe{\l} and Kosmala, Adrian and Swoboda, Paul},
journal = {arXiv preprint arXiv:2505.14412},
year = {2025}
}
This work builds on the ms-swift framework.
We thank the authors of APE, EvoPrompt, and APO for their inspiring contributions to the field of automated prompt generation.
3 commits
Python
99.4%
This repository contains the official implementation of the paper
PRL: Prompts from Reinforcement Learning
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.
PRL is based on the ms-swift framework.
Please follow the environment setup instructions provided in that repository.
You also need to download the benchmark datasets (Classification, Summarization, Simplification) from
👉 https://nlp.cs.princeton.edu/projects/lm-bff/datasets.tar
To train PRL on the MR dataset:
./scripts/mr/mr_qwen_qwen.sh
To run PRL on summarization tasks:
./scripts/sum/sum_qwen_qwen.sh
To evaluate PRL on simplification:
./scripts/sim/sim_qwen_qwen.sh
If you find our work useful, please consider citing:
@article{batorski2025prl,
title = {PRL: Prompts from Reinforcement Learning},
author = {Batorski, Pawe{\l} and Kosmala, Adrian and Swoboda, Paul},
journal = {arXiv preprint arXiv:2505.14412},
year = {2025}
}
This work builds on the ms-swift framework.
We thank the authors of APE, EvoPrompt, and APO for their inspiring contributions to the field of automated prompt generation.
3 commits
Python
99.4%