CrackML by @ml.with.umang
Interview questions / GenAI & LLM
GenAI & LLM interview question

How do DPO and RLHF differ?

How do DPO and RLHF differ?. Structure your response as you would in a top-tier ML/AI engineering interview.

hardconceptEvidence 75/1001 source reportAmazon

The 60-second answer

RLHF typically learns a reward/preference signal and then optimizes the policy against it, often with a KL constraint to a reference model. DPO directly optimizes a preference objective from chosen/rejected pairs without an explicit reward-model-plus-RL stage.

Build the answer in this order

1
Define the mechanism

RLHF typically learns a reward/preference signal and then optimizes the policy against it, often with a KL constraint to a reference model.

2
Explain the architecture

DPO directly optimizes a preference objective from chosen/rejected pairs without an explicit reward-model-plus-RL stage.

3
Compare trade-offs

DPO is operationally simpler, while RLHF offers more flexibility for complex reward shaping and online interaction.

4
Close with serving + evaluation

Both depend strongly on preference-data quality, coverage, and distribution shift.

A useful interview mental model

This is the shape of a strong answer—not a script to memorize.

01Definition
02Mechanism
03Trade-offs
04Failure modes
05When to use

Senior-level signal

  • Discuss reward hacking, annotator disagreement, and KL/reference-model choices rather than treating preference optimization as a clean supervised problem.
  • Evaluate capability and safety regressions on slices outside the preference dataset.

What the interviewer is really testing

Understanding beyond prompting: architecture, retrieval, evaluation, inference, safety, latency, cost, and failure recovery.

Likely follow-up questions

What assumption makes this approach work?
When would you choose the strongest alternative instead?
What production or data failure mode changes your answer?

Common weak-answer patterns

  • Reciting a definition without mechanism or assumptions.
  • Claiming one technique is always better without a data regime.
  • Stopping before failure modes, validation, or deployment implications.