Choosing an LLM Alignment Recipe for a Support Assistant
Machine LearningModel answerLast updated
Weigh PPO-based RLHF against DPO, use AI-generated feedback when labels are scarce, and diagnose and fix a model that over-refuses harmless requests after alignment.
Context
Your team is preparing a pre-trained large language model for deployment as a customer support assistant. The base model is fluent and capable, but it occasionally invents facts (hallucination) and does not reliably follow the company's tone rules. You must choose and justify a post-training strategy that improves instruction following and keeps the model safe.
Questions
-
PPO-based RLHF vs. DPO. Compare the two approaches. Cover how each one uses preference data, and discuss the practical trade-offs in compute cost, training stability, and final quality. Which would you pick for this assistant, and why?
-
Scarce preference labels. Human comparisons are expensive and you have few of them. Describe how AI-generated feedback (RLAIF, Constitutional AI) can help. How would you detect and limit the biases introduced when one LLM acts as the grader for another?
-
Over-refusal. After alignment the model is very helpful, but it now declines harmless requests. How would you diagnose the cause, and what would you change to reduce the refusals without making the model less safe?
What a strong answer covers
- The difference between learning an explicit reward model and optimizing the policy directly on preferences.
- Ways to measure alignment that go beyond subjective human ratings, such as automated benchmarks, programmatic checks, and model-based judges.
- How to manage the tension between being helpful and being harmless.
Hints
Hint 1
For question 1, start from the KL-regularized reward objective. Ask what happens if you solve for the optimal policy in closed form and substitute it back into the pairwise preference loss.
Hint 2
For question 2, list the known systematic errors of LLM judges (order, length, self-preference, style over substance) and pair each with a specific countermeasure. Keep a small human-labeled set to calibrate the judge.
Hint 3
For question 3, measure both failure directions at once: the refusal rate on harmless-but-edgy prompts and the compliance rate on truly harmful ones. Then check whether your preference data or judge implicitly treats refusal as the safe, high-scoring answer.
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Framing
A good answer treats this as three linked decisions: which optimizer to use, where preference labels come from and how far to trust them, and how to measure and balance helpfulness against safety. Throughout, tie choices to the product: a support bot whose main problems are tone (a style problem) and hallucination (a grounding problem).
1. PPO-based RLHF vs. DPO
RLHF with PPO
- Supervised fine-tune (SFT) on high-quality support transcripts.
- Train a reward model on pairs (preferred
y_w, rejectedy_l) with the Bradley-Terry loss:-log σ(r(x,y_w) - r(x,y_l)). - Optimize the policy with PPO on
E[r(x,y)] - β·KL(π || π_ref). The KL term keeps the policy near the SFT model, preserving fluency and limiting reward hacking.
DPO
The KL-regularized objective has a closed-form optimum, π* ∝ π_ref · exp(r/β). Rearranging expresses the reward as β·log(π/π_ref) plus a prompt-only normalizer. That normalizer cancels in the pairwise difference, giving a classification-style loss on log-probability ratios of chosen versus rejected responses. The policy itself is an implicit reward model, and the frozen reference model is the KL anchor.
Trade-offs
| Dimension | PPO | DPO |
|---|---|---|
| Compute | Policy, reference, reward model, and value model in memory, plus online generation, which dominates cost | Policy plus frozen reference; reference log-probs can be precomputed; cost is near SFT |
| Stability | Sensitive to KL coefficient, clipping, advantage estimation, value quality; reward hacking (e.g., length exploitation) | Few hyperparameters (β, learning rate); reproducible |
| Quality | On-policy exploration lets it improve on its own outputs; often stronger on hard reasoning tasks | Offline, so it suffers distribution shift as the policy moves; can reduce likelihood of both chosen and rejected responses; length bias; strong on style and tone |
Recommendation. Start from SFT, then use DPO, ideally iterative: sample from the current policy, label, retrain. This recovers much of PPO's on-policy benefit at far lower cost. Tone is mostly style, which DPO handles well. For hallucination, build pairs where the chosen answer is grounded in retrieved knowledge-base text (or honestly says it does not know) and the rejected answer is fluent but unsupported. Still train a reward model, since it is useful for best-of-n sampling, filtering, and monitoring. Revisit PPO only if evaluations show DPO plateauing on tasks that need exploration.
2. Scarce human labels: RLAIF and Constitutional AI
Mechanism
- Constitutional AI: the model critiques and revises its own drafts against written principles (e.g., "be polite and concise," "never state facts absent from the documentation"). Revisions become SFT data. Then an AI judge labels preference pairs by the same principles, and those labels feed DPO or RL.
- RLAIF: an LLM judge replaces most human labelers, giving cheap, consistent, scalable labels tied to a policy written once.
Judge biases and countermeasures
- Position bias: judge both orderings; keep only consistent verdicts.
- Verbosity bias: length-controlled win rates, rubric penalties for padding, regress out length.
- Self-preference: use a different model family or an ensemble of judges.
- Style over substance: rubric-based grading, reasoning before verdict, and supply reference documents for factual checks.
- Calibration: keep a human-labeled gold set (hundreds to a few thousand items). Report judge-human agreement per category and only rely on the judge where agreement is high.
- Uncertainty routing: send low-confidence or disagreeing cases to humans so the small human budget goes where it is most informative.
Measuring beyond human ratings
- Tone and format: programmatic, verifiable checks (required greeting, banned slang, length limits), in the style of IFEval.
- Hallucination: groundedness/faithfulness scores against retrieved documents, plus truthfulness probes.
- General quality: judge-based, length-controlled win rate against the baseline; held-out reward-model accuracy.
- Safety: harmful-compliance rate on a red-team set.
3. Diagnosing and fixing over-refusal
Diagnose
- Measure both sides. Refusal rate on benign-but-edgy prompts (public over-refusal sets plus an internal set mined from support logs, such as "how do I kill a hung process," "delete all my data," "my card was stolen") and compliance rate on genuinely harmful prompts. Plot them per checkpoint as a frontier, not a single number.
- Localize. Compare SFT, each DPO round, and different β values. Low β allows more drift and can amplify refusal habits.
- Inspect data and judges. What share of chosen responses are refusals? Do safety pairs teach a lexical shortcut ("attack" means refuse)? Does the reward model or AI judge treat refusal as automatically safe and good? Probe with minimal pairs that differ only in a trigger word.
- Cluster false refusals by topic and trigger to find the spurious features.
Mitigate without losing safety
- Contrastive borderline pairs. For benign-but-sensitive prompts: chosen is a helpful compliant answer, rejected is a refusal. For truly harmful prompts: chosen is a brief, non-preachy refusal with a safe alternative or escalation path; rejected is either harmful compliance or a lecture.
- Rebalance the mix so refusal is not the default easy answer, and upweight examples that are both safe and very helpful.
- Separate objectives. Train distinct helpfulness and harmlessness reward models and combine them with a constraint (e.g., a Lagrangian, safe-RLHF style) rather than one blended score, so safety acts as a floor rather than a dominant term.
- Guardrails outside the model. A lightweight input/output classifier and policy rules can handle the highest-risk categories, letting the model be less trigger-happy.
- Regression gating. Track the refusal/compliance frontier in CI; block a checkpoint that improves one axis by degrading the other beyond a set tolerance.
Common mistakes
- Presenting DPO as strictly better, or PPO as obsolete, without discussing distribution shift and on-policy data.
- Trusting an LLM judge without calibrating it against human labels.
- Reporting a single "safety score" instead of both over-refusal and harmful-compliance rates.
- Fixing over-refusal by simply deleting safety data, which moves the model along the frontier instead of improving it.