# What Is RL from Verifiable Rewards?

> What RL from verifiable rewards (RLVR) is, why a checker can grade maths and code answers, and where it breaks, for your AI interview.

**In short:** RL from verifiable rewards trains a model with reinforcement learning, but the reward comes from a checker that can tell right from wrong, such as an answer key or passing unit tests. It works where code can check the answer, and it fails where quality is a matter of opinion.

AI and LLM interview question Q292, Fine-tuning and adaptation. Advanced, common (our estimate). From Venkat R. Murty's free Interview Kit: https://designervenkat.online/interview/ai/what-is-rl-from-verifiable-rewards

## Say it in 30 seconds

RLVR is reinforcement learning where a checker sets the reward, with no person or judge model involved. If the maths answer matches the answer key, or the code passes its tests, the model gets one. Otherwise it gets zero, and over many tries it learns the answers the checker accepts. It works well for maths, code and strict formats. It can't grade tone or advice, and a checker can be gamed, so I'd test it hard.

## Say it in 2 minutes

Reinforcement learning trains a model by rewarding good results. RL from verifiable rewards keeps that idea and changes where the reward comes from. A reward model guesses how good an answer is. A checker decides whether it is right, using an answer key, a rule or a set of tests.

Here is a case I'd use. A bank's risk team wants a model that writes SQL for its loss reports. The checker runs each query on a test copy of the database and compares the rows with the expected rows. A match gives a reward of one, and anything else gives zero. Over many tries the model learns to write queries that return the right rows.

The limits matter. It only works where a program can settle the answer, so it suits maths, code with tests, SQL results and strict formats. Tone, advice and summaries need a judge model or a person. A checker can also be gamed, so it has to be tight and tested against tricks. DeepSeek-R1-Zero used rule-based rewards for maths, coding and logical reasoning, and DeepSeek avoided learned reward models on reasoning tasks because of reward hacking.

So my answer is short: I ask whether a machine can verify the output. If it can, I reward only verified answers and test the checker hard. If it cannot, I use a judge and keep a person on the risky cases.

## What is RL from verifiable rewards, in plain words?

Reinforcement learning, in plain words, is learning by reward. The model tries something, gets a score, and changes so that high-scoring tries become more likely. RL from verifiable rewards keeps that loop and changes one thing: the score comes from a checker that can tell whether the answer is right.

Think of an insurer's claims desk. A junior drafts a payout for a car claim, and the policy rulebook recalculates it. If the figures match, the draft goes through. The rulebook decides, so nobody has to guess how good the draft looks. RLVR applies the same idea to a model.

In the AI version, the model writes a payout figure for a motor claim, code recalculates it from the policy rules, and the model is rewarded only when the two agree.

- **Reinforcement learning:** Training by reward: good tries are rewarded, so the model does more of them.
- **Verifiable reward:** A score set by code that can check the answer, such as an answer key or a test suite.
- **Checker:** The code that runs the check and returns the reward, usually one or zero.
- **Reward model:** A model trained to guess how good an answer is, often from human preferences. RLVR avoids it.

## How does the training loop work?

Each round has four steps. The chart shows the loop, and the steps below say what happens at each arrow.

*Diagram, One RLVR training loop: A task goes to the model, which writes several answers. Code checks each one and gives a reward of one or zero, and the model learns from that score. No person or judge model sits in the loop.*
1. The task goes in, with an answer key or tests behind it.
2. The model's answer goes to the checker.
3. The checker finds the answer right, so the reward is one.
4. The checker finds it wrong, so the reward is zero.
5. Weights move toward the answers that got a one.
6. A zero counts against that try, compared with the others.

1. **Pick a task with a known answer:** A maths problem, a function to write or a SQL question, each with an answer key or tests.
2. **Sample several tries:** The model writes a handful of answers to the same prompt, so they can be compared with each other.
3. **Run the checker:** Code compares each answer with the key or runs the tests. A pass gives one, a fail gives zero.
4. **Nudge the model:** The training step makes the higher-scoring tries more likely next time. The loop then repeats on new tasks.

## What does a checker look like in code?

Here is a small version for a claim payout. The rule is written once in code, and the model's proposed figure is checked against it. The numbers are made up, but the shape is what a real checker does.

```python
# A simplified checker for a motor claim payout. Code works out the right amount; the model only proposes one.
import re

def payout(claim, deductible, cap):
    # The policy rule, written once in code: pay the claim less the deductible, up to the cap.
    return min(max(claim - deductible, 0), cap)

def reward(model_text, expected):
    # A verifiable reward: one if the stated amount matches the rule, zero otherwise.
    match = re.search(r"payout:\s*([\d,]+(?:\.\d{2})?)", model_text, re.IGNORECASE)
    if not match:
        return 0.0  # no clear figure earns nothing
    given = float(match.group(1).replace(",", ""))
    return 1.0 if abs(given - expected) < 0.005 else 0.0

expected = payout(8450.00, 500.00, 6000.00)
print("expected payout:", expected)
print(reward("Payout: 6,000.00 after the cap.", expected))
print(reward("Payout: 7,950.00", expected))
print(reward("The claim should be paid in full.", expected))
```

Output:

```text
expected payout: 6000.0
1.0
0.0
0.0
```

The model is never asked whether its answer sounds right. It earns a reward only when the rule agrees, so a confident sentence without the right figure scores zero.

## Where does it work, and where does it break?

RLVR suits tasks where a program can settle the answer: maths with a final number, code that passes tests, SQL that returns the right rows, and instructions with a rule a program can count. The Tulu 3 paper used it for maths and for precise instruction following, which it can check automatically with heuristics.

*Diagram, Where a checker can grade the answer: Tasks with one checkable result suit RLVR, such as maths, code with tests and SQL. Tone and the quality of writing have no checker, so a judge or a person has to score them.*
1. A checker can grade these, so the reward is one or zero.
2. No checker exists, so a judge or a person scores them.

DeepSeek-R1-Zero used rule-based rewards for maths, coding and logical reasoning, and its authors said the success of pure RL depends on reliable reward signals.

> "We select tasks with verifiable outcomes, such as mathematical problem-solving, and only provide rewards when the model's generations are verified to be correct." (Tulu 3 paper)
>
> "This decision is predicated on our observation that neural reward models are susceptible to reward hacking during large-scale reinforcement learning." (DeepSeek-R1 paper)

The catch is reward hacking. A model can find a blind spot in the checker and collect rewards without solving the task. DeepSeek's paper defines it as a model exploiting flaws or biases in the reward function, which is why its team avoided learned reward models on reasoning tasks.

> **Tip:** Asked what RLVR cannot do: it cannot grade taste or judgement. Say it needs a checkable answer, that a judge model or a person takes over for the rest, and that a checker should be tested against tricks.

## What does the interviewer want to hear?

**A strong answer covers**

- [ ] A plain definition: reinforcement learning where code checks the answer and sets the reward.
- [ ] The difference from RLHF (reinforcement learning from human feedback): a checker instead of a reward model learned from human preferences.
- [ ] Where it works: maths, code with tests, SQL results and strict formats.
- [ ] Its risk: the model can game the checker, so the checker has to be tight.
- [ ] The honest limit: no checker, no RLVR. Tone and advice need a judge or a person.
- [ ] An example from your own work, with the checker you would build for it.

**Common traps**

- Trap: "A reward model can check any answer." Better: A reward model is a learned guess. RLVR's point is a checker that can prove the answer right or wrong.
- Trap: "Any reinforcement learning with a score is RLVR." Better: Only when the score comes from a verifiable check. A human rating or a judge model's score is a different method.
- Trap: "A tight checker makes the model safe." Better: A checker can still be gamed. Test it against tricks, and keep a person on risky outputs.

## Can you spot the verifiable reward?

**Spot the reward:** A support team wants RLVR for its refund bot. Which reward can a checker verify?

A. reward = judge_model.score(reply)  # a second model rates the reply from 1 to 10
B. reward = 1.0 if refund_amount == policy_amount(order) else 0.0
C. reward = human_rater.stars(reply) / 5  # a person rates the reply
D. reward = min(len(reply) / 500, 1.0)  # longer replies score higher

**Answer:** B. The second option checks the refund against the policy in code, so the reward is one or zero and nobody has to guess. The others are a judge model, a human rater, or a length rule, which a model can game by writing more.

**Quick check:** A bank wants a model that writes SQL for its loss reports. Which reward suits RLVR?

A. A reviewer scores each query out of 10 for style
B. The query runs on a test copy, and the reward is one only if the rows match the expected rows
C. A second model rates how clean the SQL looks
D. The reward is higher for longer queries

**Answer:** B. Running the query and matching the rows is a check code can make, so the reward is verifiable. Style scores and length are judgements or easy tricks.

## Can you answer these from memory?

**Flash cards**

- **What is RLVR?** Reinforcement learning where a checker that can verify the answer sets the reward.
- **What reward does it give?** A fixed reward for a verified right answer, usually one. Nothing is rewarded for a wrong one.
- **Where does it work best?** Maths, code with tests, SQL results and strict formats: anything a program can check.
- **How is it different from RLHF?** RLHF uses a reward model learned from human preferences. RLVR uses a checker.
- **What is the main risk?** Reward hacking: the model finds a blind spot in the checker and scores without solving.
- **Does it fix everything?** No. Tone, advice and summaries have no checker, so a judge or a person is still needed.

## Likely follow-up questions

- Q288 What is RLHF? https://designervenkat.online/interview/ai/what-is-rlhf
- Q289 What is a reward model? https://designervenkat.online/interview/ai/what-is-a-reward-model
- Q290 What is PPO in RLHF, simply? (full answer coming)
- Q291 What is DPO? https://designervenkat.online/interview/ai/what-is-dpo
- Q241 What is reward hacking? (full answer coming)
