Cashfree Payments Data Science Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Cashfree Payments hiring for Data Science roles
Cashfree Payments is a Bengaluru-based payments company that provides payment gateway, payouts, recurring payments and verification APIs for businesses. Merchants use it to collect online payments, send bulk payouts and automate payment workflows. It is regulated as a payment aggregator and hires software engineers, quality engineers, data analysts, product managers and support roles.
For Data Science roles, this Cashfree Payments practice set focuses most on Machine Learning (10), SQL for Data Science (5), A/B Testing & Experimentation (4), MLOps and Model Deployment (4). It has 2 easy, 28 medium, 10 hard questions, so you can start easy and work up to the harder ones.
Company type
Fintech
Headquarters
Bengaluru, India
Main India offices
Bengaluru
Cashfree Payments Data Science interview process
Online coding assessment
Technical round 1 (DSA)
Technical round 2 (design or backend)
Hiring manager round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for Cashfree PaymentsStart 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.
It models the log-odds of a binary outcome as a linear function and passes it through a sigmoid to give probabilities, trained by maximising likelihood.
02
Your test shows a 2 percent lift in conversion, but revenue per user went down. What do you do?
Do not ship on conversion alone. Check whether the change shifted buyers to cheaper items, increased discount usage or pulled in low-value orders. Break down revenue into conversion times average order value, look at item mix, and confirm the revenue drop is statistically meaningful rather than noise. Then go back to the agreed primary metric and guardrails; if revenue is the business goal, it should guide the decision.
03
What is the difference between hard voting and soft voting in ensembles?
In hard voting each model predicts a class and the majority wins. In soft voting each model gives class probabilities, they are averaged, and the class with the highest average wins. Soft voting usually works better because it uses each model's confidence, but it needs calibrated probabilities from all models. Hard voting is simpler and works even with models that only output labels.
04
You added an index but the query is still slow. How do indexes work, and when do they fail to help or even hurt?
An index is a separate sorted structure, usually a B-tree, that lets the database find rows without scanning the whole table, like a book index. It speeds up filters, joins and sorting on the indexed columns. Indexes cost storage and slow down inserts, updates and deletes because each index must be updated. They may be ignored for low-selectivity columns or when a function is applied to the column in WHERE.
05
You are building defect detection for a factory line where only 1 in 1,000 images shows a defect. How do you approach it?
With so few defects, a plain classifier will learn to say no defect. Collect every defect image possible and oversample them or use class-weighted or focal loss. Consider anomaly detection trained only on good parts, which flags anything unusual. Use augmentation that mimics real variation in lighting and position. Evaluate with recall at a fixed false alarm rate, since missing a defect usually costs far more than a manual recheck.
06
Write Python code to apply a CUPED adjustment using each user's pre-experiment metric.
import numpy as np
# df has: variant, y (metric during test), x (same metric pre-test)
x, y = df['x'].to_numpy(), df['y'].to_numpy()
theta = np.cov(x, y, ddof=1)[0, 1] / np.var(x, ddof=1)
df['y_cuped'] = y - theta * (x - x.mean())
print(df.groupby('variant')[['y', 'y_cuped']].agg(['mean', 'var']))
# Means stay comparable; variance of y_cuped is lower
07
You want to test a new pricing algorithm in a two-sided marketplace where buyers and sellers interact. Why is user-level randomisation a problem and what would you do?
Treated and control buyers compete for the same sellers' supply, so a treatment that makes treated buyers buy more takes inventory from control buyers, exaggerating the measured lift. Use designs that limit interference: switchback tests that alternate the whole market between variants over time slots, or randomise by city or region. Analyse at the switch or cluster level with appropriate variance, and accept that these tests need longer to reach power.
It fits a line minimising squared error. Assumes linearity, independent errors, constant variance (homoscedasticity), normally distributed residuals and no strong multicollinearity.
BERT is an encoder-only transformer that reads text in both directions at once. It was pretrained with masked language modelling, where about 15 percent of tokens are hidden and the model predicts them, plus next sentence prediction in the original version. This gives contextual embeddings, so a word's vector depends on its sentence. You fine-tune BERT with a small task head for classification, NER or question answering.
11
Your model's most important feature is customer_id. What is wrong?
An ID has no real meaning, so high importance means the model is memorising individual customers. It often happens when the same customers appear in both train and test, or when IDs were assigned in time order and act as a proxy for date or signup cohort. I would drop the ID, use a group-based split by customer, and if timing matters, add an explicit feature like account age instead.
12
Your manager asks whether collecting more training data will improve the model. How do you answer using a learning curve?
A learning curve plots training and validation scores against the size of the training set. If both scores are low and close, the model has high bias and needs more features or a more flexible model. If training is high but validation is much lower and the gap narrows as data grows, the model has high variance and more data will help. It tells you whether collecting more data is worth the cost.
13
The average delivery time is 30 minutes, yet many customers complain about late orders. How do you investigate?
An average hides the shape of the distribution. Delivery times are usually right-skewed, so a 30-minute mean can include many orders taking 60 minutes or more. Look at the median, the 90th and 95th percentiles and a histogram, then break them down by city, time of day and restaurant. Report the share of orders beyond the promised time, because that is what customers actually experience.
A forest averages many trees trained on bootstrapped rows and random feature subsets, which cuts variance and overfitting at the cost of interpretability.
Bootstrapping estimates the uncertainty of a statistic by resampling your data with replacement many times, computing the statistic on each resample, and looking at the spread of results. It gives confidence intervals for things with no simple formula, like the median, a ratio or a model metric such as AUC. It needs no normality assumption, but it relies on the sample being representative and can be slow on very large data.
16
A key metric dropped 8 percent week over week. How do you check whether it is real?
First rule out data issues: tracking changes, pipeline delays, missing partitions or a changed metric definition. Then compare with the same week last year and look for holidays or seasonality. Check normal weekly variation to see if 8 percent is unusual. Break the drop down by platform, region, app version and user type to find where it is concentrated. Finally, check releases, campaigns or outages that happened that week.
17
Write Python code to compute the Population Stability Index for a feature to detect drift.
The ROC curve plots true positive rate against false positive rate across thresholds. AUC is the probability that a random positive is ranked above a random negative; 0.5 is chance.
19
Tell me about a time your model did not perform as expected after deployment.
Situation: my demand forecasting model had 8 percent error offline, but 20 percent in the first month live. Task: find out why quickly. Action: I compared live inputs with training data and found a promotions feature arrived a day late in production, so the model saw zeros. I added a data freshness check and a fallback. Result: error returned to 9 percent. Since then I always test with production-like pipelines before launch.
20
You need to extract fields from scanned invoices that come in hundreds of different layouts. How would you design it?
Fixed templates will not scale to hundreds of layouts. Start with preprocessing: deskew, denoise and detect text regions. Run OCR to get words with their positions. Then use a layout-aware document model, or a vision-language model, to map words to fields like invoice number, GSTIN and total. Add validation rules, such as GSTIN format and line items summing to the total, and send low-confidence documents to human review.
21
Write SQL to calculate month-over-month revenue growth.
WITH monthly AS (
SELECT DATE_TRUNC('month', order_date) AS month, SUM(amount) AS revenue
FROM orders
GROUP BY 1
)
SELECT month, revenue,
LAG(revenue) OVER (ORDER BY month) AS prev_revenue,
ROUND(100.0 * (revenue - LAG(revenue) OVER (ORDER BY month))
/ NULLIF(LAG(revenue) OVER (ORDER BY month), 0), 2) AS mom_pct
FROM monthly;
22
Explain exponential smoothing and the Holt-Winters method.
Simple exponential smoothing forecasts with a weighted average of past values where weights decay exponentially, so recent points matter more. Holt's method adds a smoothed trend component. Holt-Winters adds a seasonal component as well, either additive or multiplicative. Each component has a smoothing parameter between 0 and 1 that is fitted to the data. These models are fast, easy to explain and strong baselines for retail and demand data.
23
Tell me about a time you automated a manual step in a machine learning workflow.
Situation: each monthly retrain needed a day of manual data pulls, notebook runs and copying files to servers. Task: make it reliable and hands-off. Action: I wrapped the steps into a scheduled pipeline with data validation checks, logged runs in MLflow and added an approval step before promotion. Result: retraining time dropped from a day to under an hour of review, and there were no more failed deployments from missed steps.
24
How would you build a churn prediction model end to end?
Define churn and the prediction window, build behavioural features, split by time, train and compare models, evaluate with recall and lift, explain drivers and monitor drift after deployment.
25
Write SQL to compute a 7-day rolling average of daily active users.
WITH daily AS (
SELECT activity_date, COUNT(DISTINCT user_id) AS dau
FROM events
GROUP BY activity_date
)
SELECT activity_date, dau,
AVG(dau) OVER (ORDER BY activity_date
ROWS BETWEEN 6 PRECEDING AND CURRENT ROW) AS dau_7d_avg
FROM daily
ORDER BY activity_date;
Parameter-efficient fine-tuning updates only a small number of parameters instead of the whole model. LoRA freezes the original weights and adds small low-rank matrices to selected layers, often attention projections, training under 1 percent of parameters. This cuts GPU memory and storage, and many task adapters can share one base model. QLoRA goes further by loading the base model in 4-bit precision. Quality is usually close to full fine-tuning.
27
Pandas: compute a 7-day rolling average of daily sales for each store.
Data augmentation creates new training examples by applying realistic changes to existing ones. For images this means flips, rotations, crops and brightness changes. For text it can mean synonym replacement, back-translation or random word dropping. For audio, adding noise or shifting pitch. It improves generalisation when data is limited. Changes must keep the label correct; flipping a digit 6 can turn it into a 9.
31
Write SQL to compute week-1 retention by signup week.
WITH signups AS (
SELECT user_id, DATE_TRUNC('week', signup_date) AS cohort, signup_date
FROM users
), active AS (
SELECT DISTINCT s.user_id, s.cohort
FROM signups s
JOIN events e ON e.user_id = s.user_id
AND e.event_date >= s.signup_date + INTERVAL '7 day'
AND e.event_date < s.signup_date + INTERVAL '14 day'
)
SELECT s.cohort, COUNT(*) AS users,
ROUND(100.0 * COUNT(a.user_id) / COUNT(*), 1) AS week1_retention_pct
FROM signups s
LEFT JOIN active a ON a.user_id = s.user_id
GROUP BY s.cohort
ORDER BY s.cohort;
32
Your LLM app takes 8 seconds to respond and users complain. What do you do?
Break down where the time goes: retrieval, model time to first token and generation length. Stream tokens so users see output immediately. Cut prompt and output length, run retrieval and other calls in parallel, and cache frequent answers. Use a smaller or faster model for simple requests, and avoid chains of several LLM calls where one would do. Set a latency budget per step and monitor p95, not just averages.
33
Write SQL to find the median order value per city.
SELECT city,
PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY amount) AS median_amount
FROM orders
GROUP BY city;
-- PERCENTILE_CONT interpolates; PERCENTILE_DISC returns an actual value
34
You need to use a device_id column with millions of unique values in a streaming model. How would feature hashing help?
Feature hashing, the hashing trick, maps categories or tokens into a fixed number of columns using a hash function, without storing a vocabulary. It handles very high-cardinality or ever-changing values, like URLs or device IDs, with constant memory and works well in streaming systems. The trade-off is collisions, where different values share a column, and the features cannot be reversed for explanation. Choose a large enough number of buckets.
35
Write scikit-learn code to calibrate a gradient boosting classifier's probabilities and check the result.
Function calling lets an LLM respond with a structured request to call a tool you defined, such as get_order_status with an order_id, instead of plain text. Your code runs the function, returns the result to the model, and the model uses it in its final answer. This connects LLMs to live data, calculators and APIs. You must validate arguments, limit which tools exist and handle errors, because the model can choose wrong inputs.
37
Halfway through a test you discover a bug that broke the treatment for Android users. What do you do?
Stop or pause the affected part, fix the bug and restart the test with fresh data, since mixing broken and fixed periods biases results. Do not simply drop Android users from analysis afterwards, because that can break randomisation balance if the bug affected behaviour or logging. Document the incident, and add pre-launch checks such as running the variant through QA on every platform and monitoring guardrails in the first hours.
38
How do you evaluate clustering when you have no labels?
Use internal metrics: the silhouette score compares how close a point is to its own cluster versus the nearest other cluster, and the Davies-Bouldin index measures cluster overlap. The elbow method looks at within-cluster variance. But the real test is usefulness: are clusters stable across random seeds and samples, can the business describe them, and do they behave differently on outcomes like spend or churn?
39
Your GPU model-serving bill has doubled while traffic grew only 20 percent. How do you bring cost down?
Profile utilisation first; idle or under-filled GPUs are common. Enable dynamic batching so each GPU call handles several requests, right-size instance types and autoscale on queue depth rather than CPU. Reduce model cost with quantisation, distillation or a smaller model for easy requests. Cache repeated predictions, move non-urgent work to batch jobs on cheaper hardware, and track cost per thousand predictions as a standing metric.
40
The business asks you to pick a decision threshold for a churn model. How do you choose it?
The default 0.5 is rarely right. I would get the cost of each outcome: the value of saving a churner, the cost of a retention offer, and the team's capacity to contact customers. Then I compute expected profit or precision and recall at many thresholds on validation data and pick the one that maximises value within capacity. I would also check that the chosen threshold stays stable over recent months.
Tips to crack the Cashfree Payments Data Science interview
Revise backend fundamentals such as REST APIs, databases, transactions and idempotency, which matter greatly in payment systems.
Learn how payment gateways, UPI, refunds and payouts work at a high level to discuss product flows clearly.
Practise designing a simple payment or payout service, explaining failure handling, retries and reconciliation.
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; Cashfree Payments interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Cashfree Payments Data Science interview?
Candidates usually go through 4 stages: Online coding assessment; Technical round 1 (DSA); Technical round 2 (design or backend); Hiring manager 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 Cashfree Payments Data Science interview?
This practice set leans on Machine Learning (10), SQL for Data Science (5), A/B Testing & Experimentation (4), MLOps and Model Deployment (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Cashfree Payments interviewers ask you to walk through real work.
Are these the exact questions asked at Cashfree Payments?
No. These are curated practice questions that match the skills and difficulty usually tested in fintech interviews like Cashfree Payments's. They are not a leaked or verified list of past questions.
Where does Cashfree Payments hire Data Science professionals in India?
Cashfree Payments has large teams in Bengaluru. Openings and locations change often, so check the Cashfree Payments careers page and filter by city and experience.