Practice
1. For a delivery forecasting system, which metric is most appropriate to evaluate the accuracy of ETA predictions?
easy
Solution
Step 1: Identify the nature of the prediction task
ETA prediction is a regression task, focusing on continuous values.Step 2: Eliminate wrong options
F1 Score, AUC, and Precision are classification metrics. MAE is suitable for regression tasks.Final Answer:
Option C -> Option CQuick Check:
MAE for regression accuracy. [OK]
Hint: MAE for regression accuracy. [OK]
Common Mistakes:
2. 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:
3. In a search ranking system, which component is primarily responsible for determining the relevance of a document to a query?
easy
Solution
Step 1: Identify the role of each component
The ranking algorithm is responsible for determining the relevance of documents to a query.Step 2: Eliminate wrong options
Indexing module organizes data, query parser interprets queries, and crawler collects data.Final Answer:
Option B -> Option BQuick Check:
Ranking algorithm determines relevance. [OK]
Hint: Ranking algorithm determines relevance. [OK]
Common Mistakes:
4. When implementing a Guardrails System for LLMs, should you prioritize precision over recall, and why?
medium
Solution
Step 1: Understand the trade-off
Prioritizing precision minimizes false positives, crucial for user experience.Step 2: Eliminate wrong options
Recall is important but can lead to over-blocking, efficiency isn't the main concern, and equal importance isn't practical in all cases.Final Answer:
Option C -> Option CQuick Check:
Prioritize precision to avoid blocking legitimate content. [OK]
Hint: Prioritize precision to avoid blocking legitimate content. [OK]
Common Mistakes:
5. 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:
