Rejection sampling
In AI training, rejection sampling means generating several answers to each prompt, scoring them and keeping only the best or correct ones as new training data.
The name comes from statistics. To draw samples from a distribution that is hard to sample directly, you draw from an easier one and throw away candidates according to a rule, so that the ones you keep follow the distribution you wanted. The classic picture is throwing darts at a board and discarding any that land outside a curve. The technique was used by John von Neumann and traces back to Buffon's needle experiment.
In language model training the idea is simpler and more practical. For each prompt, the current model generates several answers. A reward model or an automatic checker scores them, the best are kept and the rest discarded, and the model is fine-tuned on what survives. Meta's Llama 2 paper of July 2023 described sampling K outputs per prompt and keeping the highest-scoring one as the new gold standard; its first rounds of RLHF used only this method, before PPO was applied on top.
It has since become a routine step in technical reports. For Llama 3, Meta sampled typically between 10 and 30 outputs per prompt from its latest chat model and kept the best for its fine-tuning data. DeepSeek's R1 paper, first posted in January 2025, generated reasoning traces from a reinforcement-learning checkpoint, kept only those that reached correct answers and collected about 600,000 reasoning examples this way.
The appeal is that it turns reinforcement learning into ordinary supervised fine-tuning on filtered data, which is cheaper and more stable. Llama 2's authors contrasted it with PPO: rejection sampling explores many answers per prompt, while PPO takes one answer at a time but updates the model after each step. The ceiling is set by the filter. The method can only keep what the model already produces some of the time, and if the reward model can be fooled, it keeps flawed answers that merely look good. In practice, when a report says data was rejection sampled, it means the model's own outputs, selected by a scorer, were fed back in as training examples.
It is generating multiple answers per prompt, scoring them with a reward model or a correctness check, and keeping only the best ones to fine-tune the model on. Meta's Llama 2 and Llama 3 and DeepSeek-R1 all used it in post-training. They use the same filter at different times. Best-of-n picks the best of several answers when responding to a user, while rejection sampling keeps the best answers as training data so the model learns to produce them directly. Rejection sampling samples many answers per prompt from a fixed model and then fine-tunes on the winners. PPO samples one answer at a time and updates the model continuously. Meta's Llama 2 team used both, applying PPO on top of a rejection-sampling checkpoint. Yes. The training examples are written by a model rather than people, then filtered by a scorer, so rejection sampling is one of the main ways labs generate synthetic data for post-training.Common questions
What is rejection sampling in LLM training?
What is the difference between rejection sampling and best-of-n sampling?
How does rejection sampling compare with PPO?
Is rejection-sampled data synthetic data?
Search for "rejection sampling fine-tuning", "rejection sampling LLM post-training" or "best-of-n vs rejection sampling" to see how labs use it. The clearest sources are technical reports from model developers on arXiv, which describe how many samples were drawn and how they were scored, and statistics textbooks or encyclopedia articles for the original method. Pay attention to what did the scoring, since a filter is only as reliable as its reward model or checker.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.