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
79 practiced

Describe the common pre-training objectives used for large language models (next-token prediction / causal LM, masked language modeling, denoising / span corruption). For a model intended for free-form generation and chat, which objective is most appropriate 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
78 practiced

What are the practical limitations of few-shot in-context learning? For each limitation you identify, what would you do about it in production?

HardTechnical
95 practiced

Implement beam search decoding with length normalization in Python. Accept a scoring function score(prefix_tokens) -> log_probs and parameters beam_width and length_penalty, and return the top hypothesis. Explain how length_penalty changes ranking and how you would manage memory for large beams.

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?

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.