InterviewStack.io LogoInterviewStack.io

Applications and Alignment Techniques Questions

Focuses on real world uses of generative systems and the methods used to align model behavior with human preferences. Topics include application domains such as text generation, summarization, question answering, code generation, creative content and image generation. Covers alignment pipelines including supervised fine tuning, reward modeling, and reinforcement learning from human feedback for instruction following and preference shaping. Includes discussion of practical evaluation beyond perplexity such as human evaluation, task specific metrics, robustness testing, and measuring helpfulness and harmfulness. Also covers integration considerations when embedding generative capabilities into products and workflows.

MediumSystem Design
39 practiced
Design a retrieval-augmented generation (RAG) system to power a factual question-answering service over a 100M document corpus at 100 QPS with 99th percentile latency below 500ms. Describe the retrieval index, candidate reranking, document selection strategy, context windowing for the generator, caching, and how you would measure factuality at scale.
MediumTechnical
32 practiced
You are advising a bootstrapped startup with limited compute and a small labeled dataset. Should they use full-parameter fine-tuning, LoRA/PEFT, or prompt-tuning for aligning a third-party 7B pretrained model to their domain? Justify your recommendation with respect to cost, iteration speed, expected quality, maintenance, and potential failure modes.
MediumTechnical
39 practiced
Describe methods to measure and improve calibration (confidence estimation) for a generative model used in a QA system. Include practical approaches for estimating confidence on free-text answers, calibration metrics you would use, and strategies to use confidence estimates at runtime (e.g., refuse-to-answer thresholds, routing to retrieval or human experts).
EasyTechnical
38 practiced
Write a concise Python (PyTorch) training loop pseudocode for supervised fine-tuning (SFT) of a causal language model (decoder-only) that: computes cross-entropy loss from input_ids and attention_mask, supports gradient accumulation, and uses mixed precision with torch.cuda.amp. Assume model and dataloader are provided. Focus on the loop structure and key API calls (no need to handle checkpointing or scheduler details).
EasyTechnical
37 practiced
List five concrete prompt engineering techniques that help ensure consistency and instruction following for a generative model (examples: role prompting, explicit templates, few-shot exemplars, constraint tokens). For each technique give a short example and explain one limitation or risk associated with it.

Unlock Full Question Bank

Get access to hundreds of Applications and Alignment Techniques interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.