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

What is chain-of-thought (CoT) prompting? Give a short example that elicits step-by-step reasoning, and explain when CoT usually improves accuracy versus when it may degrade performance or increase latency/cost.

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.

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.

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

Define perplexity for language models and explain how it relates to average negative log-likelihood. What are the limitations of perplexity as an evaluation metric for open-ended generation? As part of your answer, show how you would compute it from logits given target token ids.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.