Scale and post-training
Verifiable rewards
Reasoning RL works best when a checker can say whether an answer is right. Exact answers, unit tests and proof checkers give the cleanest reward a language model can get.
Preference models judge tone and helpfulness, but they can be fooled. For math and code, you often do not need a judge at all. You can check the answer. A verifiable reward is a rule that returns 1 for a correct answer and 0 otherwise, with no opinion involved. Reasoning RL leans on these rewards wherever it can.
Concept
A verifier is any program that checks an output against ground truth. Examples are an exact-match check on a final number, a test suite that runs the generated code, or a proof checker.
Verifiable or learned
| Signal | Examples | Pros | Cons |
|---|---|---|---|
| Verifiable, rule-based | Final answer match, code unit tests, required format | Cheap, objective, hard to sweet-talk | Narrow domains, brittle parsers, no partial credit |
| Learned reward model | Preference model, process model | Works on broad tasks such as writing | Hackable, expensive and it drifts |
Use verifiers whenever ground truth exists. Fall back to learned rewards for open-ended quality, and keep a KL leash on the policy so it cannot drift far.
A typical composite reward
Math training usually adds a few terms:
r = r_correct + λ_fmt · r_format − λ_len · length_penaltyr_correctis 1 when the extracted answer matches, and 0 otherwise. Normalize both sides first, so42and42.count as the same answer.r_formatrewards a parseable layout, such as a final line the grader can read.length_penaltydiscourages padding.
Walk through the length pressure with made-up weights, λ_fmt = 0.1 and λ_len of 0.001 per token. A correct, well-formatted answer in 500 tokens scores 1 + 0.1 − 0.5 = 0.6. The same answer in 200 tokens scores 1 + 0.1 − 0.2 = 0.9. The penalty is small enough to keep the reasoning, and large enough to stop waffle.
For code, run hidden unit tests in a sandbox with CPU and memory limits. Reward the pass rate. Flaky tests add noise to the reward, which can look like an algorithm failure.
Example
In a sparse setting, only about 5% of samples pass at the start. A group of 8 samples then has no passing answer about two-thirds of the time (0.95⁸ ≈ 0.66). With no winners, there is nothing to reinforce. Fixes include easier prompts, worked solutions, larger groups and a higher temperature early on.
Common mistakes
- Using a loose parser. The model learns the parser's quirks, such as a format that passes without correct reasoning.
- Ignoring flaky tests. Non-deterministic graders make the reward noisy.
- Rewarding length without a cap. Reward curves can rise while answers get longer and worse. Watch mean length alongside accuracy.
Check yourself
- Why normalize answers before the exact-match check? Answer: so trivial formatting differences do not count as wrong answers.
- When would you use a learned reward? Answer: when no checker exists, such as open-ended writing quality, and then with a KL leash.
Key takeaways
- A verifiable reward checks the answer. It is the cleanest reward a language model can get.
- Reward design combines correctness, format and length, and each term needs care.
- Parsers, flaky tests and unchecked length are the common failure points.
- Learned rewards are a fallback, and they need a KL leash.
Further learning
Next, see how these rewards feed a group-based method in GRPO.
Related
Chain of thought and test-time compute
Chain of thought is intermediate reasoning written before the answer. Test-time compute is the extra inference work spent on a query, and it can buy accuracy on hard problems.
RLHF and preference optimization
How language models learn from human and AI preferences. Supervised fine-tuning, a reward model, a KL-leashed RL step, and DPO as a single-loss alternative. Start here for the map.
RL for reasoning models
How reasoning models learn to think before they answer, using verifiable rewards, GRPO and test-time compute. Start here for the map.