What a pair is
A preference pair has three parts: the prompt (the conversation so far, including any system message), the preferred answer and the non-preferred answer. Some tools call the last two chosen and rejected. The model is never told why one is better. It infers that from everything that differs between them.
That is the central fact about pairs: DPO learns the difference. If the preferred answer is correct and specific while the rejected one is vague, it learns to be specific. If the preferred answer is also always longer, it may learn “longer is better” instead. Whatever separates the two sides consistently across your pairs is what gets reinforced.
The three sources in the Preference pairs tool
Each reply in a dataset can be the better side of a pair. When you build pairs from a dataset, the worse side comes from one of three places:
| Source | How the worse side is made | Strength | Watch for |
|---|---|---|---|
| Evaluations | Two models answered the same question and a judge picked a winner. The winner is preferred, the loser non-preferred. Ties are skipped: they carry no preference. | Both answers are real model outputs, so the contrast is realistic. | Judges are imperfect, and a wrong winner teaches the wrong lesson. Spot-check. |
| Your edits | You corrected a reply in a dataset. The corrected version is preferred, the original non-preferred. | The highest-quality signal: a person saying exactly what was wrong. | Edits that only reword teach little. |
| Written by a model | A model you choose writes a plain, generic answer with no knowledge of your company and no tools. Your reply is preferred. | Covers every reply that has no other pair; teaches the model to answer like your team rather than a generic assistant. | The contrast is easy, so the loss can fall fast without much being learned. |
Re-adding the same evaluation updates its pairs instead of duplicating them, so evaluate, collect pairs, train and evaluate again is a loop you can repeat.
Pairs from chat feedback and human review
- Chat feedback. When someone asked the same question twice in a chat, liked one answer and disliked or refreshed the other, importing chat feedback turns that into a pair: the liked answer preferred, the other not. Answers rated both ways by different people are skipped, and so are identical answers. A disliked answer on its own never becomes a reply to learn from; it waits for a better answer to compare with.
- Annotation queues. A reviewer reading answers blind picks the better one or writes a correction. Exporting the queue makes the correction, or the picked answer, the reply to learn from and the answer liked less its worse pair, so one example serves supervised training and DPO. Ties without a correction aren't exported.
What makes a pair useful
- The difference should be the thing you care about. If both answers are good and differ only in wording, the model learns noise. Research on DPO has found that pairs whose two answers are very similar can even push probability onto unrelated answers.
- The preferred answer must actually be better. A wrong winner teaches the wrong lesson. Generated answers and judges are imperfect, so read a sample.
- Plausible rejected answers teach more. “Vague but polite” is a more useful contrast than gibberish. A rejected answer the model would never write tells it little.
- Close to what the model writes. DPO learns most from answers near the model's own behaviour. Evaluation pairs, where one side was written by the model itself, are naturally on target.
- Control length and style. If preferred answers are systematically longer or more heavily formatted, include pairs where the shorter or plainer answer wins.
- Penalise invention. If a model invents specifics, add pairs where the rejected answer is the invented one and the preferred answer is correct, or says plainly that it does not know.
- Question: “Can I export a dashboard to PowerPoint?” The preferred answer is the same each time: the correct steps, Share → Export → PowerPoint.
- Weak: rejected “asdf”. The contrast is trivial: the loss on this pair drops to near 0 almost at once and the model learns almost nothing.
- Better: rejected “I'm not sure that feature exists; please check the documentation.” A realistic failure: vague and unhelpful.
- Best, for a model that invents: rejected “Yes: press Ctrl+Shift+P and choose Export to slides.” Confident and wrong, which is exactly the habit to remove.
How many pairs
Tens of pairs can show an effect on a narrow behaviour; hundreds or more give a robust one. Coverage matters as much as count: 200 pairs on the same five questions teach less than 200 pairs spread across the questions your users actually ask. For a sense of scale, an early study of fine-tuning language models from human comparisons used 5,000 comparisons for a style task and 60,000 for summarisation.
Pairs from multi-turn conversations
Pairs can come from deep inside a conversation. Some providers train on one question per record, so earlier turns are folded into the latest user message as context. Others accept the whole conversation as the prompt and keep the turns as separate messages. The same pairs can be written either way.
Earlier in this conversation:
User: I uploaded a CSV yesterday.
Assistant: Thanks — it's in Local Storage.
Latest message:
Can I use it in a dashboard?Common mistakes
- Trusting generated or judged pairs without reading a sample.
- Pairs that differ only in wording, or where both answers are good.
- Rejected answers that are obviously broken, so nothing subtle is learned.
- A hidden length bias: preferred answers are always longer, so the model learns to ramble.
- Building pairs from the same questions you will evaluate on, which flatters the result.
References and further reading
External sources open in a new tab.
- 01Fine-Tuning Language Models from Human PreferencesZiegler et al., 2019 · arXiv · arxiv.orgEarly work on learning from human comparisons, including how labelers' shortcuts shaped what the model learned.
- 02Dataset formats and typesHugging Face TRL docs · huggingface.coThe prompt / chosen / rejected format, in standard and conversational forms.
- 03Direct preference optimizationOpenAI API docs · developers.openai.comA hosted format with preferred and non-preferred outputs, trained one turn at a time.
- 04Unintentional Unalignment: Likelihood Displacement in Direct Preference OptimizationRazin et al., 2024 · arXiv · arxiv.orgWhy pairs with near-identical answers can backfire, and how filtering them helps.