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.
Implement frequency encoding in Python: given a DataFrame and a categorical column name, return a new column with each category's frequency (count or normalized frequency). Discuss the pitfalls of using frequency encoding in production when categories are high-cardinality or when the training and serving distributions differ.
Implement a topological sort over a feature dependency graph: given a mapping from each feature name to the list of features it depends on, return a valid computation order, and raise an error identifying the cycle if one exists. Aim for linear time in the number of features and dependencies.
Implement lag features and rolling-window statistics (mean, standard deviation, min, max) for a time-series DataFrame grouped by an entity ID: the function should sort within each group and only use PRIOR rows for a given row's lag/rolling values, to avoid leakage. Also implement a simple rolling moving-average function for a univariate series that supports a minimum-periods parameter and handles missing timestamps.
Design a production feature-store architecture for a company operating at real scale (tens to hundreds of millions of users, thousands of feature definitions, both sub-50ms online lookups and large offline training scans). Cover ingestion (batch and streaming), storage tiers for the online and offline stores, materialization strategy, serving API, feature versioning and lineage, access control, and the key technology trade-offs at each layer. Include the recommendation-system and ranking-model use case (batch training features plus low-latency online features feeding the same model).
You have thousands of candidate variables and want to systematically discover which pairwise (or higher-order) interactions are worth engineering, rather than exhaustively expanding all combinations. Describe how you'd find the promising candidates without brute-forcing every pair, and how you'd control the combinatorial explosion while producing a ranked, testable shortlist.
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.