Practice
1. 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:
2. As the number of users and ads increases tenfold in an ad auction system, which component is most likely to fail first?
hard
Solution
Step 1: Consider scale impact
With a tenfold increase in users and ads, the User Data Storage is likely to face capacity issues first due to the sheer volume of data.Step 2: Eliminate wrong options
- Ad Ranking Module: Computationally intensive but not storage-bound.
- Bid Management System: Handles bids, not directly affected by user volume.
- Network Bandwidth: Affects data transfer, but storage is a more immediate bottleneck.
Final Answer:
Option A -> Option AQuick Check:
Storage fails first with data volume increase. [OK]
Hint: Storage fails first with data volume increase. [OK]
Common Mistakes:
3. As the user base scales 10x, which component of a DLRM-based CTR prediction system is most likely to become a bottleneck?
hard
Solution
Step 1: Consider scaling effects on components.
Embedding tables grow with user and feature diversity.Step 2: Eliminate wrong options.
Preprocessing (A) and inference (B) scale with compute resources. Storage (D) is less critical than real-time constraints.Final Answer:
Option D -> Option DQuick Check:
Embedding tables grow with scale. [OK]
Hint: Embedding tables grow with scale. [OK]
Common Mistakes:
4. As the number of users increases tenfold in a delivery forecasting system, which component is most likely to become a bottleneck first?
hard
Solution
Step 1: Consider the impact of user scale on system components
Real-time prediction latency is critical as user requests increase.Step 2: Eliminate wrong options
Data storage (A) and feature engineering (D) scale more linearly. Model training (B) is periodic, not real-time.Final Answer:
Option A -> Option AQuick Check:
Latency is the first bottleneck at scale. [OK]
Hint: Latency is the first bottleneck at scale. [OK]
Common Mistakes:
5. As the dataset size increases 10x in a FAISS-based vector search system, which component is most likely to become a bottleneck first?
hard
Solution
Step 1: Consider the impact of dataset size increase.
Index storage will grow significantly, potentially becoming a bottleneck.Step 2: Eliminate wrong options.
Search algorithm, dimensionality reduction, and quantization are less affected by size increase compared to storage.Final Answer:
Option A -> Option AQuick Check:
Index storage grows with dataset size. [OK]
Hint: Index storage grows with dataset size. [OK]
Common Mistakes:
