ML SYSTEM DESIGN & MLOPS · INTERVIEW QUESTION
What are ML design patterns? Explain the Feature Store pattern.
🔴 advanced · System Design Patterns
Hint: Think about reusable solutions for common ML engineering challenges.
Answer
ML design patterns are reusable solutions for recurring ML engineering problems. Feature Store pattern: centralized repository for feature engineering that serves both training and serving.
Components:
-
Offline store: historical features for training (data warehouse, S3/Parquet).
-
Online store: low-latency features for serving (Redis, DynamoDB).
-
Feature registry: metadata, lineage, documentation.
-
Transformation engine: consistent feature computation.
Benefits: feature reuse across teams, training-serving consistency (prevents skew), point-in-time correctness (avoid future data leakage), feature discovery.
Tools: Feast, Tecton, Hopsworks. Other key patterns: Transform (preprocessing pipeline), Embeddings (learned representations), Cascade (chain of models), Two-phase prediction (candidate generation + ranking), Stateless serving function.
Related questions
- Design a real-time ML serving system for a recommendation engine handling 10k QPS.
- Design a fraud detection system. What ML and engineering challenges arise?
- When should you train/fine-tune your own LLM vs use a 3rd-party API?
- What is LLMOps and how does it differ from traditional MLOps?
- What is data drift and concept drift? How do you detect and handle them?