State Bank of India Data Science Interview Questions & Answers
Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About State Bank of India hiring for Data Science roles
State Bank of India is India's largest public sector bank, with a huge network of branches and digital services such as the YONO app. It offers retail and corporate banking, loans, deposits and government banking services. It typically recruits through public examinations for roles like probationary officer and clerk, and through specialist officer notifications for IT, risk and data roles.
For Data Science roles, this State Bank of India practice set focuses most on Machine Learning (6), Generative AI and LLMs (5), Statistics and Probability (5), SQL for Data Science (4). It has 2 easy, 34 medium, 4 hard questions, so you can start easy and work up to the harder ones.
Company type
Banking & finance
Headquarters
Mumbai, India
Main India offices
Mumbai, Navi Mumbai
State Bank of India Data Science interview process
Preliminary online exam (for PO or clerk roles)
Main online exam
Psychometric test, group exercise or interview
Document verification and final selection
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for State Bank of IndiaStart 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
After joining orders with a promotions table, total revenue doubled. What went wrong?
The join created duplicate order rows, because some orders match more than one promotion row, so each amount is counted several times. Check by comparing COUNT(*) with COUNT(DISTINCT order_id) after the join. Fix it by aggregating the promotions table to one row per order first, picking one promotion with ROW_NUMBER, or summing revenue before the join. Always check row counts after every join.
02
How do you make a machine learning experiment reproducible?
Version the code with Git, the data with a tool like DVC or dated snapshots, and the environment with pinned requirements or Docker. Set random seeds for every library. Log parameters, metrics and the exact data version for each run with a tracker like MLflow. Keep preprocessing inside a pipeline rather than manual notebook steps. Then anyone should be able to rebuild the same model from a commit and a data version.
03
Write Python code to find the top 3 most similar documents to a query using cosine similarity on embeddings.
The category dtype stores each unique value once and keeps small integer codes for every row. For a column like city with 50 unique values in 10 million rows, this can cut memory by more than 90 percent and speed up groupby and sorting. It helps when a column has low cardinality. It does not help for unique IDs or free text, and adding new categories later needs extra handling.
06
What is SHAP and how does it explain model predictions?
SHAP assigns each feature a contribution to a single prediction based on Shapley values from game theory. The contributions add up to the difference between the prediction and the average prediction. It gives local explanations, like why one loan was rejected, and global views by aggregating values across rows. TreeSHAP is fast for tree models. Limits include slow computation for other models and misleading results when features are strongly correlated.
It predicts from the k nearest labelled points. It is simple but slow at prediction time, sensitive to scaling and irrelevant features, and weak in high dimensions.
08
Write Python code to apply a CUPED adjustment using each user's pre-experiment metric.
Use the IQR rule (below Q1-1.5 IQR or above Q3+1.5 IQR), z-scores beyond 3, box plots or model-based methods such as Isolation Forest, then decide whether to cap, remove or keep them.
10
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.
11
What is mean Average Precision (mAP) in object detection?
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.
A CTE, common table expression, is a named temporary result defined with WITH and used in the query that follows. It breaks complex SQL into readable steps and can be referenced more than once. A recursive CTE refers to itself: an anchor query starts the result and a recursive part keeps adding rows until none are added. It is used for hierarchies like employee-manager chains or generating date series.
13
What is method chaining in Pandas and why do teams use it?
Method chaining writes a sequence of transformations as one expression, for example df.query(...).assign(...).groupby(...).agg(...). It avoids many temporary variables, reads top to bottom like a recipe, and reduces the risk of changing the wrong intermediate DataFrame. assign and pipe make chaining easy. The trade-off is that long chains are harder to debug, so split them into named steps when a chain grows past eight or ten operations.
14
Your classifier scores 98 percent on validation, but Grad-CAM shows it focuses on a watermark rather than the object. What is happening?
The model has learned a shortcut: the watermark correlates with the label in your dataset, perhaps because images of one class came from a single source. It will fail when that correlation breaks. Remove or crop the watermarks, rebalance sources across classes, and create a validation set from different sources. Keep using saliency maps and slice-based evaluation to catch other spurious cues such as backgrounds or text.
15
What is chunking in RAG and how do you choose a chunk size?
Chunking splits documents into smaller pieces before embedding them, so retrieval returns focused passages that fit in the prompt. Small chunks, like 200 tokens, are precise but lose context; large chunks, like 1,000 tokens, keep context but add noise and cost. Split on natural boundaries such as headings and paragraphs, add some overlap, and keep metadata like title and section. Then tune chunk size using retrieval metrics on real questions.
16
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.
17
What are lambda functions and where are they useful?
Simple options are length, word count and keyword flags. TF-IDF vectors capture important words and work well with linear models. For meaning, use sentence embeddings from a pretrained model and optionally reduce them with PCA. You can also train a separate text classifier and feed its predicted score as one feature. Fit any vocabulary or encoder on training data only to avoid leakage.
19
Your A/B test shows a significant lift after 2 days. The product team wants to ship now. What do you say?
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.
Regularization adds a penalty on weights to reduce overfitting. L1 (Lasso) adds |w| and can push features to exactly zero. L2 (Ridge) adds w² and shrinks weights smoothly.
21
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.
22
A feature was launched to all users with no control group. How would you estimate its causal impact?
Without randomisation I would use quasi-experimental methods. Difference-in-differences compares the change in a group that got the feature early with one that did not, if rollout was staggered. Interrupted time series or synthetic control builds a counterfactual from pre-launch trends or similar markets. Regression discontinuity works if eligibility had a cut-off. I would state the assumptions clearly and check them with placebo tests.
23
What is the difference between a one-tailed and a two-tailed test?
A two-tailed test checks for a difference in either direction, for example whether a new page changes conversion up or down. A one-tailed test checks only one direction, such as whether it increases conversion. One-tailed tests have more power for that direction but ignore harm in the other direction. In most product experiments a two-tailed test is the safer default unless the direction was fixed before seeing data.
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.
26
Your sales forecast scores well in k-fold cross-validation but fails in production. What could be wrong with the validation?
Random k-fold mixes future and past rows, so the model trains on data from after the period it predicts. That leaks information and inflates scores. Use time-based splits instead: train on an expanding or rolling window and validate on the next period, like TimeSeriesSplit in scikit-learn. Leave a gap between train and validation when features use lagged values, so the test reflects real forecasting conditions.
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.
28
Write Python code to compute the haversine distance between customer and store locations.
The model is treating Diwali as noise because the festival moves on the calendar and a fixed yearly seasonality does not align. Add explicit holiday features: a flag for Diwali and a few days before and after, since buying starts early. Include other regional festivals and sale events too. Models like Prophet or gradient boosting with holiday features handle this well. Then backtest specifically on past festive periods to confirm the fix.
Guardrails are checks around the model that keep inputs and outputs safe and on-topic. Input guardrails detect prompt injection, abuse or off-topic requests. Output guardrails check for personal data, toxic content, policy violations or invalid formats before the answer reaches the user. They can be rules, classifiers or a second LLM call. Good guardrails also define fallback responses and log blocked cases for review.
32
What is the difference between semantic, instance and panoptic segmentation?
Semantic segmentation gives each pixel a class, such as road or car, but does not separate two cars. Instance segmentation separates individual objects of countable classes, giving each car its own mask. Panoptic segmentation combines both: every pixel gets a class, and countable objects also get an instance ID, while background stuff like sky stays semantic. Autonomous driving and robotics often need panoptic or instance output.
33
Write SQL to find customers who ordered in January 2026 but not in February 2026.
SELECT DISTINCT o.customer_id
FROM orders o
WHERE o.order_date >= '2026-01-01' AND o.order_date < '2026-02-01'
AND NOT EXISTS (
SELECT 1 FROM orders f
WHERE f.customer_id = o.customer_id
AND f.order_date >= '2026-02-01' AND f.order_date < '2026-03-01'
);
34
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.
35
What does CI/CD mean for machine learning projects?
Continuous integration runs automatic checks on every code change: unit tests for feature code, data validation, linting and a quick training run on sample data. Continuous delivery packages the model and service, for example as a Docker image, and deploys it through staging to production after evaluation gates, such as the new model beating the current one on a holdout set. Some teams add continuous training, which retrains on new data automatically.
36
What is statistical power and how can you increase it?
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.
Use the provider's structured output or JSON schema mode when available, which constrains the output to your schema. Otherwise, describe the exact schema in the prompt with an example, and use low temperature. Always parse and validate the response in code, for example with Pydantic, and on failure retry with the error message included. Keep schemas small and flat, and use enums for fields with fixed values.
38
What is normalisation, and why are analytics tables often denormalised?
Normalisation splits data into related tables to remove redundancy, so each fact is stored once, which suits transactional systems with many updates. Analytics workloads mostly read large volumes, and joins across many tables are slow and error-prone. So warehouses often use denormalised, wide tables or star schemas that repeat some attributes. The trade-off is more storage and the need to keep copies consistent through pipelines.
39
Training a transformer on a GPU fails with an out-of-memory error. What can you do?
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.
Convolution filters slide over the input to detect local patterns, pooling reduces size, and deeper layers combine edges into shapes and objects. Used mainly for images.
Tips to crack the State Bank of India Data Science interview
Follow official SBI recruitment notifications closely, as eligibility, exam pattern and stages change between recruitment cycles.
Prepare quantitative aptitude, reasoning, English and banking awareness thoroughly, practising full-length mock tests under exam timing.
For specialist IT officer roles, revise networking, databases, security and programming topics listed in the official syllabus.
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; State Bank of India interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the State Bank of India Data Science interview?
Candidates usually go through 4 stages: Preliminary online exam (for PO or clerk roles); Main online exam; Psychometric test, group exercise or interview; Document verification and final selection. 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 State Bank of India Data Science interview?
This practice set leans on Machine Learning (6), Generative AI and LLMs (5), Statistics and Probability (5), SQL for Data Science (4). Revise those first, then practise explaining one or two of your own projects end to end, because most State Bank of India interviewers ask you to walk through real work.
Are these the exact questions asked at State Bank of India?
No. These are curated practice questions that match the skills and difficulty usually tested in banking & finance interviews like State Bank of India's. They are not a leaked or verified list of past questions.
Where does State Bank of India hire Data Science professionals in India?
State Bank of India has large teams in Mumbai, Navi Mumbai. Openings and locations change often, so check the State Bank of India careers page and filter by city and experience.