Practice
1. In the context of intent classification, which of the following techniques is most suitable for handling imbalanced datasets?
easy
Solution
Step 1: Identify the challenge of imbalanced datasets.
Imbalanced datasets can lead to biased models that favor the majority class.Step 2: Evaluate each option.
Use a simple logistic regression model: Logistic regression without addressing imbalance will likely be biased. Use a linear SVM without any modifications: Linear SVM also suffers from imbalance without adjustments. Ignore the imbalance and focus on feature engineering: Ignoring imbalance is not a solution. Apply SMOTE (Synthetic Minority Over-sampling Technique): SMOTE is specifically designed to handle imbalance by generating synthetic samples.Final Answer:
Option A -> Option AQuick Check:
SMOTE for imbalance handling. [OK]
Hint: SMOTE is key for imbalanced datasets. [OK]
Common Mistakes:
2. In a recommendation system designed to avoid filter bubbles, what is a likely failure mode if the diversity re-ranking layer is not properly tuned?
medium
Solution
Step 1: Identify the impact of poor tuning
Poor tuning can lead to irrelevant recommendations, reducing user engagement.Step 2: Eliminate wrong options
Increased computational cost (A) and latency (D) are technical issues, not directly related to user engagement. Overfitting (C) is more about personalization than diversity.Final Answer:
Option A -> Option AQuick Check:
Poor tuning reduces engagement due to irrelevant content [OK]
Hint: Poor tuning reduces engagement due to irrelevant content [OK]
Common Mistakes:
3. When implementing a 'People You May Know' feature, should you use a simple Jaccard similarity or a more complex graph embedding approach? Assume the graph is sparse and dynamic.
medium
Solution
Step 1: Analyze graph characteristics.
The graph is sparse and dynamic, requiring methods that capture complex relationships.Step 2: Evaluate options.
Jaccard similarity (A) is efficient but too simplistic for capturing complex relationships. Graph embeddings (B) are suitable as they capture more nuanced relationships. Jaccard similarity (C) does not inherently adapt to dynamic graphs. Graph embeddings (D) are not always better, but in this case, they are due to the complexity of relationships.Final Answer:
Option D -> Option DQuick Check:
Embeddings capture complex relationships. [OK]
Hint: Embeddings capture complex relationships. [OK]
Common Mistakes:
4. In a 'People You May Know' system, what is a likely failure mode if the graph is not updated frequently?
medium
Solution
Step 1: Identify the impact of infrequent updates.
Infrequent updates lead to stale data.Step 2: Evaluate options.
Recommending too many new connections (A) is unlikely with stale data. Computational expense (B) is unrelated to update frequency. Outdated connections (C) are a direct result of stale data. Scaling issues (D) relate to system architecture, not update frequency.Final Answer:
Option A -> Option AQuick Check:
Stale data leads to outdated recommendations. [OK]
Hint: Stale data leads to outdated recommendations. [OK]
Common Mistakes:
5. As the number of queries increases tenfold, which component of a search ranking system is most likely to become a bottleneck first?
hard
Solution
Step 1: Consider the impact of scaling queries
Ranking computation is resource-intensive and scales with query volume.Step 2: Evaluate other components
Query parsing and document retrieval are less computationally intensive, and index updating is not query-dependent.Final Answer:
Option A -> Option AQuick Check:
Ranking computation scales with query volume. [OK]
Hint: Ranking computation scales with query volume. [OK]
Common Mistakes:
