RLVR training: how to write problems a program can check
For experts4 min read
RLVR training works only if each problem has an answer a program can verify without a person. This guide shows how to write problems with that property, which mistakes make a problem unusable, and how to test yours before you submit.
What RLVR training asks of a problem
In RLVR training the model attempts a problem, a program compares its final answer with a stored reference, and the result becomes the reward. For that loop to be fair, the stored answer must be correct, and any correct attempt must match it.
Those two conditions shape everything you write. The Tulu 3 paper introduced the name for this method, and the idea behind it is simple: reward the model only when something other than opinion says the answer is right.
Source: Tulu 3: Pushing Frontiers in Open Language Model Post-Training(opens in a new tab)
The five properties of a good checkable problem
- One answer. If two different values are correct, the checker will fail a good attempt.
- Fixed form. State the format: an integer, a decimal to two places, a word from a list, a date as YYYY-MM-DD.
- Self-contained. All data needed is in the statement. Nothing depends on a web page that may change.
- Solvable by thought. The path is reasoning or calculation, not recall of a trivial fact.
- Stable. The answer does not change with time, place or software version.
A before and after example
| Version | Problem | Issue |
|---|---|---|
| Before | How much does a 10 percent discount save on a 60 dollar jacket? | Two readings: the saving or the new price. Format not stated |
| After | A jacket costs 60 dollars. A 10 percent discount applies. What is the discounted price in dollars? Give a whole number. | One reading, one answer: 54 |
The after version is plainer, and that is the point. Ambiguity that a human would resolve by guessing the intent breaks an automatic check.
Making a harder problem without making it vague
Difficulty should come from the number of steps, not from unclear wording. Chain two or three ideas together. For example, give a train timetable, ask for the time of arrival after a delay in one leg, and ask for the answer in minutes past midnight. Each step is clear, and the combined problem is harder than any single step.
Avoid trick questions. A problem whose only difficulty is a hidden catch teaches the model to look for catches, not to reason. Prefer problems where the work is visible, even if it is long.
Writing the reference solution
- Solve the problem on paper without looking at your drafted answer.
- Write the solution as numbered steps a reviewer can follow in two minutes.
- Compute the final answer a second way, such as estimating, or working backwards.
- State the final answer in exactly the format the problem requests.
- List alternate forms that should be accepted, such as 0.5 and 1/2, if the project allows several.
Rounding and units are the most common sources of silent errors. If the problem says to round to one decimal place, say whether to round half up. If it asks for speed, name the unit.
Traps that make a problem unusable
- A multi-part question with one answer slot. Split it or ask for a single final value.
- Answers that can be guessed. A yes or no question has a fifty percent success rate for a random guess. Ask for a number or name instead.
- Mistakes in the reference. A wrong stored answer punishes correct attempts, which makes the data worse than none.
- Leaked answers. Do not reuse a problem word for word from a textbook or website, since the model may have seen it already.
- Dependence on tools. If the project says no calculator or code, the problem should be doable by hand.
Test your problem before you submit
Give the problem to a friend or colleague who did not see your solution. If they reach a different answer, find out why. Often the statement is ambiguous or you slipped in the arithmetic. Fix the problem, not their answer.
Then check whether a lazy solver could succeed. Does the answer appear in the prompt? Can the final value be found without the main step? If so, redesign the question.
A short example in data form
Teams store a checkable problem as a record with a statement, a reference answer and a note on format. The values below are invented.
{ "problem": "A 480 L tank drains at 12 L a minute. Minutes to empty?", "answer": "40", "format": "integer, minutes", "accepted": ["40", "40.0"]}Notice that the format and the accepted forms sit next to the answer. A checker that compares text will reject 40.0 unless you list it, so state your accepted forms deliberately.
Projects on Curatrain include problems a program can check. You are matched only to jobs whose tests you have passed, so practising this skill before the test is time well spent.