liveBook · Manning

Reinforcement learning with human feedback

As explained in Build a Reasoning Model (From Scratch)

A training approach that uses human preference labels to optimize a language model toward responses humans prefer.

Reinforcement learning with human feedback (RLHF) is a preference-tuning method that uses human rankings of model outputs to optimize a language model toward responses people prefer. Unlike pretraining and supervised fine-tuning, it optimizes complete responses rather than only next-token predictions. section 6.1.1 section 1.2

Implement RLHF as a two-stage workflow:

  • Generate multiple candidate responses for each prompt, then collect human rankings or pairwise preferences. section 6.1.1
  • Train a reward model, itself typically an LLM, to assign preference scores that reflect the collected rankings. section 6.1.1
  • Generate target-model outputs, score them with the reward model, and update the target LLM with an RL objective that encourages preferred behavior. section 6.1.1

Choosing a laptop

For a programming-and-everyday-use prompt, one response lists many possible laptop features, while another prioritizes a fast CPU, at least 16 GB of RAM, an SSD, keyboard quality, and battery life. Human annotators may rank the second response higher because it is more concrete and tailored to the stated use case. section 6.1.1

RLHF requires an additional learned reward model, which can be expensive to train. RL with verifiable rewards (RLVR) replaces that model and human annotation with deterministic checks, such as mathematical answer verification, and therefore uses a simpler training loop. section 6.1.2

How Build a Reasoning Model (From Scratch) covers it

How deep it goes
Explains candidate generation, preference collection, reward-model training, scoring, and RL updates, but defers algorithmic implementation details.
Examples
Uses ranked laptop recommendations to show how specificity and use-case relevance become preference signals.
What it assumes
Assumes familiarity with pretrained and instruction-tuned LLMs while distinguishing preference tuning from next-token training.
What you can do after
Evaluate how human preferences become reward scores and guide whole-response model optimization.
How it connects
Connects preference tuning, supervised fine-tuning, reinforcement learning, reward models, and verifiable rewards.

Also explained in

Compare how 14 books explain reinforcement learning with human feedback →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build a Reasoning Model (From Scratch). The section links point to the parts of the book it draws on.