LLM Fine-Tuning and Alignment Questions

Adapting foundation models to specific tasks and desired behavior. Covers transfer learning and using pretrained models, full and parameter-efficient fine-tuning, instruction tuning, and alignment methods such as RLHF and preference optimization. Focuses on when and how to customize a base model rather than prompt it, and the data and compute tradeoffs involved.

EasyTechnical
64 practiced

In Python, implement a function that converts a list of pairwise preference records into training pairs for a reward model. Input: list of tuples (prompt, completion_a, completion_b, preferred) where preferred is 'A' or 'B'. Output: list of examples [(input_text, label)] where label is 1 if A preferred else 0, and input_text encodes prompt and both completions using the format: 'PROMPT: <prompt>
A: <completion_a>
B: <completion_b>'. Document assumptions.

HardSystem Design
56 practiced

Explain how to integrate RLHF training and deployment into an ML CI/CD pipeline: reproducible training runs, automated evaluation gates (offline plus human review), canary and shadow deployments for RL-trained policies, model versioning, and safe rollback when production metrics regress. What lineage and logging metadata would you record (dataset versions, prompt templates, annotator IDs, seeds, model checkpoints, and for production interactions: prompts, model outputs, log-probs, timestamps, and judgments) to support audits, reproducibility, and rollback?

HardTechnical
62 practiced

Propose a causal-evaluation strategy to validate that a reward model is learning genuine human preferences and not spurious shortcuts (for example prompt length or token frequency). Include experimental designs (counterfactual prompts, randomized prompt perturbations), statistical tests, and how causal-inference techniques could help distinguish whether a measured change in preferences reflects a real model-capability improvement versus a bias in the reward model itself.

EasyTechnical
87 practiced

What is alignment drift (sometimes called alignment regression) in deployed LLMs and what common causes create it post-deployment? Provide at least three practical mitigation strategies teams can apply to reduce drift risk over time.

HardTechnical
60 practiced

Propose a scalable approach to attribute a harmful model response to training data sources or model internals. What tooling and experiments would you use to trace the cause, what remediation would you propose once a source is identified, and how would you measure remediation effectiveness at scale?

Unlock Full Question Bank

Get access to all LLM Fine-Tuning and Alignment interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.