Fine-tuning, RLHF & Alignment·Question 46 of 61Advanced

Design an end-to-end fine-tuning pipeline for a customer-support model at a mid-size company. Walk me through data → training → eval → deployment → iteration.

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

Frame it first: goal - replace a prompted frontier model with a cheaper/faster tuned model (say, an open 8B) for tier-1 support, at equal-or-better quality, with RAG handling product knowledge. Success metric defined up front: resolution quality (judge + human-rated), deflection rate, escalation precision, latency, cost per ticket.

Full worked answer

Frame it first: goal - replace a prompted frontier model with a cheaper/faster tuned model (say, an open 8B) for tier-1 support, at equal-or-better quality, with RAG handling product knowledge. Success metric defined up front: resolution quality (judge + human-rated), deflection rate, escalation precision, latency, cost per ticket.

Data: source from historical agent transcripts (privacy-scrubbed: PII removal, consent/policy review). Filter to top-rated resolutions; render into the base model's chat template with the production system prompt and retrieved context included - train the model the way it will be served. Curation: dedup (exact + embedding near-dup), decontaminate against eval sets, LLM-judge filtering for tone/correctness, manual read of ~300 random examples. Include hard negatives: escalation cases, "I don't know - here's a human" examples, and off-topic deflections, or the model will never learn those behaviours. Target ~5-20k high-quality examples; mix in ~10-20% general instruction data against forgetting.

Training: QLoRA on the 8B (r=16-32, all linear modules, LR ~1e-4, 1-2 epochs, cosine + warmup) - cheap enough to sweep LR×epochs and pick by held-out eval. Optionally a DPO pass afterward using preference pairs mined from agent edits/ratings of model drafts.

Eval: held-out set from real ticket distribution with slice metrics (intent, length, language); regression suite (instruction following, safety/over-refusal, general capability); grounding checks (does it cite retrieved context, does it hallucinate policy). Gate: beats the prompted-frontier baseline on quality at target cost, no regression slice > threshold.

Deployment: vLLM with the adapter (unmerged initially - instant rollback = repoint adapter), shadow mode against live traffic first, then canary 5% → 50% → 100% with online metrics and human escalation review.

Iteration: production feedback (agent corrections, CSAT, escalations) flows into the next data batch - mined for new SFT examples and DPO pairs; monthly retrain cadence; drift monitoring on input distribution; every base-model upgrade re-runs the whole eval gate. The pipeline, not the checkpoint, is the asset.

What a good answer covers

  • Frame it first: goal - replace a prompted frontier model with a cheaper/faster tuned model (say, an open…
  • Success metric defined up front
  • Data: source from historical agent transcripts (privacy-scrubbed: PII removal, consent/policy review)
  • Filter to top-rated resolutions; render into the base model's chat template with the production system…
  • Curation: dedup (exact + embedding near-dup), decontaminate against eval sets, LLM-judge filtering for…

Key terms: Frame it first · Data · Training · Eval · Deployment · Iteration

Interviewer follow-ups to expect

  1. Where does RAG sit in training data vs serving, and why must they match?

  2. What would make you ship the prompted baseline instead?

  3. How do you prevent feedback-loop bias when training on the model's own accepted drafts?

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