ML / AI System Design

ML pipeline, feature stores, model serving, online vs batch, when to use deep learning

Technical Reference & Key Concepts

ML Pipeline Stages

  1. Data Ingestion: Collect raw data from logs, databases, event streams.
  2. Feature Engineering: Transform raw data into features. Normalization, encoding, embedding.
  3. Feature Store: Centralized registry for features (Feast, Tecton). Reusable, consistent train/serve.
  4. Training: Model selection, hyperparameter tuning, experiment tracking (MLflow).
  5. Evaluation: Offline metrics (precision, recall, AUC) + online A/B testing.
  6. Serving: Batch (scheduled predictions), online (low-latency API), or edge (on-device).
  7. Monitoring: Data drift, model drift, prediction distributions. Retrain triggers.

When to Use Deep Learning

  • Yes: Unstructured data (images, audio, text), complex patterns, huge datasets.
  • No: Structured/tabular data with <100K rows. Gradient-boosted trees (XGBoost) often win.