LLM Architectures & Foundations
Deep Learning & Generative AI
Generative AI & Large Language Models (LLMs) Interview Questions
Interview questions on Generative AI & Large Language Models (LLMs) Interview Questions.
127 questions
LLM Architectures & Foundations
Q2. What are autoregressive language models?
LLM Architectures & Foundations
Q3. How do autoregressive models employ the chain rule of probability?
LLM Architectures & Foundations
Q4. What are different types of language models?
LLM Architectures & Foundations
Q5. What are encoder-only language models?
LLM Architectures & Foundations
Q6. State the pros and cons of an encoder-only language model?
LLM Architectures & Foundations
Q7. What are decoder-only language models?
LLM Architectures & Foundations
Q8. What are pros and cons of decoder-only language models?
LLM Architectures & Foundations
Q9. What are encoder-decoder language models?
LLM Architectures & Foundations
Q10. What are pros and cons of encoder-decoder language models?
LLM Architectures & Foundations
Q11. What is the difference between proprietary and open-source Large Language Models (LLMs)?
LLM Architectures & Foundations
Q12. What is the context window in LLMs, and why does it matter?
LLM Architectures & Foundations
Q13. How can we use an encoder-only model for classification tasks?
LLM Architectures & Foundations
Q14. What are sequence-to-sequence models, and where are they applied?
LLM Architectures & Foundations
Q15. What is the difference between representation models and generative models?
LLM Architectures & Foundations
Q16. What are emergent properties of LLMs?
LLM Architectures & Foundations
Q17. What are generative versus discriminative models in NLP?
LLM Architectures & Foundations
Q18. How does GPT-4 differ from GPT-3 in features and applications?
LLM Architectures & Foundations
Q19. What types of foundation models exist?
LLM Architectures & Foundations
Q20. How do discriminative and generative AI differ?
LLM Architectures & Foundations
Q21. How do LLMs differ from traditional statistical language models?
LLM Architectures & Foundations
Q22. What defines a Large Language Model (LLM)?
Tokenization & Embeddings
Q23. What does tokenization entail, and why is it critical for LLMs?
Tokenization & Embeddings
Q24. What are the different parameters of a tokenizer?
Tokenization & Embeddings
Q25. What are the key considerations in designing an effective tokenization strategy for language models?
Tokenization & Embeddings
Q26. Can you explain the Bag-of-Words (BoW) model and discuss its limitations?
Tokenization & Embeddings
Q27. What are word2vec models and how are they trained?
Tokenization & Embeddings
Q28. What are the main limitations of the word2vec model?
Tokenization & Embeddings
Q29. What are different types of embeddings?
Tokenization & Embeddings
Q30. Which tokenizer is used in the BERT model, and what are the special tokens used in the BERT Base Uncased model?
Tokenization & Embeddings
Q31. What are the embeddings, and how are they initialized in LLMs?
Tokenization & Embeddings
Q32. How do LLMs manage out-of-vocabulary (OOV) words?
Tokenization & Embeddings
Q33. What is Byte‑Pair Encoding (BPE) and how does it work?
Tokenization & Embeddings
Q34. Illustrate with a simple example, how does BPE work?
Tokenization & Embeddings
Q35. Which tokenizer is used in the GPT-3/4 model, and what are the special tokens used in the GPT-3/4 model?
Tokenization & Embeddings
Q36. What are positional encodings, and why are they used?
Tokenization & Embeddings
Q37. What are different types of positional embeddings?
Tokenization & Embeddings
Q38. How does fine-tuning embedding models improve dense retrieval?
Tokenization & Embeddings
Q39. How does Adaptive Softmax optimize LLMs?
Tokenization & Embeddings
Q40. What is contrastive learning?
Tokenization & Embeddings
Q41. What makes TSDAE a suitable method for learning sentence embeddings in a completely unsupervised setting, and how does it differ from masked language modeling?
Tokenization & Embeddings
Q42. What is cosine-similarity loss, and how is it used to train embedding models?
Tokenization & Embeddings
Q43. Suppose you have a limited labeled dataset and want to train a sentence embedding model. How would you approach this effectively without compromising performance?
Tokenization & Embeddings
Q44. What is a few-shot classification, and why is it useful?
Tokenization & Embeddings
Q45. What are the three main steps of the SetFit framework for few-shot text classification?
Attention, KV Cache & Efficient Inference
Q46. How does the attention mechanism function in transformer models?
Attention, KV Cache & Efficient Inference
Q47. What are the main steps involved in the attention mechanism?
Attention, KV Cache & Efficient Inference
Q48. What is the KV cache in transformer models?
Attention, KV Cache & Efficient Inference
Q49. What are the advantages and disadvantages of using a Key-Value (KV) cache in Transformer models?
Attention, KV Cache & Efficient Inference
Q50. What is model distillation, and how does it benefit LLMs?
Attention, KV Cache & Efficient Inference
Q51. How do transformers improve on traditional Seq2Seq models?
Attention, KV Cache & Efficient Inference
Q52. What is multi-head attention, and how does it enhance LLMs?
Attention, KV Cache & Efficient Inference
Q53. What is local (sparse) attention and how does it work?
Attention, KV Cache & Efficient Inference
Q54. What is Flash Attention?
Attention, KV Cache & Efficient Inference
Q55. How is the softmax function applied in attention mechanisms?
Attention, KV Cache & Efficient Inference
Q56. How does the dot product contribute to self-attention?
Attention, KV Cache & Efficient Inference
Q57. How are attention scores calculated in transformers?
Attention, KV Cache & Efficient Inference
Q58. How does Mixture of Experts(MoE) enhance LLM scalability?
Attention, KV Cache & Efficient Inference
Q59. How do transformers address the vanishing gradient problem?
Attention, KV Cache & Efficient Inference
Q60. How do encoders and decoders differ in transformers?
LLM Training & Pre-training
Q61. How are Large Language Models (LLMs) trained?
LLM Training & Pre-training
Q62. What is masked language modeling, and how does it aid pretraining?
LLM Training & Pre-training
Q63. What is the BERT model, and how was it trained?
LLM Training & Pre-training
Q64. How does RoBERTa differ from the BERT model?
LLM Training & Pre-training
Q65. How do autoregressive and masked models differ in LLM training?
LLM Training & Pre-training
Q66. What is the next sentence prediction, and how does it enhance LLMs?
LLM Training & Pre-training
Q67. What is overfitting, and how can it be mitigated in LLMs?
LLM Training & Pre-training
Q68. Why is cross-entropy loss used in language modeling?
LLM Training & Pre-training
Q69. How are gradients computed for embeddings in LLMs?
LLM Training & Pre-training
Q70. What is the Jacobian matrix in transformer backpropagation?
LLM Training & Pre-training
Q71. How do eigenvalues and eigenvectors relate to dimensionality reduction?
LLM Training & Pre-training
Q72. What is KL divergence, and how is it used in LLMs?
LLM Training & Pre-training
Q73. What is the derivative of the ReLU function, and why is it significant?
LLM Training & Pre-training
Q74. How does the chain rule apply to gradient descent in LLMs?
LLM Training & Pre-training
Q75. What is hyper hyperparameter, and why is it important?
LLM Training & Pre-training
Q76. What is “continued pre training” with Masked Language Modeling, and why is it useful?
LLM Training & Pre-training
Q77. What’s the difference between token masking and whole-word masking in MLM?
LLM Training & Pre-training
Q78. What are the three main steps involved in LLM training?
Decoding Strategies & Prompt Engineering
Q79. How does beam search improve text generation compared to greedy decoding?
Decoding Strategies & Prompt Engineering
Q80. What role does temperature play in controlling LLM output?
Decoding Strategies & Prompt Engineering
Q81. How do top-k and top-p sampling differ in text generation?
Decoding Strategies & Prompt Engineering
Q82. Explain the decoding strategies used in LLMs?
Decoding Strategies & Prompt Engineering
Q83. Can we use generative models for classification tasks? If so, how?
Decoding Strategies & Prompt Engineering
Q84. Why is prompt engineering crucial for LLM performance?
Decoding Strategies & Prompt Engineering
Q85. What are some good prompting techniques one should know?
Decoding Strategies & Prompt Engineering
Q86. What is Chain-of-Thought (CoT) prompting, and how does it aid reasoning?
Decoding Strategies & Prompt Engineering
Q87. What is self-consistency in prompting, and how does it help improve the quality of generative model outputs? What are its trade-offs?
Decoding Strategies & Prompt Engineering
Q88. What is zero-shot learning, and how do LLMs implement it?
Decoding Strategies & Prompt Engineering
Q89. What is few-shot learning, and what are its benefits?
Decoding Strategies & Prompt Engineering
Q90. How can we control the output of a generative model?
Fine-Tuning & Model Adaptation
Q91. What distinguishes LoRA from QLoRA in fine-tuning LLMs?
Fine-Tuning & Model Adaptation
Q92. How can LLMs avoid catastrophic forgetting during fine-tuning?
Fine-Tuning & Model Adaptation
Q93. How does PEFT mitigate catastrophic forgetting?
Fine-Tuning & Model Adaptation
Q94. State the scenarios where you will use RAG over fine-tuning and vice versa?
Fine-Tuning & Model Adaptation
Q95. What is the difference between parameter-efficient fine-tuning (PEFT) and full fine-tuning? Which is better?
Fine-Tuning & Model Adaptation
Q96. What are adapters, and how do they enable parameter-efficient fine-tuning (PEFT)?
Fine-Tuning & Model Adaptation
Q97. What is LoRA (Low-Rank Adaptation) and how does it enable parameter-efficient fine-tuning?
Fine-Tuning & Model Adaptation
Q98. What is “intrinsic dimension” in the context of model fine-tuning, and why does it matter?
Fine-Tuning & Model Adaptation
Q99. How does LoRA differ from adapters?
Fine-Tuning & Model Adaptation
Q100. In LoRA fine-tuning, how are the low-rank matrices A and B initialized?
Fine-Tuning & Model Adaptation
Q101. In LoRA fine-tuning, how is the rank chosen?
Fine-Tuning & Model Adaptation
Q102. What is QLoRA, and how does it compare to standard LoRA?
RAG & Vector Databases
Q103. What is Dense Retrieval and how does it work?
RAG & Vector Databases
Q104. What are the caveats of dense retrieval?
RAG & Vector Databases
Q105. What are the best chunking strategies in RAG systems?
RAG & Vector Databases
Q106. What is ANN and how is it useful in RAG systems?
RAG & Vector Databases
Q107. What are the steps in Retrieval-Augmented Generation (RAG)?
RAG & Vector Databases
Q108. What is query rewriting in RAG systems, and why is it important for effective retrieval?
RAG & Vector Databases
Q109. What is Multi-query RAG?
RAG & Vector Databases
Q110. What is query routing in RAG systems, and how does it improve retrieval?
RAG & Vector Databases
Q111. What distinguishes multi-query RAG from multi-hop RAG?
RAG & Vector Databases
Q112. What is Agentic RAG?
Alignment & Preference Optimization
Q113. What is preference tuning, and why is it important?
Alignment & Preference Optimization
Q114. What is a reward model, and how does it automate preference evaluation in LLM alignment?
Alignment & Preference Optimization
Q115. What is Proximal Policy Optimization (PPO) in preference tuning, and how does it work?
Alignment & Preference Optimization
Q116. What is Direct Preference Optimization (DPO), and how does it function?
LLM Evaluation & Benchmarking
Q117. How do we evaluate the retrieval component in a RAG system?
LLM Evaluation & Benchmarking
Q118. How do we evaluate the generative component of a RAG model?
Agents, Tool Use & Memory
Q119. How does knowledge graph integration improve LLMs?
Agents, Tool Use & Memory
Q120. What do you mean by LLM memory, and why is it important?
Agents, Tool Use & Memory
Q121. What are LLM agents, and how do they extend the capabilities of language models beyond static chains?
Agents, Tool Use & Memory
Q122. What is the ReAct framework, and how does it enable step-by-step reasoning in LLM agents?
Multimodal Generative AI
Q123. How do Transformers work for vision tasks like image classification?
Multimodal Generative AI
Q124. How does CLIP create and align multimodal embeddings for images and text?
LLM Safety & Security
Q125. How would you fix an LLM generating biased or incorrect outputs?
LLMOps & Production
Q126. What challenges do LLMs face in deployment?
LLMOps & Production