Why is feature freshness a major constraint when computing streaming aggregates for real-time inference?

Quick Overview

Asks why freshness limits streaming window aggregates used as features for real-time model inference. Tests understanding of pipeline lag sources, freshness against completeness and cost, training-serving skew and practical serving patterns.

Why is feature freshness a major constraint when computing streaming aggregates for real-time inference?

Role: Machine Learning Engineer

Category: ML System Design

Difficulty: hard

Interview Round: Other

A model scores requests in real time using streaming aggregates such as "transactions on this card in the last 5 minutes." Why is feature freshness a major constraint when computing streaming aggregates for real-time inference? ```hint Count the delays List every step between an event happening and its effect showing up in the feature value the model reads. ``` ```hint Compare training and serving Think about how the same feature is computed for historical training rows and how it is computed at request time. ``` ### What a Strong Answer Covers - Why short-window aggregates lose much of their signal when the pipeline lags. - The sources of staleness, from ingestion through the write to the online store. - The trade-offs of freshness against completeness and against cost. - How lag creates training-serving skew, and ways to reduce it. - Serving patterns and monitoring, such as batch history plus a streaming delta and per-feature freshness targets. ### Follow-up Questions - How would you set a freshness target for a given feature, and how would you measure end-to-end lag? - What should the model receive when a streaming feature is stale or missing at request time? - How do you avoid double counting or gaps where a batch aggregate meets a streaming delta?

Overview: Asks why freshness limits streaming window aggregates used as features for real-time model inference. Tests understanding of pipeline lag sources, freshness against completeness and cost, training-serving skew and practical serving patterns.

General logo
General
Nov 24, 2026
hardMachine Learning EngineerOtherML System Design
0
0

A model scores requests in real time using streaming aggregates such as "transactions on this card in the last 5 minutes."

Why is feature freshness a major constraint when computing streaming aggregates for real-time inference?

What a Strong Answer Covers Guidance

  • Why short-window aggregates lose much of their signal when the pipeline lags.
  • The sources of staleness, from ingestion through the write to the online store.
  • The trade-offs of freshness against completeness and against cost.
  • How lag creates training-serving skew, and ways to reduce it.
  • Serving patterns and monitoring, such as batch history plus a streaming delta and per-feature freshness targets.

Follow-up Questions Guidance

  • How would you set a freshness target for a given feature, and how would you measure end-to-end lag?
  • What should the model receive when a streaming feature is stale or missing at request time?
  • How do you avoid double counting or gaps where a batch aggregate meets a streaming delta?