InterviewStack.io LogoInterviewStack.io

Data Preprocessing and Handling for AI Questions

Covers the end to end preparation of raw data for analysis and modeling in machine learning and artificial intelligence. Topics include data collection and ingestion, data quality assessment, detecting and handling missing values with deletion or various imputation strategies, identifying and treating outliers, removing duplicates, and standardizing formats such as dates and categorical labels. Includes data type conversions, categorical variable encoding, feature scaling and normalization, standardization to zero mean and unit variance, and guidance on when each is appropriate given model choice. Covers feature engineering and selection, addressing class imbalance with sampling and weighting methods, and domain specific preprocessing such as data augmentation for computer vision and text preprocessing for natural language processing. Emphasizes correct order of operations, reproducible pipelines, splitting data into training validation and test sets, cross validation practices, and documenting preprocessing decisions and their impact on model performance. Also explains which models are sensitive to feature scale, common pitfalls, and evaluation strategies to ensure preprocessing does not leak information.

HardSystem Design
80 practiced
You must preprocess a 1TB table in a cloud data warehouse (Snowflake/BigQuery) to perform imputations, encodings and aggregate joins before training models in Python. Propose strategies to minimize data egress and compute cost: SQL pushdown operations, materialized views, partitioning, sampling, and integrating warehouse compute with Python training environments (e.g., using BigQuery ML, dbt, or query-export pipelines). Discuss pros/cons and reproducibility implications.
MediumTechnical
76 practiced
Compare common outlier detection techniques useful in BI: IQR-based capping/trimming, z-score and robust z-score, Winsorization, Isolation Forest, Local Outlier Factor (LOF), and DBSCAN-based anomaly detection. For each method describe assumptions about distribution, sensitivity to sample size, computational cost, and scenarios where it is preferable for reporting vs modeling.
MediumSystem Design
67 practiced
Design an ETL pipeline to transform raw clickstream JSON logs into analytics-ready tables for BI: sessionized_events(session_id, user_id, session_start, session_end), daily_active_users, and event_counts. Describe ingestion (Kafka or file-based), processing framework (Spark, Beam), sessionization logic (e.g., 30-minute inactivity), idempotency design, partitioning strategy, schema evolution handling, and how to expose materialized tables to BI tools (e.g., BigQuery, Redshift, data lakehouse).
HardSystem Design
81 practiced
Design a monitoring and alerting system to detect input distribution drift and label drift in production. Specify statistical methods (KS test, PSI, KL divergence), windowing strategy, thresholds for alerts, aggregation across features, and concrete remediation actions (retraining, feature freeze, rollback). Discuss how to balance sensitivity and false positives.
HardTechnical
116 practiced
A key numeric predictor that business stakeholders say is important has 50% missing values across customers. As a BI analyst, outline a decision framework to decide whether to drop the column, impute it, or derive alternative proxies. Consider information value analysis, collection cost, model sensitivity, business impact, and experiments you would run to quantify the decision.

Unlock Full Question Bank

Get access to hundreds of Data Preprocessing and Handling for AI interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.