Practice
1. A transformer model is underperforming on a translation task. The model seems to ignore the context of the input sequence. What is the most likely cause?
medium
Solution
Step 1: Identify the role of positional encodings.
Positional encodings provide sequence order information, crucial for context.Step 2: Eliminate wrong options.
The model's attention heads are not properly initialized. is incorrect as initialization affects convergence, not context. The model's feedforward layers are too shallow. is incorrect because feedforward depth affects capacity, not context. The model's dropout rate is too high. is incorrect as dropout affects regularization, not context.Final Answer:
Option B -> Option BQuick Check:
Positional encodings ensure context. [OK]
Hint: Positional encodings ensure context. [OK]
Common Mistakes:
2. A neural network is not learning effectively, and the gradients are extremely small. What is the most likely cause?
medium
Solution
Step 1: Identify symptoms of vanishing gradients
Extremely small gradients often indicate the vanishing gradient problem, typically caused by certain activation functions like sigmoid or tanh.Step 2: Eliminate wrong options
The learning rate is too high. is incorrect because a high learning rate would cause divergence. The network is too shallow. is incorrect because a shallow network is less prone to vanishing gradients. The dataset is too small. is unrelated to gradient size.Final Answer:
Option C -> Option CQuick Check:
Small gradients often mean vanishing issue. [OK]
Hint: Small gradients often mean vanishing issue. [OK]
Common Mistakes:
3. When evaluating a recommendation system, why might you choose NDCG over MAP?
medium
Solution
Step 1: Understand metric differences
NDCG considers the position of relevant items, giving higher weight to top-ranked items.Step 2: Eliminate wrong options
MAP considers all relevant items equally, NDCG is not necessarily easier or more interpretable, and both metrics are sensitive to the number of relevant items.Final Answer:
Option C -> Option CQuick Check:
NDCG weights top positions more. [OK]
Hint: NDCG weights top positions more. [OK]
Common Mistakes:
4. You need to apply model interpretability techniques to a real-time fraud detection system. Which approach is most suitable?
hard
Solution
Step 1: Consider real-time constraints.
Real-time systems require fast interpretability methods.Step 2: Evaluate each option.
SHAP and LIME are computationally expensive for real-time use. Attention mechanisms provide built-in interpretability without significant overhead.Final Answer:
Option A -> Option AQuick Check:
Attention is efficient for real-time interpretability. [OK]
Hint: Attention is efficient for real-time interpretability. [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:
