Discover and explore top open-source AI tools and projects—updated daily.
RL-based prompt optimization framework, per research paper
Top 79.1% on SourcePulse
This repository provides the codebase for RLPrompt, a framework that optimizes discrete text prompts for pre-trained language models using reinforcement learning. It is intended for researchers and practitioners in NLP who want to improve LM performance on various tasks without fine-tuning the models themselves. The key benefit is the creation of lightweight, interpretable, and transferable discrete prompts.
How It Works
RLPrompt formulates discrete prompt optimization as a reinforcement learning problem. A policy network is trained to generate prompts, which are then used to steer pre-trained LMs. The generated prompts are optimized based on a defined reward function, offering an alternative to gradient-based soft prompt tuning or heuristic-based discrete prompt search.
Quick Start & Requirements
pip install -e .
examples/
directory.Highlighted Details
Maintenance & Community
The repository is associated with the RLPrompt paper. Further updates are planned.
Licensing & Compatibility
The repository does not explicitly state a license in the provided README.
Limitations & Caveats
The README does not specify any limitations or caveats regarding the framework's usage or performance.
1 year ago
Inactive