Fine-tuning, RLHF & Alignment·Question 31 of 61Intermediate

You have 500k instruction examples of mixed quality and compute budget to train on 20k. How do you choose the 20k?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Treat it as selection along three axes: quality, difficulty and diversity. Optimising any one alone fails.

Full worked answer with diagram

Treat it as selection along three axes: quality, difficulty and diversity. Optimising any one alone fails.

1. Hard filters first (cheap, do them before anything expensive): dedup, truncated or malformed responses, length outliers, wrong language, format violations, template artifacts ("As an AI language model"), leaked system prompts, unwanted refusals. This typically removes 20-40% and costs nothing.

2. Quality scoring. LLM judge with an explicit rubric per example (Alpagasus-style), or a reward model score. A small judge over 500k items is affordable, and a 7B RM scoring in a single batched pass is cheaper still.

3. Difficulty. Examples your model already nails add nothing. IFD (instruction-following difficulty) scores how much having the instruction in front of the response lowers the loss on that response, and you keep the harder examples: the ones the model still cannot predict well even with the instruction present. Response perplexity under your current model is a cruder proxy for the same idea.

4. Diversity. Embed the instructions, cluster into a few thousand clusters, sample with a per-cluster cap. Without this, your top-scored 20k collapses onto one or two intents, because judges have systematic taste.

5. Mixture. Set the per-capability budget up front to match production traffic, plus a general-instruction slice to prevent regressions. Selection scores should compete within a bucket, not across buckets.

Then read 100 random selected examples yourself. Every selection pipeline I have built had a bug that only surfaced by reading.

The part that separates candidates: ablate against random. Train on a random 20k, your selected 20k, and 20k selected on a single axis. If the elaborate pipeline does not beat random 20k on a real eval, you built a Rube Goldberg machine and random is the better engineering decision. That baseline is non-negotiable, and it fails more often than people admit.

Worth sketching. the funnel ends at the baseline it has to beat, which is the point of the answer.

flowchart LR
    A["500k mixed quality"] --> B["Hard filters: dedup, malformed,<br/>wrong language, artifacts"]
    B --> C["Quality score:<br/>judge or reward model"]
    C --> D["Difficulty score:<br/>IFD or response perplexity"]
    D --> E["Cluster, cap per cluster"]
    E --> F["Per-capability budget<br/>matched to traffic"]
    F --> G["20k selected"]
    G -->|"must beat"| H["Random 20k"]

What a good answer covers

  • Treat it as selection along three axes: quality, difficulty and diversity
  • Hard filters first (cheap, do them before anything expensive)
  • This typically removes 20-40% and costs nothing
  • LLM judge with an explicit rubric per example (Alpagasus-style), or a reward model score
  • A small judge over 500k items is affordable, and a 7B RM scoring in a single batched pass is cheaper still

Key terms: 1. Hard filters first · 2. Quality scoring · 3. Difficulty · 4. Diversity · 5. Mixture · ablate against random

Interviewer follow-ups to expect

  1. How would you handle the case where your judge model and your target model share a base, so the judge systematically prefers its own style?

  2. What changes if the 500k examples come from 4 different sources with very different quality profiles?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep