Practice
1. In a deep learning model, when is it more appropriate to use Layer Normalization instead of Batch Normalization?
easy
Solution
Step 1: Understand the context of normalization techniques.
Batch Normalization relies on batch statistics, which can be unstable with small batch sizes. Layer Normalization uses layer statistics, making it more stable for small batches or online learning.Step 2: Eliminate wrong options.
When the model is trained on a very large batch size. is incorrect because large batch sizes are suitable for Batch Normalization. When the model has a very deep architecture. is incorrect because depth doesn't directly affect the choice between these normalizations. When the model is trained on a balanced dataset. is irrelevant to normalization choice.Final Answer:
Option B -> Option BQuick Check:
Layer Norm for small batches or online learning. [OK]
Hint: Layer Norm for small batches or online learning. [OK]
Common Mistakes:
2. In a CI/CD pipeline for ML, which component is responsible for automatically retraining models when new data is available?
easy
Solution
Step 1: Identify the role of each component.
Version control manages code, CI server automates testing, model registry stores models, data pipeline handles data flow.Step 2: Eliminate wrong options.
Version control (A) and CI server (B) don't handle data. Model registry (C) stores models, not data. Data pipeline (D) triggers retraining with new data.Final Answer:
Option B -> Option BQuick Check:
Data pipeline triggers retraining. [OK]
Hint: Data pipeline triggers retraining. [OK]
Common Mistakes:
3. When deciding between offline and online evaluation for a new feature in a web application, which approach is more suitable if user feedback is critical and why?
medium
Solution
Step 1: Identify the need for user feedback.
When user feedback is critical, capturing real interactions is essential.Step 2: Evaluate the suitability of each approach.
Offline evaluation, because it allows for controlled experiments. is incorrect because controlled experiments do not capture real-time feedback. Offline evaluation, because it is faster and less resource-intensive. is incorrect because speed and resource usage do not address feedback needs. Online evaluation, because it avoids overfitting to historical data. is partially correct but does not emphasize feedback.Final Answer:
Option B -> Option BQuick Check:
Real feedback needs online evaluation. [OK]
Hint: Real feedback needs online evaluation. [OK]
Common Mistakes:
4. A model is showing unexpectedly high validation accuracy but low test accuracy. What is the most likely cause?
medium
Solution
Step 1: Diagnose the issue
High validation accuracy but low test accuracy suggests the validation set may not be representative.Step 2: Eliminate wrong options
The model is underfitting the training data. would affect both validation and test accuracy, The test set is too similar to the training set. would not cause low test accuracy, and The model has too many parameters. would affect both validation and test accuracy similarly.Final Answer:
Option D -> Option DQuick Check:
Small validation set = misleading accuracy [OK]
Hint: Small validation set = misleading accuracy [OK]
Common Mistakes:
5. You need to design a system using RAG prompting for a real-time question-answering application. Which approach ensures the system remains efficient and accurate?
hard
Solution
Step 1: Understand RAG efficiency
For real-time applications, updating documents based on interactions ensures relevance and accuracy.Step 2: Eliminate wrong options
Use a static set of documents for retrieval to ensure consistency. lacks adaptability. Rely solely on the model's pre-trained knowledge without retrieval. ignores the retrieval component. Use a large, diverse document set without updates to avoid bias. risks outdated information.Final Answer:
Option C -> Option CQuick Check:
Update documents for real-time RAG efficiency. [OK]
Hint: Update documents for real-time RAG efficiency. [OK]
Common Mistakes:
