Abstract
Large language models (LLMs) often fail to reach their full potential due to suboptimal user prompts. We present Prompt-R1, a collaborative framework that employs a small-scale LLM as an "Agent" to iteratively prompt a larger, frozen "Environment" LLM. Trained via end-to-end reinforcement learning with a double-constrained reward system, the Prompt-R1 Agent learns to navigate multi-turn interactions to extract high-quality reasoning and answers. Our results demonstrate significant performance improvements across diverse reasoning tasks and show that prompting strategies learned on one model effectively transfer to others, including state-of-the-art closed-source models.
Introduction
The performance of large language models is heavily dependent on prompt quality. While techniques like Chain-of-Thought (CoT) and Automatic Prompt Optimization (APO) have made strides, they often lack the dynamic adaptability required for complex, multi-step reasoning. Conversely, fine-tuning massive models is computationally prohibitive. Prompt-R1 addresses this by asking: can a small, specialized model act as a professional "prompt engineer" to dynamically interact with a powerful, frozen model?
Methodology: The Prompt-R1 Framework
Prompt-R1 treats a small-scale LLM (e.g., Qwen3-4B) as an Agent and a large-scale LLM (e.g., GPT-4o-mini) as the Environment. The interaction follows a multi-turn cycle: the Agent generates internal reasoning (<think>) and an interaction prompt, receives feedback from the Environment, and iterates until a final answer is produced.
To optimize the Agent, we utilize Group Relative Policy Optimization (GRPO) with a gated reward mechanism. To prevent reward hacking, the Agent only receives an Answer Reward for correctness if it first satisfies a Format Reward, ensuring it produces valid reasoning steps and parseable prompts. This "plug-and-play" architecture allows the Agent to be trained on open-source models and deployed with any large-scale API.
Experimental Results
We evaluated Prompt-R1 across 12 datasets covering multi-hop reasoning (e.g., 2WikiMultihopQA), mathematics (GSM8K), and general QA.
Performance Gains
Prompt-R1 significantly outperforms standalone baselines and existing prompt optimization techniques. For instance, it achieved a +14.85% improvement in Exact Match (EM) scores on 2WikiMultihopQA and +14.07% on GSM8K compared to a standalone GPT-4o-mini.
Generalization and Transferability
A key finding is the framework's robustness. The Agent's learned prompting skills generalize to out-of-distribution (OOD) datasets, boosting average EM from 40.88% to 47.39%. Furthermore, an Agent trained with one model can successfully guide others, such as Gemini-2.5-flash or DeepSeek-V3, demonstrating that effective communication strategies are model-agnostic.
Conclusion and Future Work
Prompt-R1 demonstrates that collaborative, multi-turn interaction between asymmetric models is a highly efficient alternative to scaling or fine-tuning. While the current framework introduces some latency due to sequential API calls, future work will focus on context compression and advanced memory mechanisms to optimize token usage and maintain coherence over longer trajectories.
Summary updated