Feature Engineering and Feature Stores Questions
Transforming raw data into predictive model inputs and serving those features reliably. Covers feature creation and selection, encoding high-cardinality and categorical variables, representation learning, and the design of feature stores for training/serving consistency. Emphasizes features as a primary lever on model quality and the operational challenges of keeping them fresh and consistent.
List common pitfalls when engineering timestamp-based features across time zones and daylight-saving transitions, and recommend best practices: how to store timestamps, how to generate local-time features (like local midnight) correctly, and how to aggregate events consistently in production so a DST transition doesn't silently corrupt a rolling window or daily bucket.
Implement the hashing trick for a categorical feature: write a function that deterministically maps a category string to an integer bucket in a fixed range, stable across process restarts. Then build a memory-efficient one-hot representation for a column with over a million unique categories using this hash, constructing a sparse matrix suitable for training a linear model. Discuss collision trade-offs, how to choose the number of buckets, and how to represent sparse feature vectors efficiently (index-value pairs vs a sparse matrix format) for a dot product at scale.
Design a globally-distributed feature store that must serve ultra-low-latency regional lookups while also supporting batch joins for training. Cover tolerance to regional failures, eventual consistency across regions, conflict resolution for concurrent writes, and how you'd minimize cross-region replication cost. Also discuss the strong-versus-eventual-consistency trade-off in general for feature stores backing model serving: where eventual consistency is acceptable and where it isn't.
Write a SQL pattern that computes a time-windowed aggregation (for example, count per user in 1-hour windows, or a rolling z-score of a numeric value over a 90-day window) from an events table while correctly handling late-arriving events using watermarking semantics. Explain how the watermark threshold trades off correctness against completeness, and how you'd handle entities with very little history.
Evaluate automated feature engineering (deep feature synthesis / tools like featuretools, tsfresh, autofeat) versus manual, domain-driven feature creation. When would you adopt automated feature engineering, how would you validate the generated features, and what guardrails would you put in place to avoid feature explosion and instability? Also sketch what an AutoFE pipeline at scale needs: candidate generation (aggregations, interactions, transforms), scoring and ranking by cross-validated improvement and stability, leakage guardrails, and a safe promotion path into a feature registry.
Unlock Full Question Bank
Get access to all Feature Engineering and Feature Stores interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.