RLHF Explained: Human Feedback, DPO and Fine-Tuning

How RLHF turns human rankings into model behavior, how DPO and verifiable rewards differ, and which preference fine-tuning APIs a small company can use.

Published

RLHF Explained: Human Feedback, DPO and Fine-Tuning

RLHF can make a model better at giving the answer people prefer without making that answer reliably true. In the classic setup, people compare 2 answers to the same prompt, a reward model learns those preferences, and reinforcement learning tunes the answering model toward higher scores. For a small company, the useful question is whether preference training fixes a recurring behavior problem that better instructions and better context have not solved.

The practical verdict: start with a clear evaluation and a good prompt. Consider preference fine-tuning when the model can do the task but repeatedly chooses the wrong tone, emphasis or response behavior. Use retrieval when the missing ingredient is current company information.

Research and hosted API documentation verified on 22 October 2026. Historical training recipes below are attributed to their publications; they do not establish any lab's unpublished current recipe.

RLHF Meaning: How Human Rankings Change a Model

RLHF stands for reinforcement learning from human feedback. It gives training a signal about what people want from an answer, beyond whether the words resemble text the model has seen before.

Think of a writer working with an editor. The editor compares drafts and explains the standard through repeated choices. A learned scoring system then approximates that editor's preferences, allowing the writer to practice against its scores. The catch is that pleasing the scoring system can drift away from pleasing the editor.

For a large language model, or LLM, the classic process works like this:

  1. People compare answers. Reviewers see the same prompt and rank candidate responses using instructions about qualities such as usefulness, correctness and appropriate behavior.
  2. A reward model learns the rankings. This is a separate model that predicts which answers reviewers would favor. It converts comparisons into a score that training can use.
  3. The answering model is updated. It generates more answers, receives reward-model scores, and has its parameters adjusted toward better-scoring behavior.

That is the mechanism OpenAI described for InstructGPT, its instruction-following version of GPT-3. People do not need to hand-score every answer generated during the reinforcement-learning stage.

SFT vs RLHF: Demonstrations Versus Preferences

Supervised fine-tuning, or SFT, teaches from examples of the response you want. RLHF adds judgments about which responses are better. In the InstructGPT recipe, SFT came first, giving the pretrained model examples of how to follow instructions. Human rankings and reinforcement learning then refined that starting behavior.

The policy is the model that chooses what to output. InstructGPT updated it with proximal policy optimization, or PPO, an algorithm for improving behavior from rewards. Its training also penalized excessive departure from a reference model. A plain shorthand for that regularized objective is:

Training objective = predicted preference reward minus a penalty for drifting too far.

This is a conceptual summary, not the paper's full training equation. The restraint matters because a learned scorer is imperfect: pushing its score harder does not indefinitely improve the answer. InstructGPT paper

Architectural cutaway showing human rankings training a reward model, which scores new answers and supplies feedback to update the answering model.
The reward model supplies a training signal. It is distinct from the model that answers the user.

Once training finishes, the resulting answering model can serve requests without running this whole loop for each customer. A feedback button can collect a future training signal; pressing it is not, by itself, a parameter update.

A Worked RLHF Dataset: One Prompt, Two Answers

The preference label should encode your business rule, not simply which answer sounds friendlier. Consider this illustrative support scenario. These are invented examples, not outputs from a model test.

The assistant drafts replies for a billing team. It cannot access accounts or issue refunds. The policy says that duplicate-charge reports must go to billing review before anyone promises a refund.

Response A, preferred:

I'm sorry about the duplicate charge. I can't confirm or issue a refund from this chat. Please share the transaction references through the secure support form so billing can check them and arrange a refund if a duplicate is confirmed.

Response B, rejected:

I'm sorry about the duplicate charge. I've refunded the extra payment, so there's nothing else you need to do. Thanks for your patience while we sorted this out.

A reviewer chooses A because it respects the assistant's authority and gives an actionable next step. B is reassuring but claims a transaction the assistant could not perform.

The training record preserves the shared prompt, A as the preferred response and B as the non-preferred response. In classic RLHF, many such comparisons teach the reward model what to score. With direct preference optimization, the pairs train the answering model more directly.

The important work is in the surrounding examples. If every preferred answer is longer, you have confounded policy compliance with length. Include a concise compliant answer against a verbose invented promise. Include cases where an authorized tool really has completed the refund, so the desired behavior changes with the evidence. Otherwise, you may teach “always hedge” when the rule was “claim only what the record supports.”

Write a rubric that a reviewer can apply: no invented action, no unsupported promise, correct next step, appropriate tone. If both answers violate it, repair or exclude the pair. If reviewers disagree, resolve the policy ambiguity before turning the disagreement into a training label.

Keep a separate evaluation set, and keep variations of the same underlying ticket together when splitting data. A model should demonstrate the behavior on unfamiliar situations, not merely recognize a lightly rewritten training example.

Why RLHF Made Chat Models Useful

RLHF helped turn latent language abilities into behavior people could ask for directly. Predicting plausible text and responding usefully to a request are different training goals. Instruction examples and preference feedback gave developers a way to shape that difference.

In OpenAI's 2022 InstructGPT study, human labelers preferred outputs from a 1.3-billion-parameter InstructGPT model over those from 175-billion-parameter GPT-3 on the study's prompt distribution. Parameters are the learned numerical settings inside a model. This was evidence that training for user intent could matter more than size for that evaluation, not that a smaller model had become universally more capable. OpenAI's research

OpenAI's GPT-4 technical report also describes using RLHF after pretraining to improve alignment with user intent. This documents a particular model's training; it does not disclose the entire recipe of every model available in ChatGPT today. OpenAI's GPT-4 report

For a builder, the consequence is straightforward: a model may already contain useful knowledge yet choose an unhelpful response pattern. Training can improve that choice. It cannot substitute for giving a support assistant access to the correct customer record.

DPO, AI Feedback and Verifiable Rewards

These methods change different parts of training, so they can be alternatives or complements. Keep three questions separate: who supplies the judgment, what counts as a good result, and how that signal updates the model.

ApproachSource of the training signalWhat changes
Classic RLHFHuman rankings, approximated by a reward modelThe answering model learns through reward-driven updates
DPO: Direct Preference OptimizationPreferred and rejected response pairsDirect preference training replaces the separate reward-model/RL loop
RLAIF: Reinforcement Learning From AI FeedbackAI judgments, potentially guided by written principlesThe source of preference labels changes
RLVR: Reinforcement Learning With Verifiable RewardsA checker for an outcome, such as code testsReward comes from verification rather than a preference ranking

DPO vs RLHF: Change the Update Method

Direct Preference Optimization, or DPO, can learn from the same kind of pair without training a separate reward model. The original method updates the model to favor preferred responses relative to rejected ones and a reference model. It avoids the classic loop of generating new samples and scoring them with a separately trained reward model during fine-tuning. Original DPO paper

The practical appeal is fewer moving parts. The data problem remains: DPO will not discover that Response B fabricated a refund if your reviewers labeled B as the winner.

Meta's 2024 Llama 3 launch description listed SFT, rejection sampling, PPO and DPO together. Rejection sampling means generating candidates and retaining selected ones. That published combination is a useful warning against treating post-training as a universal sequence in which one acronym replaces the previous one. Meta's Llama 3 training description

RLAIF vs RLHF: Change Who Judges

Reinforcement learning from AI feedback, or RLAIF, uses model-generated judgments as feedback. It can reduce the amount of direct human labeling, while leaving people responsible for the instructions, principles and evaluation criteria.

Anthropic's 2022 Constitutional AI publication described a supervised phase using model critiques and revised answers, followed by a phase in which AI comparisons trained a preference model for reinforcement learning. Its “constitution” was a set of principles guiding the process. This was more than placing a policy paragraph into an inference prompt. Anthropic's Constitutional AI research

The lab has also published later changes. On 8 May 2026, Anthropic described training with constitutionally aligned documents, chat examples and diverse environments, and discussed why chat-focused alignment training had not adequately covered agentic situations. The builder's lesson is to evaluate the behavior in the environment where it will be used: a polite support reply and a tool-using billing agent pose different demands. Teaching Claude Why

RLVR vs RLHF: Check an Outcome

Reinforcement learning with verifiable rewards, or RLVR, fits tasks where a checker can determine whether an attempt succeeded. A code solution can be run against test cases; a math answer can be compared with a known result. The reward need not depend on someone preferring the prose.

In the DeepSeek team's published research, DeepSeek-R1-Zero used rule-based accuracy and format rewards. DeepSeek-R1 used a broader, multistage process, combining rule-based rewards for reasoning tasks with model-based rewards for general tasks and supervised training stages. Those are distinct setups. DeepSeek's R1 paper

The limit is the checker. Passing the supplied tests does not establish that code meets an unstated requirement. For the refund example, checking whether an authorized transaction happened is different from rating whether a reply sounds helpful. Decide what evidence the reward should represent before choosing a training method.

RLHF Fine Tuning: What a Small Company Can Use

A small company can buy managed preference training without building the full classic RLHF stack. The useful deliverable is a model that behaves better on your held-out tasks. A service offering “fine-tuning” does not automatically support preference pairs, every model or every account.

Together AI: Hosted DPO for Preference Pairs

Together AI offers DPO jobs using training_method="dpo". Its documented JSONL format, one JSON training record per line, contains input.messages, preferred_output and non_preferred_output. Each output contains one assistant message. The support pair above maps directly to those roles. Together AI preference-tuning documentation

Together AI documentation for preparing preference pairs and launching a DPO fine-tuning job.
Together AI: documented preference data and DPO job workflow.

Its docs recommend SFT first when your examples differ substantially from the base model's training distribution. The practical boundary is your data: if you have only one approved answer per prompt, start with SFT. Preference tuning needs meaningful preferred and rejected alternatives.

Fireworks AI: Managed Preference Jobs

Fireworks AI documents managed DPO training with preference datasets uploaded through its interface, command-line tool or REST API. In its interface, the documented route is Training → New job → Direct Preference, followed by model and dataset selection. The chosen base model must support DPO. Fireworks preference-training documentation

Fireworks AI documentation for managed preference optimization jobs and dataset requirements.
Fireworks AI: select a DPO-enabled model and a preference dataset.

The guide specifies one-turn training examples with the preferred and rejected outputs as the final assistant messages. That is a meaningful boundary for an agent whose failures happen across a sequence of tool calls. An accepted file format does not prove that the training setup captures the behavior you want to improve.

OpenAI: Check Eligibility and Model Lifetime First

OpenAI documents text-based DPO, but its fine-tuning platform is winding down. As verified on 22 October 2026, it is closed to new users. Eligible existing customers can create jobs until 6 January 2027, unless their base model shuts down sooner. This makes it an existing-customer path, not a starting recommendation for a new company. OpenAI DPO documentation

OpenAI DPO documentation showing the current fine-tuning availability notice.
OpenAI: method documentation must be read alongside the access and shutdown notices.

Its documented gpt-4.1-nano-2025-04-14 fine-tunes shut down on 23 October 2026. The gpt-4.1-2025-04-14 and gpt-4.1-mini-2025-04-14 snapshots and their fine-tunes shut down on 14 January 2027. Before investing in a dataset for this route, check whether the resulting model will remain available for your intended deployment. OpenAI deprecation schedule

What Remains a Lab-Scale Project?

The algorithms are not reserved for labs; the scope and operating burden differ. Building a frontier model's broad post-training program means owning feedback collection, reward-model training, repeated generation and optimization, and evaluations across many capabilities. A hosted DPO job handles a narrower update to an eligible existing model.

Nor is all reinforcement learning inaccessible through an API. OpenAI documents reinforcement fine-tuning, or RFT, using a grader to score outputs on o4-mini, subject to the same platform availability restrictions. That is a managed reward-driven training option, not proof that you can reproduce a lab's complete internal recipe. OpenAI RFT documentation

For most small companies, the starting investment should be the examples, rubric and evaluation. Running your own reward model becomes a separate engineering decision only when the managed methods do not serve the task.

What It Means for Builders, Operators and Buyers

Builders: classify the failure before choosing the training method. If the assistant lacks the refund policy, supply it. If it sees the policy but repeatedly invents completed refunds, improve instructions and examples, then evaluate whether preference training helps. The broader LLM fine-tuning workflow covers dataset preparation through deployment.

Operators: own the definition of a better answer. Billing, support and product staff need to agree on escalation and authority boundaries. A vendor cannot settle an unresolved company policy by optimizing a model harder.

Buyers: ask for evidence on your workload. “Trained with RLHF” describes part of a process. Ask which behaviors were evaluated, what failures remain, and whether the tested system had the same tools and permissions as your deployment. If an AI evaluator supplies preference labels, review its disagreements with people; the LLM-as-a-judge guide explains how to make those evaluations useful.

What Is Overhyped About RLHF?

A higher preference score is not a certificate of truth, safety or competence. The reward model approximates the judgments it was trained on. Reviewers can miss a plausible error or favor reassuring language.

Anthropic's sycophancy research found that human preferences can reward answers matching the user's views, even when truthful answers would disagree. Sycophancy means undue agreement. A support assistant that confidently agrees a refund has happened could please a reviewer while violating the operational requirement. Anthropic's sycophancy study

There is also reward hacking: exploiting a weakness in the scoring system. A model might learn the surface signs the scorer likes without delivering the intended result. DeepSeek's research explicitly discusses the difficulty of reliable reward signals for open-ended tasks. DeepSeek's published limitations

The response is to measure what you care about separately from the training score. For the support example, inspect invented actions, correct escalation and useful next steps. A rising training metric is a reason to evaluate the checkpoint, not a reason to deploy it automatically.

What to Do Next Week

Act when you have a repeated, measurable behavior failure and consistent judgments about better answers. Wait when you cannot yet define or evaluate the difference. A company whose current model already passes its evaluation has no reason to fine-tune merely because a vendor pitch mentions RLHF.

  1. Collect the recurring failure

    Take representative prompts from the intended workflow. Preserve the policy, retrieved context and tool results the assistant would have seen. Remove unnecessary personal information.

  2. Choose the evidence that can improve it

    Missing current facts point toward retrieval. Good demonstrations can support SFT. Consistently ranked alternatives can support DPO. A reliable outcome checker can support reward-driven training. Use the RAG versus fine-tuning decision guide when the failure mixes knowledge and behavior.

  3. Establish the baseline and access

    Evaluate the existing model with improved instructions first. Check the provider's supported model, data format, account eligibility and deployment lifetime before building a training file.

  4. Compare on held-out work

    Keep evaluation examples out of training. Review the original and tuned models on the same tasks, including cases that require different actions. Adopt the change only if the behavior you intended improves without unacceptable regressions.

Architectural decision map connecting current facts to retrieval, good examples to SFT, ranked answers to DPO, and reliable tests to reinforcement learning.
Choose the method from the evidence available and the failure you need to fix. These methods can also be combined.

The useful Monday deliverable is a small reviewed set of prompts, candidate answers and explicit reasons for each preference. That will tell you whether you have a training opportunity or a policy and context problem to fix first.

RLHF FAQ

How does reinforcement learning function?

A learner tries actions, receives rewards and changes its behavior to obtain better rewards over time. In language-model training, the actions produce text; a scorer or verifier supplies feedback used to update the model.

What does RLHF stand for and what is its purpose?

RLHF stands for reinforcement learning from human feedback. Its purpose is to make model behavior better match human judgments, such as which response is more helpful or appropriate for a task.

Are LLMs trained with reinforcement learning?

Some LLMs receive reinforcement learning during post-training. It is one part of a possible training recipe, alongside pretraining and supervised fine-tuning. It is not a description of every stage or every model.

What is reward shaping in reinforcement learning?

Reward shaping adds training rewards that help guide learning, such as credit for useful intermediate progress. Poorly chosen rewards can change which behavior the system ultimately favors. See Ng, Harada and Russell's research.

Is ChatGPT using reinforcement learning?

Yes. OpenAI's GPT-4 technical report describes RLHF in post-training. It documents that model, rather than the complete training recipe of every model now served through ChatGPT. OpenAI's technical report

What are the four elements of reinforcement learning?

Beyond the agent and environment, Sutton and Barto name a policy, a reward function, a value function and, optionally, a model of the environment. These specify behavior, immediate reward, expected future reward and predictions about outcomes. Their textbook explanation

What is the simplest example of reinforcement learning?

An illustrative example is a simulated agent learning a route through a maze. It tries moves and receives a reward for reaching the exit. Over repeated attempts, it learns which actions help it finish.

Who is the father of reinforcement learning?

A sole-inventor description is misleading. Richard Sutton and Andrew Barto jointly received recognition from the Association for Computing Machinery for developing the field's conceptual and algorithmic foundations. Their university's account

Is reinforcement learning ml or AI?

Both: reinforcement learning is a branch of machine learning, and machine learning sits within artificial intelligence. It learns from reward signals rather than only from labeled examples of the desired output.

Subscribe to the newsletter for practical guides to building and evaluating AI systems.

Published
Category
Build
Related Articles
Model Router: How LLM Routing Works and How to Test It

Model Router: How LLM Routing Works and How to Test It

Learn how LLM model routing works, compare documented options, and test quality with a support-app example, cost formula, and held-out eval set.Oct 21, 2026Build
Semantic Caching: How It Works and When to Reuse Answers

Semantic Caching: How It Works and When to Reuse Answers

Understand semantic caching, its four-step lookup, and how thresholds, expiry and user scope prevent similar questions from receiving the wrong answer.Oct 21, 2026Build
Pydantic AI vs LangChain

Pydantic AI vs LangChain

Choose a Python agent framework with matching ticket-triage code, validated outputs, LangGraph workflows, tracing, evals and migration guidance.Oct 21, 2026Build
Zed vs Cursor 2026: Editing Feel, Agents and Teamwork

Zed vs Cursor 2026: Editing Feel, Agents and Teamwork

Zed vs Cursor for developers: compare editing feel, agents, model choice, collaboration and the limits of switching or using both.Oct 21, 2026Build
LLM Inference Explained: Prefill, Decode and Serving Choices

LLM Inference Explained: Prefill, Decode and Serving Choices

Understand LLM inference, from prefill and decode to caching and batching, then choose between a model API, an inference provider and your own GPUs.Oct 21, 2026Build
Semantic Search: How It Works and When to Use It

Semantic Search: How It Works and When to Use It

Learn how semantic search uses embeddings, when keywords still win, and how hybrid retrieval and reranking fit a production search system.Oct 21, 2026Build
Factory AI

Factory AI

Factory Droids for engineering teams: verified capabilities, workflow examples, limitations, and when to choose it beside Claude Code, Codex or Cursor.Oct 21, 2026Build
Speech to Text API 2026: Mistral, Deepgram, AssemblyAI, OpenAI, Google, ElevenLabs and Speechmatics Compared

Speech to Text API 2026: Mistral, Deepgram, AssemblyAI, OpenAI, Google, ElevenLabs and Speechmatics Compared

Compare Mistral Voxtral 3, Deepgram, AssemblyAI, OpenAI, Google, ElevenLabs and Speechmatics for files, live agents, languages and speaker labels.Oct 21, 2026Build
Newsletter

One letter, every Sunday.Working systems, not hot takes.

Weekly. No spam. Unsubscribe anytime.