liveBook · Manning

Reward model

As explained in Generative AI in Action

A reward model is a machine-learning model that assigns scores to outputs to estimate their quality or preference according to evaluation criteria.

A reward model is a separate model that scores and ranks outputs according to human judgments of quality and relevance. It converts preferences such as domain expertise, factual accuracy, or successful code execution into quantitative feedback for improving a language model. section 9.5.3 section 9.7

A reward model supports the RLHF workflow:

  • Use an SFT model to generate multiple responses for each prompt. section 9.5.3
  • Have human evaluators rank responses using criteria such as expertise, fact-checking, or code execution. section 9.5.3
  • Train the reward model to predict those quality judgments and score new outputs. section 9.5.3 section 9.7
  • Use its scores to further train the SFT model, often with PPO, producing an RLHF-aligned model. section 9.5.4 section 9.7

Support-response alignment

For a customer-support prompt, an SFT model generates several replies. Evaluators rank them for factual accuracy and relevance; the reward model learns these preferences and scores later replies so reinforcement learning can favor stronger responses. section 9.5.3 section 9.5.4

Figure 9.16 RLHF fine-tuning approaches to aligning language models [13]
figure

Use the RLHF workflow diagram to trace how supervised fine-tuning, reward modeling, PPO, and human feedback work together. section 9.7

How Generative AI in Action covers it

How deep it goes
Explains response generation, human ranking, reward-model training, and downstream PPO use without deriving the model or algorithm mathematically.
Examples
Uses human rankings based on domain expertise, fact-checking, code execution, chat, code, and creative-writing quality.
What it assumes
Assumes familiarity with an SFT model and human preference rankings while situating reward modeling within RLHF.
What you can do after
Apply reward scores to understand how human preferences become a training signal for RLHF model improvement.
How it connects
Connects supervised fine-tuning, reinforcement learning, RLHF, PPO, human feedback, and alignment.

Also explained in

Compare how 5 books explain reward model →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Generative AI in Action. The section links point to the parts of the book it draws on.