esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
Let’s talk

I’ll build the agent for it.

How Do You Collect Preference Data?

How teams gather human and AI preference pairs, the rules labellers follow, and the bias traps to watch, explained simply for your AI interview.

In short

You show a model's answers to the same prompt to human labellers or a judge model, ask which one is better, and save each pick as a preferred answer and a non-preferred answer. Training learns from those pairs.

11 min readIntermediateOccasional · estimateFacts checked 27 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

Preference data is a set of picks. For one prompt, the model writes a few answers, and a person or a judge model says which is better. Each pick becomes a preferred answer and a non-preferred answer. I write the rules first, have people rank two or more drafts per prompt, and check a sample by hand, because AI judges have known biases.

What is preference data, in plain words?

Preference data is a set of picks. Each row holds three things: the prompt, a preferred answer and a non-preferred answer. Training reads the rows and nudges the model towards the answers people chose.

Picture a senior claims editor at an insurance company. She reads two drafts of a reply to a customer and marks the one she would send. That mark is one row of preference data.

A claims assistant that drafts those replies learns the same way. For each claim it writes several drafts, a labeller ranks them, and each ranking is saved as pairs. OpenAI's DPO guide describes the data as "prompts and pairs of responses", but the same page says "OpenAI is winding down the fine-tuning platform." Read it to learn the method, and do not plan a project around that service.

Key words

Prompt
The question or task the model is given.
Labeller
The person who reads the answers and picks the better one. Some teams use a judge model instead.
Preferred answer
The draft that won the pick.

How do teams collect the picks?

The steps below follow how OpenAI's InstructGPT, a model trained on human rankings, collected its data, and they scale down to a small team.

  1. 1

    Start with real prompts

    Take questions from real traffic, such as a claims team's emails with private details removed. InstructGPT's labellers were given prompts sent to its own API, with several model answers for each.

  2. 2

    Let the model write several drafts

    Give each prompt two or more drafts, so a labeller has a real choice. InstructGPT's labellers ranked between four and nine outputs per prompt.

  3. 3

    Ask labellers to rank them

    Labellers read every draft, then put them in order, best first. The InstructGPT paper says "labelers rank all the outputs for a given prompt".

  4. 4

    Turn each ranking into pairs

    Four ranked drafts give six pairs, since any two can be compared. Skip a tie, because it names no winner. Save each other pair as a row, with the higher draft as the preferred answer.

  5. 5

    Hold some labellers back

    Keep a few labellers whose picks never reach training. The InstructGPT paper tested its model on "held-out" labelers who made no training picks.

  6. 6

    Check agreement and fix the rules

    When labellers disagree, reread the rules first. Fix the rules, then relabel only the messy rows.

  7. 7

    Read real user feedback with care

    A thumbs-up, a thumbs-down or an edit a user made to a reply is a free pick, but a noisy one. A user may click without reading both answers.

From a prompt to preference pairs

Real prompts

emails and tickets, private data removed

Model writes drafts

2 or more answers per prompt

Human path

Labellers rank drafts

they follow written rules

AI path

Judge model picks

people check a sample of its picks

Pairs saved

a winner and a loser, one row

  1. 1The model gets each real prompt and writes several drafts.
  2. 2Labellers rank the drafts by the written rules.
  3. 3Or a judge model picks the better draft.
  4. 4Each human ranking is split into pairs and saved.
  5. 5Each judge pick is saved as a pair too.
Real prompts go to the model, which writes several drafts. Labellers rank them by written rules, or a judge model picks the better one. Either way, the picks become preferred and non-preferred pairs in one file.

Tip

Write the rules before the picks. InstructGPT's toxicity guidance covered the case where every draft looks plausible: "If all the outputs are plausible continuations of the input, prioritize differences in toxicity in your rankings, rather than differences in continuity."

Here is the ranking step in plain Python. A ranking goes in, and the pairs come out. It uses only the standard library.

Python
# Turn one labeller's ranking into preference pairs: every higher draft beats every lower one.
from itertools import combinations

def pairs_from_ranking(prompt, ranked):
    # ranked is best first, so the earlier draft in each pair is the preferred one
    return [
        {"prompt": prompt, "preferred": better, "non_preferred": worse}
        for better, worse in combinations(ranked, 2)
    ]

drafts = [
    "Reply A: cites policy clause 4.2",
    "Reply B: long, no clause",
    "Reply C: short apology",
    "Reply D: wrong refund amount",
]
rows = pairs_from_ranking("Why was my claim declined?", drafts)
print(len(rows), "pairs from", len(drafts), "drafts")
for row in rows[:3]:
    print(row["preferred"], "beats", row["non_preferred"])

Output

6 pairs from 4 drafts
Reply A: cites policy clause 4.2 beats Reply B: long, no clause
Reply A: cites policy clause 4.2 beats Reply C: short apology
Reply A: cites policy clause 4.2 beats Reply D: wrong refund amount

Can an AI judge replace the people?

Sometimes. Anthropic's Constitutional AI paper used a model to evaluate which of the two samples is better, and says these methods help control AI behavior more precisely, with far fewer human labels.

RLHF means reinforcement learning from human feedback, a way to train a model on people's picks. The first card, from the DPO paper, describes these existing methods.

  • “Existing methods for gaining such steerability collect human labels of the relative quality of model generations and fine-tune the unsupervised LM to align with these preferences, often with reinforcement learning from human feedback (RLHF).”

    Direct preference optimization paper, 2023

  • “These methods make it possible to control AI behavior more precisely and with far fewer human labels.”

    Constitutional AI paper, 2022

  • “Our results reveal that strong LLM judges like GPT-4 can match both controlled and crowdsourced human preferences well, achieving over 80% agreement, the same level of agreement between humans.”

    LLM-as-a-judge paper, 2023

The catch is bias. A 2023 paper on LLM judges names "position, verbosity, and self-enhancement biases" as limits, so a judge can favour an answer for where it sits, for its length, or because the model wrote it. The same paper found that strong judges like GPT-4 can match people well. So I use AI judges for volume and check a sample by hand.

Human picks have a clear source too. Anthropic's 2022 study used crowdworkers who chat with the model and "choose the more helpful of two model responses at every turn in the conversation".

How much data do you really need, and how do you check it?

Here is a worked case with made-up numbers. A bank's card-dispute assistant has 2,000 real prompts, and labellers rank four drafts each. Four drafts give up to 6 pairs, fewer if labellers tie, so 2,000 prompts give up to 12,000 rows. Those rows share drafts, so they are not 12,000 independent votes.

The first sample of 1,200 rows showed a problem. Two labellers agreed on only about half the pairs, because the rules never said that a short, correct answer beats a long, wordy one. The fix was one line in the rules. Relabelling the 600 messy rows took about 10 hours at a minute a row. Now the team samples 10 percent before each training run, so the next gap shows early.

For scale, InstructGPT's paper says the RM dataset has 33k training prompts, drawn from the API and written by labelers.

Checking the picks before training

Pairs file

rows from both paths

Two checks

Labeller agreement

do two labellers pick the same?

Judge bias scan

length, position, self-praise

Clean pairs only

pairs that pass go to training

  1. 1Human picks are checked for agreement between labellers.
  2. 2Judge picks are scanned for known biases.
  3. 3Human pairs that agree go on to training.
  4. 4Judge pairs that pass the scan go on too.
Human picks are checked for agreement between labellers, and judge picks are scanned for known biases such as a pull towards long answers. Only the pairs that pass go to training.

What does the interviewer want to hear?

A strong answer covers

  • A plain definition: a set of picks, each one a preferred and a non-preferred answer.
  • Where the picks come from: labellers ranking drafts, or a judge model.
  • The pair maths: four drafts make six pairs.
  • The known bias of AI judges, named: position, length and self-preference.
  • Written rules first, then a sample checked by hand.
  • A held-out group of labellers, whose picks never train the model, to test it on people it has not learned from.

Common traps

  • Trap"Collect a million clicks, and the data is ready."

    BetterVolume helps only when the picks agree. Check agreement before you count rows.

  • Trap"The AI judge is always right, so skip the people."

    BetterA strong AI judge can match people, but it can still be wrong. Sample its picks and check them.

  • Trap"Let the model rate its own drafts."

    BetterA model can favour its own answers. Use a separate judge, and check it against people.

Can you spot the weak rule?

Spot the weak rule

A labeller reads these rules for a claims-reply assistant. Which one will teach the model a bad habit?

Quick check

A team ranks 4 drafts for each of 300 prompts, with no ties. How many preference pairs does that make?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q288What is RLHF?10 min
  2. Q289What is a reward model?11 min
  3. Q291What is DPO?11 min
  4. Q250What biases do judges have (position, length, self-preference)?11 min
  5. Q294How do you prepare a fine-tuning dataset?11 min

Last updated on 27 November 2026

Building a product that needs human or AI feedback on answers?

I design and build AI products and agents, the interface and the system behind it. Book a short call and tell me what you need.