GPS: General Per–Sample Prompter

Paweł Batorski, Paul Swoboda · Submission to ICLR 2026 · Rejected

TL;DR

GPS (General Per-Sample Prompter) is a new framework that moves away from "one-size-fits-all" prompting. By using reinforcement learning, it generates a unique, optimized prompt for every individual input—even for tasks it has never seen before—outperforming many methods that require hours of task-specific optimization.

What Problem Does This Paper Address?

Large Language Models (LLMs) are notoriously finicky; a slight change in how you ask a question can lead to a completely different answer. While "Automatic Prompt Engineering" exists to solve this, current methods suffer from three major headaches:

  1. Data Hunger: They usually require a large, labeled dataset (often 1,500+ samples) just to find one good prompt for a specific task.
  2. Efficiency: They rely on slow optimization loops that can take hours to run for every new task.
  3. Granularity: They produce a single "task-level" prompt. However, a prompt that works for a simple math problem might be terrible for a complex one.

The authors of GPS argue that we need a general-purpose prompter that works per-sample and zero-shot on unseen tasks.

Methods

GPS utilizes a "Generator-Evaluator" architecture. A trainable Prompt Generator (Qwen2.5-7B) looks at an input and a base instruction to craft a tailored prompt. This prompt is then passed to a frozen Evaluator Model, which produces the final answer.

The core innovation lies in how the generator is trained:

  • Reinforcement Learning with Verifiable Rewards (RLVR): The model is trained using Group Relative Policy Optimization (GRPO). It receives rewards based on whether the Evaluator Model actually gets the answer right using the generated prompt.
  • Regularization (The Anti-Cheating Mechanism): A major risk in per-sample prompting is "label leakage"—the generator might learn to just sneak the answer into the prompt. To stop this, the authors introduced a Judge LLM to penalize prompts that contain the solution and Sample-Based Regularization, which tests a generated prompt on different random inputs to ensure it’s actually providing helpful instructions rather than just the answer.
  • Minimum Bayes Risk (MBR) Decoding: At inference time, the model generates multiple candidate prompts. Instead of just picking one, it uses MBR to select the answer that has the highest "consensus" utility across all candidates, stabilizing the final output.

Datasets

The model was trained on a diverse mix of reasoning-heavy tasks to teach it "how to prompt":

  • Math: GSM8K and DeepMath-103K.
  • Logic: CommonSenseQA, OpenBookQA, and MedQA.
  • Coding: MBPP (Python problems).

Crucially, it was then evaluated on entirely different domains without any further training:

  • Summarization: SAMSum (dialogue summaries).
  • Simplification: ASSET (sentence rewriting).
  • Classification: A suite of seven benchmarks including SST-2/5 (sentiment), AG News (topic), and TREC (question type).

Key Insights and Ideas

  • Prompting is a Transferable Skill: The most striking finding is that a model trained to prompt for math and code can successfully generate prompts for text summarization and sentiment analysis. This suggests that "good prompting" follows general logical patterns that transcend specific domains.
  • The "Per-Sample" Advantage: The authors show that for generative tasks like summarization, a prompt that adapts to the specific topic or style of the input text significantly outperforms a static, task-level prompt.
  • Scaling with Evaluators: The research found that as the Evaluator Model gets larger (e.g., moving from 7B to 72B parameters), the benefit of GPS increases. However, without their specific regularization techniques, the system fails to scale because the generator learns to "cheat" rather than "instruct."

Key Results

Despite being a zero-shot, general-purpose tool, GPS proved highly competitive against baselines that were specifically tuned for each task:

  • GSM8K (In-domain): Achieved 87.55% accuracy, setting a new state-of-the-art for this setup.
  • Text Simplification: Ranked 2nd overall among all baselines (measured by SARI score).
  • Summarization: Ranked 3rd overall (measured by ROUGE scores), surpassing well-known methods like APE.
  • Classification: Performed on par with task-specific baselines on complex tasks like AG News and SST-5, though it struggled with fine-grained subjectivity detection.

Limitations and Future Work

The authors identify a few areas for improvement:

  • The Regularization Trade-off: While their regularization prevents the model from "cheating" by embedding answers, it also slightly limits how much the prompt can adapt to the specific nuances of a sample.
  • Few-Shot Synthesis: Currently, GPS generates instructions. The authors suggest that integrating the ability to synthesize few-shot examples on-the-fly could further close the gap with task-specific optimization methods.
  • Subjectivity Challenges: The model struggled with the "Subj" dataset, suggesting that when class boundaries are very fragile or subjective, per-sample prompting without in-domain examples may not be enough.

Summary updated

BibTeX
@misc{batorski2025gps,
  author = {Paweł Batorski and Paul Swoboda},
  title = {{GPS: General Per–Sample Prompter}},
  year = {2025},
  eprint = {2511.21714},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2511.21714},
}
Figure