# RLHF (reinforcement learning from human feedback)

> RLHF, or reinforcement learning from human feedback, is a training method in which people rate or compare a model's answers and those judgements are used to steer the model towards responses humans prefer.

Also called: RLHF, reinforcement learning from human feedback, preference tuning, alignment training, DPO. Category: Models and training. Source: https://aibuildindex.com/glossary/rlhf

## In the index

- Machine learning: median $3,520, middle half $500 to $10,000, 4,945 priced briefs (https://aibuildindex.com/skills/machine-learning)
- Model training: median $4,720, middle half $850 to $14,400, 448 priced briefs (https://aibuildindex.com/skills/model-training)

A model trained only to predict text can produce answers that are accurate but unhelpful, rambling, rude or unsafe. RLHF is one of the main techniques providers use to turn such a raw model into an assistant that follows instructions, declines harmful requests and writes in a useful way. It is mostly done by model providers rather than by businesses building on their models, but it explains a lot about how commercial assistants behave, including why they refuse some requests and why they sometimes agree too readily.

## How it works

The classic RLHF process has three stages:

1. **Collect comparisons.** The model produces several answers to the same prompt, and trained reviewers rank them or pick the best, a form of [data labelling](https://aibuildindex.com/glossary/data-labelling).
2. **Train a reward model.** A separate model learns to predict which answers the reviewers would prefer.
3. **Optimise the main model.** Using reinforcement learning, the main model is adjusted to produce answers the reward model scores highly, with limits that stop it drifting too far from its original behaviour.

Variations have become common. Some methods, such as direct preference optimisation, skip the separate reward model and train on the comparisons directly. Others use AI-generated feedback guided by written principles to reduce the amount of human rating needed.

The effects show up in everyday use. A model's tendency to be polite, to hedge, to refuse certain topics, or occasionally to tell users what they want to hear can all trace back to preference training.

## What it means for cost

For most business builds RLHF is not a line item: the provider has already done it, and buyers benefit through the model's default behaviour. Adapting a model for a company's needs is normally done through prompting, retrieval or supervised [fine-tuning](https://aibuildindex.com/glossary/fine-tuning), which are simpler and cheaper.

Preference tuning becomes relevant for organisations training or heavily customising their own models, for example an [open-weight model](https://aibuildindex.com/glossary/open-weight-model) that must match a strict editorial or safety standard. Then the cost is dominated by recruiting and managing reviewers, writing rating guidelines and checking consistency. If a builder proposes RLHF, ask why supervised fine-tuning or better prompting would not achieve the goal.

## Common questions

### Why do AI assistants refuse some reasonable requests?

Preference training and safety tuning teach models to avoid harmful content, and they sometimes generalise too broadly. A clear [system prompt](https://aibuildindex.com/glossary/system-prompt) explaining the legitimate business context often reduces unnecessary refusals.

### Can a business use RLHF to improve its own chatbot?

In a lighter form, yes. Collecting user ratings on answers and using them to refine prompts, retrieval or a fine-tuned model applies the same idea. Full reinforcement learning on a custom model is rarely needed for a business assistant.

### Does RLHF make a model more truthful?

It can make a model more careful and more willing to admit uncertainty, but it can also reward answers that sound convincing to reviewers. It does not remove [hallucination](https://aibuildindex.com/glossary/hallucination), so factual checks are still needed.

## Related terms

- [Fine-tuning](https://aibuildindex.com/glossary/fine-tuning): Fine-tuning is the process of further training an existing AI model on a smaller set of task-specific examples so that it reliably adopts a particular behaviour, format, tone or specialised skill.
- [Large language model (LLM)](https://aibuildindex.com/glossary/large-language-model): A large language model is an AI model trained on very large amounts of text to predict the next word, which lets it write, summarise, translate, classify and answer questions in natural language.
- [Foundation model](https://aibuildindex.com/glossary/foundation-model): A foundation model is a large AI model trained on broad data that can be adapted to many different tasks, such as writing, coding, image understanding or classification, rather than built for one job.
- [Guardrails](https://aibuildindex.com/glossary/guardrails): Guardrails are the checks and controls placed around an AI model, such as input filters, output validation, topic limits and action restrictions, that keep its behaviour within safe, permitted and useful bounds in a live system.
- [Data labelling](https://aibuildindex.com/glossary/data-labelling): Data labelling is the work of adding correct answers to raw examples, such as tagging images, marking entities in text or rating model outputs, so that a machine learning model can be trained or evaluated on them.
