Designing verifiable rewards for generated answers

← Back to Blog & Articles

For some tasks the reward does not have to be learned.

A program can check whether an arithmetic answer equals the known value, whether a function passes its tests, whether a string matches a required format. Such a program, a verifier, turns a response into a reward at the cost of running it. This removes a learned reward model, with its approximation error, but it does not remove the question of whether the reward is right. A verifier is a measuring instrument with a false-positive rate and a false-negative rate, and an optimizer pushes on both. this article treats a verifier as a noisy channel between the true objective and the reward the policy sees. It derives what that channel does to the policy gradient (a rescaling when the errors do not depend on the response, a different objective when they do), gives the exact condition under which optimizing a verifier optimizes the task, analyzes partial credit, format rewards and sparse rewards, builds two verifiers (an arithmetic expression checker and an isolated unit-test runner), and trains a small policy against noisy, hackable and shaped verifiers.

  • Model a verifier by its true-positive and false-positive rates, and compute its precision as a function of the policy’s success probability.
  • Derive the policy gradient of the verifier’s reward: show that response-independent errors only rescale it, and that response-dependent false positives add the gradient of the probability of the hacked feature.
  • State and prove the condition under which maximizing the verifier’s reward maximizes the true reward.
  • Analyze partial credit, format rewards and sparse rewards, and build a safe expression evaluator and an isolated test runner with held-out tests.

Continue with the book

Explore the full treatment, worked examples, and exercises in RL for LLM Agents and Reasoning Models.


Companion article for RL for LLM Agents and Reasoning Models, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.

Scroll to Top