Reinforcement learning with verifiable rewards (RLVR) trains an LLM with automatically checkable correctness signals instead of human preference labels or a learned reward model. A model generates a response, a deterministic verifier assigns a reward, and the training objective updates the model directly. section 6.1.2
For a math task, a verifier compares the generated final answer with ground truth and returns 1 for correct or 0 for incorrect. RLVR therefore collapses the two-stage RLHF pipeline into one generation, verification, and update loop. section 6.1.2
A practical RLVR implementation combines these components:
- Define a task with an automatic correctness checker, such as mathematical answer verification. section 6.1.2
- Sample multiple responses for each prompt and compare their rewards within a group. section 6.0 section 6.2
- Use GRPO to convert the group-relative signal into a loss and update the LLM weights. section 6.2
- Run the resulting loss inside a conventional PyTorch loop with gradient reset, backpropagation, optimizer steps, logging, and checkpoints. section 6.11
Math verification and code execution
A math verifier can label a generated solution correct when its final answer matches ground truth. Code tasks can use compilation and execution as binary checks, but secure sandboxing is required and code execution is not implemented here. section 6.1.2
Figure 6.6 Overview of RLVR. The LLM generates a response that is evaluated by a deterministic verifier, such as the math verifier from chapter 3, which assigns a correctness label that’s used as a reward signal within an RL objective to update the model.
Use the workflow diagram to trace generation, deterministic verification, reward assignment, and policy updating. section 6.1.2

