InterviewStack.io LogoInterviewStack.io

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.

MediumTechnical
81 practiced

Explain scaling laws for language models: how do model size, dataset size, and compute budget influence loss and generalization? What are the practical consequences for dataset preparation, model selection, and cost estimates when planning to train an LLM?

MediumTechnical
73 practiced

At a high level, describe diffusion generative models: what are the forward (noising) and reverse (denoising) processes, how is the model trained, and how does sampling work at generation time? Give an example use case where diffusion is preferred over GANs.

HardTechnical
102 practiced

You must choose an approach for a production chatbot: (A) a supervised model fine-tuned on conversation logs, (B) retrieval plus a reranker, or (C) RL fine-tuning with human feedback (RLHF). Compare these on safety, response quality, data requirements, compute cost, and monitoring needs. Which would you choose for a first production release, and why?

EasyTechnical
79 practiced

What is the difference between prompting an LLM and fine-tuning it to change its behavior? In what scenarios is prompting a sufficient first approach, and when does it become insufficient, requiring fine-tuning instead?

EasyTechnical
86 practiced

Compare transformer encoder-only models (e.g., BERT) with decoder-only models (e.g., GPT) at an applied level: how do the pre-training objectives and input handling differ, and which task types fit which architecture? At a high level, why did the transformer architecture displace RNNs and LSTMs for most language tasks?

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.