# What is Rejection Sampling? Definition & Technical Mechanics

> **Source:** [SPIDITS AI AI Glossary](https://spidits.com/ai-glossary)  
> **Category:** Model Training  
> **Canonical Citation:** [https://spidits.com/ai-glossary/rejection-sampling](https://spidits.com/ai-glossary/rejection-sampling)

## Definition
Rejection Sampling (in LLMs) is a data curation technique where a generator model produces multiple candidate answers, and a separate evaluator model filters out low-quality outputs. The remaining high-quality responses are then used for supervised fine-tuning.

## Architectural Mechanics & Deep Dive
Rejection sampling is a dataset purification technique widely used in alignment training (SFT and RLHF). A source model generates multiple candidate completions for a set of instructions, and a separate evaluator (or reward model) filters out low-scoring or incorrect responses. The remaining top-quality examples are saved to form clean demonstration datasets, bootstrapping model capabilities without human labeling.

## Industry Applications & Real-World Use Cases
High-quality instruction dataset creation, code correctness filtering, and model bootstrapping

## Frequently Asked Questions

### How does rejection sampling improve LLM training?
It filters out poor reasoning steps or incorrect outputs, ensuring the model only learns from high-quality, correct demonstrations.

### What is another name for this process?
It is often referred to as best-of-N sampling or self-training with selection.

## Related Terminology
- [fine-tuning](https://spidits.com/ai-glossary/fine-tuning)
- [supervised-learning](https://spidits.com/ai-glossary/supervised-learning)
- [synthetic-data](https://spidits.com/ai-glossary/synthetic-data)

---
*From the SPIDITS AI Knowledge Base (300+ terms indexed). Explore full technical definitions: [https://spidits.com/ai-glossary](https://spidits.com/ai-glossary)*
