Skip to content

Juspay Data Science Interview Questions & Answers

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

About Juspay hiring for Data Science roles

Juspay is a Bengaluru-based payments technology company that builds payment orchestration, checkout and UPI infrastructure for merchants and banks. Its products help businesses manage multiple payment gateways and improve transaction success rates. It is known for using functional programming languages such as Haskell and PureScript, and hires software engineers and product engineers.

For Data Science roles, this Juspay practice set focuses most on Deep Learning and NLP (6), Statistics and Probability (6), Machine Learning (5), Python for Data Science (4). It has 6 easy, 28 medium, 6 hard questions, so you can start easy and work up to the harder ones.

Company type
Fintech
Headquarters
Bengaluru, India
Main India offices
Bengaluru

Juspay Data Science interview process

  1. Online coding assessment or hackathon-style challenge
  2. Technical round 1 (problem solving)
  3. Technical round 2 (design or functional programming)
  4. Hiring manager and culture round

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

Solved for JuspayStart 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

What are *args and **kwargs?

Save to ▾
Show answer
*args collects extra positional arguments into a tuple; **kwargs collects extra keyword arguments into a dict. They make function signatures flexible and are common in wrappers and decorators.
02

How would you quickly build a sentiment analysis model for product reviews?

Save to ▾
Show answer
Step 1: collect and label a sample of reviews, checking class balance. Step 2: build a baseline with TF-IDF and logistic regression to get a quick benchmark. Step 3: fine-tune a small pretrained transformer such as DistilBERT for better accuracy, or use a multilingual model if reviews mix languages. Step 4: evaluate with F1 per class and read wrong predictions. Step 5: handle sarcasm and neutral reviews explicitly.
03

Which activation functions do you know and when to use them?

Save to ▾
Show answer
ReLU for hidden layers, sigmoid for binary outputs, softmax for multi-class outputs and tanh when zero-centred outputs help; Leaky ReLU avoids dead neurons.
04

What is the difference between batch and real-time inference?

Save to ▾
Show answer
Batch inference scores many records on a schedule, for example nightly churn scores for all customers written to a table. It is cheap and simple. Real-time inference serves predictions on request through an API within milliseconds, for example fraud checks during payment. It needs low-latency feature access, scaling and high availability. Choose real-time only when the decision truly must use fresh data at the moment of the request.
05

After one-hot encoding you have 2,000 features and training is slow. What do you do?

Save to ▾
Show answer
Find which columns caused the explosion, usually a few high-cardinality categoricals. Group rare categories into Other, or switch those columns to frequency, target or hashing encoding. Use sparse matrices so zeros take no memory. Tree libraries like LightGBM and CatBoost can handle categoricals natively without one-hot. Then remove near-constant columns and check that validation scores hold up with the smaller feature set.
06

A deep network you built from scratch does not learn at all; the loss stays flat from the first epoch. Could weight initialisation be the reason?

Save to ▾
Show answer
If weights start too large, activations and gradients explode; if too small, they vanish, and training stalls. If all weights are equal, every neuron learns the same thing. Good schemes keep the variance of activations stable across layers: Xavier or Glorot initialisation for tanh and sigmoid, and He initialisation for ReLU. Frameworks use sensible defaults, but it matters when building custom layers or very deep networks.
07

Write a Python function to compute IoU between two bounding boxes given as (x1, y1, x2, y2).

Save to ▾
Show answer
def iou(a, b): ix1, iy1 = max(a[0], b[0]), max(a[1], b[1]) ix2, iy2 = min(a[2], b[2]), min(a[3], b[3]) inter = max(0, ix2 - ix1) * max(0, iy2 - iy1) area_a = (a[2] - a[0]) * (a[3] - a[1]) area_b = (b[2] - b[0]) * (b[3] - b[1]) union = area_a + area_b - inter return inter / union if union > 0 else 0.0 print(iou((0, 0, 10, 10), (5, 5, 15, 15))) # 0.142...
08

Your fraud model has 99 percent accuracy, but the business says it catches almost no fraud. Why?

Save to ▾
Show answer
If only 1 percent of transactions are fraud, a model that predicts not fraud for everything is 99 percent accurate and useless. Accuracy hides the minority class. I would check the confusion matrix, recall on fraud cases and precision-recall AUC. Then fix it with class weights, resampling or a lower decision threshold, and choose the threshold based on the cost of missed fraud versus false alerts.
09

How does a Vision Transformer differ from a CNN?

Save to ▾
Show answer
A Vision Transformer splits an image into fixed patches, such as 16x16, flattens each into a token embedding, adds position embeddings and processes them with self-attention. Every patch can attend to every other patch from the first layer, giving global context. CNNs have built-in locality and translation biases, so they learn well from smaller datasets. ViTs need more data or strong pretraining but scale very well and are now common backbones.
10

Your A/B test shows a significant lift after 2 days. The product team wants to ship now. What do you say?

Save to ▾
Show answer
I would ask them to wait for the planned duration. Checking early and stopping on the first significant result, called peeking, inflates false positives. Two days also misses weekly patterns and novelty effects, where users click a new feature just because it is new. If speed matters, we can use a sequential testing method designed for early stopping. Otherwise we run the full sample size calculated before launch.
11

Your model performance degrades every few months. Would you retrain on a fixed schedule or based on triggers?

Save to ▾
Show answer
Scheduled retraining, like monthly, is simple and predictable but may be too late after a sudden change or wasteful when nothing changed. Trigger-based retraining runs when monitoring shows drift or a performance drop, which reacts faster but needs reliable monitoring. Many teams combine both: a regular schedule plus triggers for big shifts. Either way, a retrained model must pass the same evaluation gate before replacing the current one.
12

What is mean Average Precision (mAP) in object detection?

Save to ▾
Show answer
For each class, detections are ranked by confidence and a precision-recall curve is computed, where a detection is a true positive if its IoU with an unmatched ground truth box passes a threshold. Average Precision is the area under that curve. mAP is the mean across classes. mAP@0.5 uses IoU 0.5, while mAP@0.5:0.95 averages over thresholds from 0.5 to 0.95 and rewards tighter boxes.
13

What is the Central Limit Theorem?

Save to ▾
Show answer
The distribution of sample means approaches a normal distribution as the sample size grows (roughly 30+), whatever the population's shape. It lets us build confidence intervals and run hypothesis tests on means.
14

Your neural network's training loss suddenly becomes NaN. What do you check?

Save to ▾
Show answer
Common causes are a learning rate that is too high, exploding gradients, bad input values, and unstable maths like log of zero. I would check the input data for NaN or infinite values, lower the learning rate, add gradient clipping, and make sure the loss uses the stable built-in version with logits. With mixed precision, I would check the loss scaler. Logging gradient norms per step helps find the exact point it breaks.
15

Training a transformer on a GPU fails with an out-of-memory error. What can you do?

Save to ▾
Show answer
Reduce the batch size and use gradient accumulation to keep the same effective batch. Shorten the maximum sequence length. Turn on mixed precision training with float16 or bfloat16. Use gradient checkpointing, which saves memory by recomputing activations. Freeze some layers or switch to a smaller model, or use parameter-efficient fine-tuning like LoRA. Also make sure no old tensors stay on the GPU between runs.
16

Explain Bayes' theorem with an example.

Save to ▾
Show answer
P(A given B) = P(B given A) x P(A) / P(B). In a medical test it converts test accuracy and disease prevalence into the real chance a positive result means disease.
17

What is the difference between Bayesian and frequentist approaches?

Save to ▾
Show answer
Frequentists treat parameters as fixed and use long-run frequencies; Bayesians treat parameters as distributions updated with data via priors and posteriors, giving direct probability statements.
18

Write a prompt template for classifying customer support tickets.

Save to ▾
Show answer
System: You classify support tickets for an e-commerce company. Categories: payment, delivery, refund, account, other. Rules: choose exactly one category; if unsure, choose other; do not invent details. Return JSON with fields category and reason, reason under 20 words. Then two short examples showing a ticket and the expected JSON. User: Ticket: {ticket_text}. Keep the template fixed and test it on 100 labelled tickets before rollout.
19

Pandas: compute a 7-day rolling average of daily sales for each store.

Save to ▾
Show answer
# df has columns: store, date, sales df['date'] = pd.to_datetime(df['date']) df = df.sort_values(['store', 'date']) df['sales_7d_avg'] = ( df.groupby('store')['sales'] .transform(lambda s: s.rolling(7, min_periods=1).mean()) )
20

Your model's most important feature is customer_id. What is wrong?

Save to ▾
Show answer
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.
21

What is the difference between hard voting and soft voting in ensembles?

Save to ▾
Show answer
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.
22

Your credit model has good overall AUC but performs much worse for applicants from one region. What do you do?

Save to ▾
Show answer
First confirm with per-segment metrics and enough samples, since small groups are noisy. Then check why: fewer training examples from that region, different feature distributions, missing data or labels that reflect past biased decisions. Fixes include collecting more data, reweighting, segment-aware features or a separate calibration. Also review fairness and regulatory requirements, and agree with risk and compliance teams on acceptable performance gaps before launch.
23

You keep adding features and R-squared keeps rising. Is the model really getting better?

Save to ▾
Show answer
R-squared shows the share of variance in the target explained by the model. It never decreases when you add a feature, even a useless one. Adjusted R-squared penalises extra features based on the number of predictors and sample size, so it rises only if a new feature improves the model more than chance would. Use adjusted R-squared to compare linear models with different numbers of features.
24

What are decorators in Python?

Save to ▾
Show answer
A decorator wraps a function to add behaviour such as logging, timing or caching without changing its code. It is applied with the @name syntax above the function.
25

Tell me about a feature you engineered that significantly improved a model.

Save to ▾
Show answer
Situation: our delivery time model kept underestimating late-night orders. Task: reduce large errors. Action: I noticed restaurant prep time depended on how busy the kitchen was, so I built a feature for active orders at that restaurant in the last 30 minutes, computed point in time. Result: MAE dropped by 14 percent and late-night errors fell the most. It taught me to study the worst errors before adding generic features.
26

Tell me about a time your analysis contradicted what leadership expected.

Save to ▾
Show answer
Situation: leadership believed a discount campaign drove a sales spike. Task: I was asked to measure its impact. Action: I compared similar regions with and without the campaign and found the spike matched a festival week in both. I shared the method, the charts and the limits openly. Result: they cut the next discount budget by half and moved it to retention. I learned to present surprising results with clear evidence and calm framing.
27

For a warehouse, a stockout costs five times more than holding extra stock. How should the forecast change?

Save to ▾
Show answer
A forecast of the mean is the wrong target when costs are asymmetric. Forecast a quantile instead. The optimal quantile here is about 5 divided by 5 plus 1, roughly the 83rd percentile, which is the newsvendor critical ratio. Train with quantile or pinball loss, or use prediction intervals from a probabilistic model. Evaluate with pinball loss and the actual stockout and holding cost, not just MAE.
28

What is statistical power and how can you increase it?

Save to ▾
Show answer
Power is the probability of detecting a real effect. Increase it with a larger sample, a bigger effect size, lower noise or a higher significance level.
29

Your LLM gives different summaries for the same document on different runs, but auditors need consistent output. What do you do?

Save to ▾
Show answer
Set temperature to zero or near zero and fix other sampling settings, and use a seed where the API supports it, though outputs may still vary slightly. Pin the exact model version. Use a structured output format with fixed fields, and reduce ambiguity in the prompt. Cache and store each generated output with its inputs and version, so the stored result, not a regeneration, is what auditors see.
30

You need to extract fields from scanned invoices that come in hundreds of different layouts. How would you design it?

Save to ▾
Show answer
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.
31

Marketing wants to measure the impact of a TV and outdoor campaign that cannot be randomised at user level. How do you design the measurement?

Save to ▾
Show answer
Plan a geo experiment: select comparable cities or regions, randomly assign some to run the campaign and keep others as control, matching them on past sales trends. Measure the difference in sales during and after the campaign, using methods like difference-in-differences or synthetic control to build a counterfactual. Run a pre-period check that test and control regions track each other, and include enough regions for reasonable power.
32

Tell me about a time you had to build a model when the requirements were unclear.

Save to ▾
Show answer
Situation: a sales head asked for a model to find good leads but could not define good. Task: turn this into a clear target. Action: I met the team, looked at past deals, and proposed converted within 60 days as the label, with expected revenue as a secondary view. I shared a quick baseline in a week to get feedback. Result: the definition was agreed, and the final model raised conversion in the top decile.
33

Write Python code to compare revenue per user between two groups using Welch's t-test.

Save to ▾
Show answer
import numpy as np from scipy import stats ctrl = df.loc[df.variant == 'control', 'revenue'].to_numpy() treat = df.loc[df.variant == 'treatment', 'revenue'].to_numpy() t, p = stats.ttest_ind(treat, ctrl, equal_var=False) # Welch diff = treat.mean() - ctrl.mean() se = np.sqrt(treat.var(ddof=1) / len(treat) + ctrl.var(ddof=1) / len(ctrl)) print(f'diff={diff:.2f} 95% CI=({diff - 1.96*se:.2f}, {diff + 1.96*se:.2f}) p={p:.4f}')
34

What is the difference between saving a model with pickle, joblib and ONNX?

Save to ▾
Show answer
pickle serialises Python objects; it is simple but tied to Python and library versions, and loading untrusted pickle files is a security risk. joblib is similar but more efficient for objects with large NumPy arrays, like scikit-learn models. ONNX is an open, language-neutral format that runs in optimised runtimes across languages and hardware, useful for fast serving. Always store library versions alongside pickle or joblib files.
35

What is the difference between a star schema and a snowflake schema?

Save to ▾
Show answer
A star schema has a central fact table, like sales with amounts and foreign keys, surrounded by denormalised dimension tables such as product, customer and date. A snowflake schema normalises dimensions further, for example product links to a separate category table. Star schemas need fewer joins and are faster and simpler for analysts. Snowflake schemas save storage and reduce duplication but make queries more complex.
36

What is positional encoding in transformers and why is it needed?

Save to ▾
Show answer
Self-attention treats input tokens as a set, so without extra information it cannot tell word order: dog bites man and man bites dog look the same. Positional encoding adds position information to each token embedding. The original transformer used fixed sine and cosine patterns; BERT learned position embeddings; many modern LLMs use rotary embeddings, which encode relative positions and extend better to longer contexts.
37

Write Python code to compute the Population Stability Index for a feature to detect drift.

Save to ▾
Show answer
import numpy as np def psi(expected, actual, bins=10): edges = np.quantile(expected, np.linspace(0, 1, bins + 1)) edges[0], edges[-1] = -np.inf, np.inf e = np.histogram(expected, edges)[0] / len(expected) a = np.histogram(actual, edges)[0] / len(actual) e, a = np.clip(e, 1e-6, None), np.clip(a, 1e-6, None) return float(np.sum((a - e) * np.log(a / e))) # rule of thumb: <0.1 stable, 0.1-0.25 watch, >0.25 investigate
38

Write Python code to group a list of order dictionaries by city and sum the amounts without Pandas.

Save to ▾
Show answer
from collections import defaultdict orders = [ {'city': 'Pune', 'amount': 250}, {'city': 'Delhi', 'amount': 400}, {'city': 'Pune', 'amount': 150}, ] totals = defaultdict(float) for o in orders: totals[o['city']] += o['amount'] print(dict(totals)) # {'Pune': 400.0, 'Delhi': 400.0}
39

How do you perform feature selection?

Save to ▾
Show answer
Use filter methods (correlation, chi-square), wrapper methods (RFE), embedded methods (Lasso, tree importance) and domain knowledge, validating each choice with cross-validation.
40

What is Bayesian A/B testing and how are its results reported?

Save to ▾
Show answer
Bayesian A/B testing starts with a prior on each variant's metric, updates it with observed data and produces a posterior distribution. Instead of a p-value, you report things like the probability that treatment beats control, say 94 percent, and the expected loss if you choose the wrong variant. Business teams find this easier to interpret. Priors must be chosen sensibly, and continuous monitoring still needs discipline about decision rules.

Tips to crack the Juspay Data Science interview

  • Practise DSA problems seriously, since Juspay hiring challenges are known to be competitive and focused on problem-solving ability.
  • Learn functional programming basics like immutability, pure functions and recursion, and try a little Haskell or PureScript.
  • Understand UPI and card payment flows, including authorisation and settlement, to discuss the domain with confidence.
  • 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; Juspay interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Juspay Data Science interview?

Candidates usually go through 4 stages: Online coding assessment or hackathon-style challenge; Technical round 1 (problem solving); Technical round 2 (design or functional programming); Hiring manager and culture 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 Juspay Data Science interview?

This practice set leans on Deep Learning and NLP (6), Statistics and Probability (6), Machine Learning (5), Python for Data Science (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Juspay interviewers ask you to walk through real work.

Are these the exact questions asked at Juspay?

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

Where does Juspay hire Data Science professionals in India?

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

Data Science questions for similar companies