liveBook · Manning

Reinforcement learning with human feedback

As explained in LLMs in Production

Reinforcement learning from human feedback is a model-training approach that optimizes behavior using preference or evaluation signals supplied by people.

A game-playing bot can learn the wrong lesson from a reasonable-sounding reward. Reward it for building a useful structure, and it may keep building instead of winning. Reinforcement learning with human feedback (RLHF) addresses this reward-design problem by asking people which attempts they prefer. For a language model, a reviewer compares responses to a prompt and selects the better one. section 5.3.3

The preference signal guides training toward outputs human evaluators like. A reward model and proximal policy optimization (PPO) provide the training setup shown here, rather than relying only on a conventional loss function. Preference is not the same as correctness: RLHF can make responses more pleasing while increasing factually incorrect results. section 5.3.3 section 5.5

When reviewers see user prompts

In AI Dungeon, access to a GPT-3 model using RLHF meant OpenAI contractors could see prompts. Concerns about the game’s content led to demands for stronger filtering; the resulting safeguards frustrated players. Human review can therefore become a privacy and product-policy issue, not just a training expense. section 1.2.2

RLHF is powerful, but it is computationally expensive and may deliver only incremental gains. It can also require paid domain experts to evaluate interactions, raising cost and privacy concerns. Before choosing it, consider whether better-quality data and supervised learning could achieve a comparable result. section 5.3.3

Figure 5.6 RLHF substitutes a loss function for a reward model and proximal policy optimization (PPO), allowing the model a much higher ceiling for learning trends within the data, including what is preferred as an output instead of what completes the task.
figure

The diagram connects human-preferred outputs to the reward model and PPO used in RLHF training. section 5.3.3

How LLMs in Production covers it

How deep it goes
Explains preference selection through examples and identifies reward models and PPO, without working through their implementation.
Examples
Uses a StarCraft bot exploiting an intermediate reward, response comparisons, and AI Dungeon’s content-filtering dispute.
What it assumes
Introduces reward-design difficulty through a game example before applying human preference comparisons to language models.
What you can do after
Evaluate/understand it as a preference-training option against supervised learning, accounting for compute, reviewers, privacy, and factual errors.
How it connects
Connects reinforcement learning, reward design, reward models, PPO, supervised learning, and factual accuracy.

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 LLMs in Production. The section links point to the parts of the book it draws on.