InterviewStack.io LogoInterviewStack.io

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.

HardTechnical
69 practiced

You see an increase in hallucinations after fine-tuning an LLM on domain-specific QA. Propose a systematic debugging and mitigation plan: experiments to isolate the cause, dataset checks, training interventions, and runtime techniques to reduce hallucinations.

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.

HardTechnical
65 practiced

Discuss how to apply RLHF to align a multi-modal model that accepts both text and images (e.g., visual question answering). Cover reward-model design, human feedback collection for multi-modal outputs, and additional safety considerations unique to multi-modal alignment.

HardTechnical
52 practiced

What are the common sources of instability when applying PPO-based policy optimization to LLM fine-tuning, and which specific PPO hyperparameters most often cause it? For each source, describe the symptoms an engineer would observe, quick tuning steps, and any more advanced algorithmic or engineering mitigations you would consider, explaining when each helps and what it costs.

HardTechnical
65 practiced

As the AI/engineering lead for a significant new downstream domain, decide whether to retrain a foundation model from scratch, continue pretraining, fine-tune adapters on top of a frozen base, or instead keep the model frozen and rely on retrieval-augmented prompting. Propose a decision framework weighing data volume, domain distance, cost, risk of forgetting, latency, maintainability, regulatory constraints, user experience, and time-to-market.

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.