Practice
1. For a hate speech detection system, which metric is most appropriate to optimize for minimizing false positives?
easy
Solution
Step 1: Understand metric definitions
Precision measures the ratio of true positives to the sum of true positives and false positives.Step 2: Eliminate wrong options
Accuracy considers all classes, recall focuses on false negatives, and F1-score balances precision and recall.Final Answer:
Option B -> Option BQuick Check:
Minimize false positives = Precision [OK]
Hint: Minimize false positives = Precision [OK]
Common Mistakes:
2. In the context of semantic search, which component is responsible for encoding both queries and documents into a shared vector space?
easy
Solution
Step 1: Identify the role of each component
Bi-Encoders encode both queries and documents into a shared vector space for efficient retrieval.Step 2: Eliminate wrong options
Cross-Encoders evaluate query-document pairs directly, Dense Retrievers use encoded vectors, Sparse Retrievers use traditional methods.Final Answer:
Option A -> Option AQuick Check:
Bi-Encoder = shared vector space [check]
Hint: Bi-Encoder = shared vector space [check]
Common Mistakes:
3. In a spam detection system, when should you prefer a decision tree over a neural network?
medium
Solution
Step 1: Consider the need for model interpretability
Decision trees are preferred when interpretability is crucial due to their clear decision paths.Step 2: Eliminate options based on constraints
Neural networks (A, C, D) are better for large, unstructured data and when resources are abundant.Final Answer:
Option A -> Option AQuick Check:
Use trees for interpretability. [OK]
Hint: Use trees for interpretability. [OK]
Common Mistakes:
4. As a news feed system scales to 10x more users, which component is most likely to become a bottleneck first?
hard
Solution
Step 1: Analyze scaling challenges
The Recommendation Engine processes user data to generate personalized feeds, which becomes computationally intensive as user numbers grow.Step 2: Consider other components
B: Content Delivery Network scales well with caching. C: User Interface is less affected by user count. D: Data Storage can be expanded more easily than processing power.Final Answer:
Option B -> Option BQuick Check:
Recommendation Engine struggles first with user scale. [OK]
Hint: Recommendation Engine struggles first with user scale. [OK]
Common Mistakes:
5. As a recommendation system using neural collaborative filtering scales to 10x more users, which component is most likely to become a bottleneck?
hard
Solution
Step 1: Consider the impact of scaling on neural CF.
Increased data volume significantly affects model training time.Step 2: Eliminate wrong options.
Options A and D are less likely bottlenecks as storage and feature extraction can be optimized. Real-time recommendation latency. is affected but not as critically as training time.Final Answer:
Option A -> Option AQuick Check:
Scaling = training time bottleneck [OK]
Hint: Scaling = training time bottleneck [OK]
Common Mistakes:
