Skip to content

Quantiphi Machine Learning Interview Questions & Answers

Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.

About Quantiphi hiring for Machine Learning roles

Quantiphi is an AI-first digital engineering company that builds machine learning, data engineering, cloud and applied AI solutions for enterprises. It is known for close partnerships with major cloud providers and works with clients in healthcare, banking, media and retail. In India it hires machine learning engineers, data engineers, cloud engineers and software developers for global projects.

For Machine Learning roles, this Quantiphi practice set focuses most on Model Evaluation and Tuning (7), ML Fundamentals (5), Regression Models (4), Clustering and Dimensionality Reduction (4). It has 2 easy, 24 medium, 4 hard questions, so you can start easy and work up to the harder ones.

Company type
Analytics
Headquarters
Marlborough, Massachusetts, USA
Main India offices
Mumbai, Bengaluru

Quantiphi Machine Learning interview process

  1. Online assessment (aptitude + coding + ML basics)
  2. Technical interview 1
  3. Technical interview 2
  4. HR round

Typical pattern based on public candidate experiences. Rounds vary by role, team and year.

Solved for QuantiphiStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
3 questions free Unlock the rest in seconds
01

Compare grid search, random search and Bayesian optimisation.

Save to ▾
Show answer
Grid search tries every combination of listed values; it is thorough but expensive and wastes trials on unimportant parameters. Random search samples combinations and usually finds good settings faster in high-dimensional spaces. Bayesian optimisation, as in Optuna or Hyperopt, builds a model of past trials to pick promising settings next, using fewer trials. Successive halving methods add early pruning of weak trials.
02

A new model has slightly better AUC but worse precision in the top 1,000 cases the team acts on. Which do you pick?

Save to ▾
Show answer
I would pick the model that does better where decisions are actually made. If the team only reviews the top 1,000 cases, precision at 1,000 or recall at that cut-off matters more than global AUC. I would make that the primary metric in future comparisons, and confirm the result holds across several time periods before switching.
03

How do you create polynomial features with regularisation in a pipeline?

Save to ▾
Show answer
from sklearn.preprocessing import PolynomialFeatures, StandardScaler from sklearn.linear_model import Ridge from sklearn.pipeline import make_pipeline model = make_pipeline( PolynomialFeatures(degree=2, include_bias=False), StandardScaler(), Ridge(alpha=1.0) ) model.fit(X_train, y_train) Tune degree and alpha together with GridSearchCV to avoid overfitting.
04

Your dataset has a city column with 2,000 unique values. How will you encode it?

Save to ▾
Show answer
One-hot would create 2,000 sparse columns, so I would first group rare cities below a frequency threshold into 'Other'. Then options are frequency encoding, out-of-fold target encoding, or mapping cities to useful attributes such as tier, state or population. For boosting models like CatBoost or LightGBM, native categorical handling also works well. I would compare options with cross-validation.
05

A product team wants 'similar products' recommendations with no purchase labels. How would you start?

Save to ▾
Show answer
I would build product embeddings from content: TF-IDF or sentence embeddings of titles and descriptions, plus category and price features. Then use cosine similarity with nearest-neighbour search, such as scikit-learn NearestNeighbors or an approximate index like FAISS for large catalogues. I would review samples with the product team and later add co-view or co-purchase signals once collected.
06

How do you handle missing values in a dataset?

Save to ▾
Show answer
First understand why values are missing: completely at random, at random, or not at random. Options are dropping rows or columns with heavy missingness, simple imputation with mean, median or mode, model-based imputation like KNNImputer or IterativeImputer, or a separate 'missing' category. Adding a missing-indicator column often helps because missingness itself can be predictive, such as income left blank.
07

What is boosting and how is it different from bagging?

Save to ▾
Show answer
Boosting trains models sequentially, each one focusing on the errors of the combined previous models, which mainly reduces bias. Bagging trains models independently in parallel and averages them, which mainly reduces variance. Boosting uses shallow trees and a learning rate, and can overfit if run too long, so early stopping is important. Examples are AdaBoost, Gradient Boosting, XGBoost, LightGBM and CatBoost.
08

When should you use TimeSeriesSplit or GroupKFold instead of normal k-fold?

Save to ▾
Show answer
Use TimeSeriesSplit when data is ordered in time, so each validation fold comes after its training data and no future information leaks back. Use GroupKFold when multiple rows belong to the same entity, such as several visits per patient, so the same entity never appears in both train and validation. Normal k-fold in these cases gives over-optimistic scores.
09

How do you select the top k features using mutual information in scikit-learn?

Save to ▾
Show answer
SelectKBest with mutual_info_classif captures non-linear relationships, unlike plain correlation. from sklearn.feature_selection import SelectKBest, mutual_info_classif sel = SelectKBest(score_func=mutual_info_classif, k=20) X_new = sel.fit_transform(X_train, y_train) print(X_train.columns[sel.get_support()]) Put the selector inside a pipeline so selection is redone in each CV fold.
10

Tell me about a time your model did not work as expected. What did you do?

Save to ▾
Show answer
Situation: my first churn model scored 0.95 AUC in validation but failed in a pilot. Task: find out why. Action: I traced features and found one field updated after customers left, which leaked the label. I removed it, rebuilt features with a strict cut-off date and moved to a time-based split. Result: AUC dropped to 0.78 but held steady in production, and I added a leakage checklist to my workflow.
11

How do you tune the alpha of Ridge regression using cross-validation?

Save to ▾
Show answer
RidgeCV tests many alphas efficiently; scale features first. from sklearn.linear_model import RidgeCV from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler import numpy as np m = make_pipeline(StandardScaler(), RidgeCV(alphas=np.logspace(-3, 3, 30))) m.fit(X_train, y_train) print(m[-1].alpha_) LassoCV and ElasticNetCV work the same way.
12

A business stakeholder asks you to use deep learning for a 5,000-row tabular dataset. How do you respond?

Save to ▾
Show answer
I would explain that for small tabular data, gradient-boosted trees or regularised linear models usually match or beat neural networks, train faster and are easier to explain. I would propose building a simple baseline, then a boosting model, and only test a neural network if there is a clear reason. I would show the comparison on cross-validated metrics so the decision is data-driven.
13

How do you create lag and rolling features for a sales forecasting model in pandas?

Save to ▾
Show answer
Sort by item and date, then shift so features use only past values. df = df.sort_values(['item', 'date']) g = df.groupby('item')['sales'] df['lag_7'] = g.shift(7) df['roll_mean_28'] = g.transform(lambda s: s.shift(1).rolling(28).mean()) The shift before rolling prevents the current day's sales from leaking into its own feature.
14

How do you implement simple gradient descent for linear regression in NumPy?

Save to ▾
Show answer
Compute predictions, the gradient of MSE, and update weights in a loop. import numpy as np w = np.zeros(X.shape[1]); b = 0.0; lr = 0.01 for _ in range(1000): err = X @ w + b - y w -= lr * (2 / len(y)) * (X.T @ err) b -= lr * (2 / len(y)) * err.sum() Scale features first or the loop converges slowly.
15

How do you prioritise when several teams ask you for models at the same time?

Save to ▾
Show answer
I estimate each request's business value, effort and urgency, then share a ranked list with my manager so priorities are agreed rather than assumed. For quick wins I offer a simple baseline first. In one quarter this helped us deliver a high-value churn model first while giving another team a dashboard-based interim answer, and both teams knew the timeline.
16

Compare batch scoring and real-time inference.

Save to ▾
Show answer
Batch scoring runs on a schedule, for example nightly churn scores for all customers written to a table; it is simple, cheap and tolerant of slow models. Real-time inference returns predictions on request, such as fraud checks during payment, and needs low latency, high availability, scaling and fresh features. Choose real-time only when the decision must happen at the moment of the event.
17

Your team retrains models manually in notebooks every month. How would you improve it?

Save to ▾
Show answer
I would convert the notebook into a versioned training pipeline with separate steps for data extraction, validation, feature building, training and evaluation, scheduled with Airflow or a cloud pipeline. Each run would log to MLflow, compare against the production model on a fixed holdout, and register the new model only if it passes thresholds. Promotion would stay a reviewed step, at least initially.
18

What should you monitor for a model in production?

Save to ▾
Show answer
Monitor service health such as latency, error rate and throughput; input data quality such as missing values, schema changes and out-of-range values; feature and prediction distribution drift; and real performance once labels arrive. Also track business KPIs the model influences. Set alerts with thresholds and owners, and keep a dashboard so issues are found before users report them.
19

Tell me about a time you discovered your own mistake after sharing results.

Save to ▾
Show answer
Situation: after presenting a 12 percent uplift from a pricing model, I found my evaluation used a random split on time-series data. Task: correct it quickly. Action: I re-ran with a time-based split, which showed 7 percent, and informed my manager the same day with the corrected analysis. Result: the team appreciated the honesty, the rollout plan used the right number, and I added split checks to our review template.
20

Write a unit test for a model prediction function.

Save to ▾
Show answer
import joblib, pandas as pd def test_predict_shape_and_range(): model = joblib.load('model_v1.joblib') df = pd.DataFrame([{'age': 30, 'income': 50000.0, 'city': 'Pune'}, {'age': 45, 'income': 0.0, 'city': 'UnknownCity'}]) p = model.predict_proba(df)[:, 1] assert p.shape == (2,) assert ((p >= 0) & (p <= 1)).all() Run with pytest in CI so broken artifacts never reach production.
21

How does a decision tree decide where to split?

Save to ▾
Show answer
At each node the tree tries candidate features and thresholds and picks the split that most reduces impurity in the child nodes. For classification, impurity is measured by Gini or entropy; for regression, by variance or MSE. The process repeats recursively until a stopping rule such as max_depth, min_samples_leaf or pure leaves is reached. This greedy approach is fast but not globally optimal.
22

Your cross-validation score is 0.85 but the test score is 0.70. What could explain it?

Save to ▾
Show answer
Possible causes: leakage inside CV, such as preprocessing or feature selection fit outside folds; repeated tuning that overfit the CV folds; a test set from a different time period or population; or duplicate entities across folds but not test. I would check pipeline structure, switch to time-based or group splits that match how test data differs, and compare feature distributions between the two sets.
23

What is the curse of dimensionality?

Save to ▾
Show answer
As the number of features grows, data becomes sparse in the feature space, distances between points become similar, and the amount of data needed to generalise grows rapidly. Distance-based methods like k-NN and k-means suffer most. Remedies include feature selection, dimensionality reduction such as PCA, regularisation and collecting more data. Text and genomics data often face this problem.
24

You need prediction intervals, not just point estimates, for delivery time. How?

Save to ▾
Show answer
Options are quantile regression, training separate models for the 10th and 90th percentiles with GradientBoostingRegressor(loss='quantile') or LightGBM; conformal prediction, which wraps any model and gives intervals with guaranteed coverage; or bootstrapping. I would check calibration: about 80 percent of actual values should fall within an 80 percent interval on a holdout set.
25

How do you make an ML experiment reproducible?

Save to ▾
Show answer
Fix random seeds in NumPy, Python and the model, pin library versions in requirements.txt, version the data or record its hash, and save the exact code commit and hyperparameters. Tools like MLflow log parameters, metrics and artifacts per run. Use pipelines so preprocessing is identical each time, and keep the train-test split stored rather than recreated randomly.
26

What fairness checks would you run on a model that affects people?

Save to ▾
Show answer
Compare metrics across groups such as gender, age band or region: approval rate (demographic parity), true positive rate (equal opportunity) and false positive rate. Check calibration per group too. Remove or audit proxy features like pin code that may stand in for protected attributes. Document findings in a model card, and involve legal or compliance teams, especially for lending and hiring use cases.
27

Build RFM features for customer segmentation in pandas.

Save to ▾
Show answer
snap = df['order_date'].max() + pd.Timedelta(days=1) rfm = df.groupby('customer_id').agg( recency=('order_date', lambda d: (snap - d.max()).days), frequency=('order_id', 'nunique'), monetary=('amount', 'sum')) rfm[['frequency', 'monetary']] = np.log1p(rfm[['frequency', 'monetary']]) Scale these columns before clustering.
28

What makes XGBoost, LightGBM and CatBoost different?

Save to ▾
Show answer
XGBoost adds regularisation to the objective, uses second-order gradients and handles missing values natively. LightGBM grows trees leaf-wise and uses histogram binning, making it very fast on large data, though it can overfit small data. CatBoost handles categorical features with ordered target statistics and uses symmetric trees, giving strong defaults with less tuning. All three support GPU training.
29

What is the log loss metric and why is it useful?

Save to ▾
Show answer
Log loss, or cross-entropy, is the negative average log of the probability assigned to the true class. It heavily penalises confident wrong predictions, such as predicting 0.99 for an event that does not happen. It evaluates probability quality, not just ranking, so it suits problems where probabilities drive decisions. Lower is better, and a constant base-rate prediction is the baseline to beat.
30

Explain hierarchical clustering and dendrograms.

Save to ▾
Show answer
Agglomerative hierarchical clustering starts with each point as its own cluster and repeatedly merges the two closest clusters. Linkage defines closeness: single, complete, average or Ward, which minimises variance. A dendrogram shows the merge history, and cutting it at a height gives the clusters. It does not need k upfront but scales poorly, roughly O(n squared) memory, so it suits smaller datasets.

Tips to crack the Quantiphi Machine Learning interview

  • Revise machine learning fundamentals such as regression, classification, evaluation metrics and overfitting, with clear intuitive explanations.
  • Get hands-on with at least one cloud platform and mention any cloud certifications, since much client work runs on cloud services.
  • Prepare a deep explanation of one ML or data project, including dataset, model choice, results and deployment approach.
  • Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
  • Practise the hard questions on this page aloud; Quantiphi interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Quantiphi Machine Learning interview?

Candidates usually go through 4 stages: Online assessment (aptitude + coding + ML basics); Technical interview 1; Technical interview 2; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.

Which topics should I prepare for the Quantiphi Machine Learning interview?

This practice set leans on Model Evaluation and Tuning (7), ML Fundamentals (5), Regression Models (4), Clustering and Dimensionality Reduction (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Quantiphi interviewers ask you to walk through real work.

Are these the exact questions asked at Quantiphi?

No. These are curated practice questions that match the skills and difficulty usually tested in analytics interviews like Quantiphi's. They are not a leaked or verified list of past questions.

Where does Quantiphi hire Machine Learning professionals in India?

Quantiphi has large teams in Mumbai, Bengaluru. Openings and locations change often, so check the Quantiphi careers page and filter by city and experience.

Machine Learning questions for similar companies