ML System Design

Framing a Business Problem as ML

Translating ambiguous business goals into clear machine learning problem formulations and optimization targets.

🟡 intermediate5 min readsystem-designmust-know
Problem Framing translates vague real world business objectives into concrete machine learning problems. Key steps include identifying the core prediction target, defining input features and output labels, selecting appropriate loss functions, and establishing metrics that align model performance directly with business KPIs. Proper framing prevents building models that optimize high accuracy while completely failing business goals.

What is ML Problem Framing?

In machine learning system design interviews and industry projects, business stakeholders rarely hand you a clean dataset with labeled target columns.

Instead, you receive vague business requests:

ML Problem Framing is the disciplined process of translating vague business goals into a formulated machine learning task:

  Vague Business Goal:  "Reduce Customer Churn"
                                 │
                                 ▼
  [ ML PROBLEM FRAMING ]
  - Task Type:          Binary Classification
  - Target Label (Y):    Y = 1 if User cancels paid plan within next 30 days; else 0
  - Prediction Trigger: Executed automatically on the 1st of every month
  - Observation Window: User activity features collected over past 90 days
  - Business Metric:    Revenue Retained = Saved Accounts * LTV - Campaign Intervention Cost

The 5 Steps of ML Problem Framing

┌──────────────────────────┬──────────────────────────┬──────────────────────────┐
│ 1. TASK CLASSIFICATION   │ 2. LABEL DEFINITION      │ 3. WINDOW TIMELINES      │
├──────────────────────────┼──────────────────────────┼──────────────────────────┤
│ Binary, Multi-Class,     │ Define positive/negative │ Specify Observation Window│
│ Regression, Ranking, or  │ target label rules       │ (X features) vs Prediction│
│ Reinforcement Learning.  │ unambiguously.           │ Horizon (Y label).       │
└──────────────────────────┴──────────────────────────┴──────────────────────────┘
┌──────────────────────────┬──────────────────────────┐
│ 4. OFFLINE / ONLINE METRICS│ 5. BUSINESS CONSTRAINTS│
├──────────────────────────┼──────────────────────────┤
│ Align Loss (LogLoss/NDCG)│ Latency SLAs (<50ms),    │
│ to Business KPIs (LTV).  │ VRAM memory limits, cost.│
└──────────────────────────┴──────────────────────────┘

Step 3: Defining Observation & Prediction Windows

A common framing mistake is Temporal Data Leakage: including future features in prediction inputs.

Always define strict temporal boundaries:

  │◄──────────── Observation Window (Past 90 Days) ────────────►│◄── Prediction Horizon (Next 30 Days) ──►│
  │ Collect Feature Inputs (X): Clicks, Logins, Support Tickets │ Observe Target Output Label (Y): Churn? │
  └─────────────────────────────────────────────────────────────┴─────────────────────────────────────────┘
  Timestamp T_0 (Prediction Trigger Time)

Common Framing Transformations

Ambiguous Business GoalMachine Learning Problem Formulation
"Recommend products users will like"Pointwise pCTR / CVR Prediction or Pairwise Learning-to-Rank ($NDCG@K$)
"Detect spam messages"High Precision Binary Classification with cost-sensitive thresholding
"Estimate house prices"Continuous Regression evaluating Mean Absolute Percentage Error (MAPE)
"Auto-complete search queries"Language Modeling (Causal Next-Token Prediction over search logs)

Say this out loud

Problem Framing translates vague business goals into concrete machine learning tasks. It defines prediction targets, label rules, observation windows, prediction horizons, and technical loss metrics aligned with business KPIs. Establishing clear temporal boundaries prevents data leakage and ensures model outputs translate to business ROI.

Followups to expect

  1. How do you handle framing when ground truth labels are delayed by months (e.g. Loan Default)? Use short term proxy targets (e.g. missed payment in first 30 days) to train early iteration models while waiting for long term loan default labels.
  2. What is Pointwise vs Pairwise vs Listwise framing in ranking? Pointwise frames ranking as independent binary classification per item. Pairwise frames it as relative preference ordering between item pairs. Listwise frames it as optimizing full list order metrics ($NDCG$).

Check yourself

Question 1 of 3

Why must an ML engineer frame an ambiguous request like 'Reduce Customer Churn' into specific prediction targets before building a model?

More in ML System Design

See all →
A Framework for Any ML Design Round5 minOnline vs Offline Evaluation5 minBatch vs Real-Time Inference5 min