Generative AI and Large Language Models Questions

The capabilities and behavior of modern generative and large language models. Covers how LLMs are pretrained, in-context learning and few-shot prompting, generative model families (autoregressive, diffusion), context windows, and tokenization and sampling. Emphasizes understanding what generative models can and cannot do and how they differ from discriminative ML.

EasyTechnical
154 practiced

Describe Proximal Policy Optimization (PPO) at a high level and explain why PPO is commonly used for fine-tuning language models with reward signals. Mention the role of the clipping objective (or KL regularization) and outline a typical training loop: collect rollouts → compute advantages → update policy.

MediumTechnical
151 practiced

Explain adapter modules for transformer models: how they are inserted (e.g., between attention and feed-forward), how they change parameter budgets, their advantages relative to full fine-tuning, and potential drawbacks. Design a lightweight adapter architecture for sequence classification and estimate the number of extra parameters for a 1.5B parameter base model.

HardTechnical
79 practiced

Write clear pseudocode for a PPO-style policy-optimization loop applied to an autoregressive language model, where actions are tokens: collecting rollouts (sequence generation under the current policy), scoring sequences with the reward model, computing advantages with a baseline/value function, and applying a policy loss with clipping and a KL penalty against a frozen reference policy. Explain how to handle variable-length sequences and masking in batched updates, and how you would tune the KL coefficient dynamically.

MediumTechnical
96 practiced

Explain the differences between zero-shot, one-shot, few-shot, and in-context learning in LLMs. Describe scenarios where each is preferred, and when you would reach for fine-tuning instead of relying on in-context capabilities.

HardTechnical
99 practiced

Design a hyperparameter-tuning strategy for fine-tuning a large language model on a new task, for example a 13B model with a fixed 100 GPU-hour budget or a 100k-example domain dataset. Cover which hyperparameters to tune (learning rate and schedule, weight decay, batch size, number of trainable layers or LoRA rank), search algorithm choice (Bayesian optimization, Hyperband, population-based training), multi-fidelity and early-stopping rules, layer-wise learning-rate decay versus separate optimizer parameter groups, and how to parallelize experiments and validate against overfitting and catastrophic forgetting under limited GPU resources.

Unlock Full Question Bank

Get access to all 37 Generative AI and Large Language Models interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.