Coders In Hoods
  • Courses
  • Roles
  • Blog
  • Setup

Coders In Hoods AI Academy

Every course is free. Sign in to start, and your progress, quiz scores and bookmarks follow you.

AI Academy

  • Courses
  • Paths
  • Setup guides
  • How we teach

Role roadmaps

  • AI Engineer
  • Forward Deployed Engineer
  • Machine Learning Engineer
  • All roles

Coders In Hoods

  • The agency
  • Coaching for teams
  • Blog
  • LinkedIn
  • X (Twitter)

Contact

codersinhoods@gmail.com

© Coders In Hoods · since 2019

Course overview

Fine-Tuning and RL for Agents

Free · sign in to start and track progress

1 · Decide and prepare

  • 1Prompt, optimise or train?
  • 2Training data from traces

2 · Supervised and preference fine-tuning

  • 3SFT with LoRA on a free GPU
  • 4Preference optimisation

3 · Reinforcement learning for agents

  • 5GRPO in practice
  • 6Designing rewards

    Exercise answers

    • Answer: Build and validate a composite triage reward
    • Answer: Compare a relative judge with a pointwise one
  • 7Multi-turn RL environments
  • 8Reward hacking, regressions and shipping
CapstoneTrain a triage model, then decide whether to ship itReference implementation

Module 3 · Reinforcement learning for agents · Lesson 6

Designing rewards

Turn code graders and a calibrated judge into a reward a policy can't cheaply satisfy, with weights priced from what each error costs, rubric and relative-ranking judges, and tests of the reward itself before any GPU time is spent.

80 min 2 videos 3 exercises 7-question quiz Answers
Setup for the exercises:Install Claude CodePython with uvGet an OpenRouter keyLocal models with OllamaOpenRouter or a local model?

By the end of this lesson you can

  • Compose a reward from a format gate, code-verifiable fields, a rubric judge and penalties, and derive each weight from the cost of the error it prices
  • Compute the decision threshold and the degenerate policies that a set of reward weights implies, before training
  • Choose between pointwise rubric or checklist judges and relative-ranking judges, and estimate a judge's cost per training run
  • Validate a reward before training with agreement on gold labels, a known-bad ranking test and a measurement of judge noise
  • Explain reward over-optimisation, and why a judge that is good enough for evals may not be good enough as a reward

On this page

  • The reward is a price list
  • The reward stack
  • Pricing the errors
  • What the prices imply, before you train
  • Worked example: one group, priced
  • What's left for a judge
  • Relative judges
  • Validate the reward before you train
  • Over-optimisation: why eval-grade isn't reward-grade
  • Misconceptions and limits
  • Connections
  • Summary
  • Sources & further reading
  • Quiz

In this lesson

  1. 01The reward is a price list
  2. 02The reward stack
  3. 03Pricing the errors
  4. 04What's left for a judge
  5. 05Validate the reward before you train
  6. 06Over-optimisation: why eval-grade isn't reward-grade
  7. 07Misconceptions and limits
  8. 08Connections
  9. 09Summary

Sources & further reading

  • Scaling Laws for Reward Model OveroptimizationPaper · Gao, Schulman, Hilton · 2022The seminal measurement of Goodhart's law in RLHF: a gold reward rises, then falls, as a policy optimises a proxy. ICML 2023. Read the abstract, the functional forms for best-of-n and RL, and the KL-penalty result.
  • Rubrics as Rewards: Reinforcement Learning Beyond Verifiable DomainsPaper · Gunjal et al. · 2025Rubric items scored by a judge and aggregated into a reward beat direct Likert-style judge scores, and help smaller judges most. Read the abstract and the comparison of aggregation methods.
  • Checklists Are Better Than Reward Models For Aligning Language ModelsPaper · Viswanathan et al. · 2025RL from Checklist Feedback: a checklist per instruction, each item checked by a judge or a verifier program, combined into the reward. NeurIPS 2025. The method section is a template for this lesson's judge.
  • Reinforcement Learning with Verifiable yet Noisy Rewards under Imperfect VerifiersPaper · Cai et al. · 2025Models a verifier's false positives and false negatives as reward noise and corrects for them inside GRPO. Read the abstract for the noise model and why the forward correction needs only the false-negative rate.
  • Generative Verifiers: Reward Modeling as Next-Token PredictionPaper · Zhang et al. · 2024Verifiers that reason before their verdict, and vote across samples, beat classifier-style reward models. ICLR 2025. The evidence for letting your judge think before it answers.
  • Helping or Herding? Reward Model Ensembles Mitigate but do not Eliminate Reward HackingPaper · Eisenstein et al. · 2023Reward models that agree in distribution diverge under optimisation, and ensembles help without fixing it, because their errors are shared. Read the abstract and the qualitative hacking examples.
  • RULERDocs · OpenPipeA relative-ranking judge reward: all trajectories of a group scored together, 0 to 1. Read why relative scoring suits GRPO, the recommended group size and the troubleshooting section.
Free · sign in to start

Sign in to keep reading.

Free, no card. We use your account to save progress, quiz scores, bookmarks and occasionally send updates from our team.

  • 9 more sections
  • 3 hands-on exercises
  • A 7-question quiz
  • Progress, quiz scores and bookmarks