Structured Problem Solving and Decomposition Questions
Methodical problem solving for open-ended and ambiguous situations once the problem is defined: decomposing a goal or problem into mutually exclusive, collectively exhaustive parts (issue trees, metric trees and driver breakdowns, work breakdown into subproblems and vertical slices), forming and prioritizing hypotheses (hypothesis trees and funnels, including laying out candidate explanations for a metric drop or model degradation and the cheapest test for each branch), choosing an analytical approach, and reasoning to a recommendation. Also covers turning a vague mandate into measurable, testable subproblems with owners, breaking a large initiative into workstreams, mapping dependencies, sequencing the work, deciding the first deliverable and what to defer, structuring plans that mix research, analytics and experiments, and talking through real examples of cutting a messy problem into parts. Covers explaining and adapting structured problem-solving methods across contexts, choosing and switching methods, and coaching others to structure ambiguity. Excludes turning a vague request into a scoped problem statement, named-framework business cases, root-cause techniques for failures and metric movements (running the diagnosis itself), prioritization scoring and trade-off decisions, deciding how to act under incomplete information, market sizing and estimation, and framing machine-learning problems, which are covered elsewhere.
You usually structure feature work one way, and now you are asked to structure a data quality or model quality problem. What changes in how you break the problem down, and what new steps do you add?
Sample Answer
Direct answer
Feature work usually decomposes by what the user does (screens, flows, capabilities). A data or model quality problem decomposes along the path the data travels and the ways it can be wrong, because the defect can enter at any stage and the user rarely sees it. So I change the axis of the tree, I add steps that make quality measurable before I try to improve it, and I keep the hypothesis-first habit of guessing where defects enter and testing the cheapest guess first.
Structured elaboration
- Change the axis of decomposition. An issue tree is a diagram that splits a problem into branches, each branch a smaller question to answer, and the axis is the rule you split by. Break the problem by pipeline stage (source, ingestion, transformation, labels, features, model, serving, monitoring) and, within each stage, by failure type: missing values, wrong values, duplicates, stale data, inconsistent definitions, and for models also drift (inputs changing over time) and leakage (information from the future or from the answer leaking into training).
- Add steps that feature work does not need.
- Define quality as a number with a measurement point (for example, share of orders with a valid country code at the warehouse table).
- Take a baseline before changing anything.
- Build a small labelled evaluation set (a "golden set" of examples where the right answer is known and trusted).
- Do error analysis: group the failures and count each group.
- Add monitoring and an owner so the fix persists.
- Hypothesis-driven within the tree. Each branch gets a guess ("duplicates entered when two sources were combined"), a cheap test, and a result that would reject it.
- When the clock is minutes (streaming decisions). When data arrives continuously and decisions are made within minutes, there is no time to build a tree from scratch. Prebuild the tree as a runbook (a checklist ordered by likelihood and cheapness, for example: 1. is the newest event older than 5 minutes, meaning the feed is delayed? 2. did a key field suddenly go null? 3. did a schema change, meaning upstream columns were added, renamed or retyped? 4. if unresolved, pause the automated decision and use a fallback rule), stay MECE (mutually exclusive, collectively exhaustive: branches do not overlap and together cover every case) only to the depth the clock allows, and prefer a reversible mitigation (pause the automated decision, fall back to a rule) before diagnosing fully.
- When the work is in a regulated industry. Add checkpoints as branches and as gates: classify the data (does it contain personal or sensitive fields), confirm who has access and that it is logged, record lineage (a trace of where each field came from and what changed it on the way), get the required approval before a change goes live, and respect retention rules (how long data may be kept). As a gate list: 1. data classified, 2. access confirmed and logged, 3. lineage recorded, 4. approval obtained, 5. retention rule checked, and deploy only when all five are ticked. A fix that improves accuracy but breaks an audit trail is not a fix.
Worked example
A fraud model's validation score looks great but production performance is poor. A train/validation split divides the labelled data into rows the model learns from (training) and rows held back to score it honestly (validation), and the validation score is only honest if no held-back row was also used in training. Tree by stage: labels, features, split, serving. Hypothesis under "split": validation rows overlap training rows, a form of leakage because the model has already seen those answers. Test: count validation rows whose transaction ID appears in training.
Suppose validation recall (the share of fraud caught) is 0.79 against 0.70 in production, and 300 of 1,000 validation rows (30%) overlap (all illustrative). If the model catches the already-seen rows almost every time and 70% of the rest, validation recall is 0.3 x 1.0 + 0.7 x 0.70 = 0.79, which matches the gap. A 5% overlap would give only 0.05 x 1.0 + 0.95 x 0.70 = 0.715, too small to explain it, so the size of the overlap decides whether this branch is the cause. Fix the split, re-measure on the cleaned set, and add a check that fails the pipeline if overlap is above zero.
Trade-offs and pitfalls
- Treating "data quality" as one blob. Without failure types you cannot count or prioritise.
- Fixing the model before measuring the data. A better model on bad labels learns the labels' mistakes.
- In streaming, perfect MECE is a luxury. A shared, tested runbook beats a perfect tree built during the incident.
- Quality work needs a stop rule too: agree the target number and the date to stop before starting, otherwise error analysis never finishes.
Product asks you to 'increase engagement' for a social app. Break that vague target into measurable drivers, show how the model's outputs and features connect to each, and say where you would intervene first.
Sample Answer
Direct answer
"Engagement" is not a metric, so first fix a definition (meaningful actions per day), then split it into drivers that multiply back to it, and map each driver to the model output and input features that move it. Start with the feed ranker's action rate per item, with guardrails, unless the data shows new-user retention is the weaker driver.
Terms: DAU is daily active users. A ranker is the model that orders items in a feed. A feature is an input signal to a model. A guardrail metric must not get worse while you optimize the main one. Cold start is the problem of recommending to a user with no history. A cohort is a group of users who started in the same period (for example, everyone who signed up in one week). Headroom is how much room a metric has to improve.
Step 1: define the target
Engaged actions per day = DAU × sessions per DAU × items seen per session × action rate per item. "Action" means a meaningful one (comment, share, reply, post), because optimizing raw clicks builds clickbait. Illustrative baseline: 1,000,000 DAU × 3 sessions × 20 items × 10% = 6,000,000 actions a day (6 per DAU). Raising the action rate from 10% to 11% is +10% relative and lifts the total to 6,600,000.
Step 2: drivers, model outputs and features
Four drivers multiply. DAU itself is a sum of activated new users, retained users and resurrected (lapsed, returned) users.
| Driver | One metric | Model output | Example features | Intervention |
|---|---|---|---|---|
| DAU (activation, retention, resurrection) | Day-7 retention of new users (the share of a signup cohort still active seven days later); share of lapsed users returning in 30 days | Cold-start recommendation of accounts to follow; notification model giving the chance a user opens each send | Signup context, onboarding picks, past notification opens, time-of-day usage, mute settings | Better onboarding recommendations, smarter send timing |
| Sessions per DAU | Sessions per DAU per day | Notification open probability | Recent activity, notification fatigue | Cap and time sends |
| Items seen per session | Items viewed per session | Candidate retrieval (the pool of items the ranker chooses from) | Interest embeddings (a list of numbers summarising a user's or item's topics so similar ones can be matched), freshness | Widen the relevant pool |
| Action rate per item | Meaningful actions per item shown | Predicted probabilities of comment, share, hide | Creator affinity, content similarity, recency, social-graph signals (who follows or interacts with whom) | Reweight objectives (change how much each predicted outcome counts toward the ranking score), add features |
Step 3: where to intervene first
Choose by four criteria: headroom, how directly the model controls the driver, how fast a test teaches you, and risk. The ranker wins on control and speed: you can replay logged data offline (re-score past sessions with the new model and see what it would have ranked, with no live users involved), then run an A/B test (users randomly split into new versus current) in one to two weeks. Notifications risk opt-outs. Activation may have the most long-run value but needs weeks of retention data to read.
The first move: blend predicted comment and share probability into the ranking score alongside likes. Illustrative weights: score = 1 x P(like) + 3 x P(comment) + 4 x P(share) - 5 x P(hide). Item X (like 0.10, comment 0.01, share 0.005, hide 0.002) scores 0.10 + 0.03 + 0.02 - 0.01 = 0.14. Item Y (like 0.15, comment 0.002, share 0.001, hide 0.02) scores 0.15 + 0.006 + 0.004 - 0.10 = 0.06. Ranking on likes alone puts Y first; the blend puts X first, which is how you steer toward conversation without a new model, and you can change the weights in a day. Guardrails: hide and report rate (so outrage bait or spam that people dislike is caught), creator diversity, and notification opt-outs.
What flips the call: if new cohorts' day-7 retention is far below older cohorts', the cold-start model goes first.
Pitfalls
The offline metric rises while the A/B test is flat. The ranker only learns from items it showed, so keep an exploration share (a small slice of feed slots, say 5%, filled with items the model would not normally pick, so it can learn whether they are good). An example of offline-versus-A/B gap: a new model predicts comments better on logged data, but in the live test people see more of what they already like and comment no more. Targets get gamed (Goodhart's law: a measure used as a target stops being a good measure; for example, counting raw comments rewards provocative posts, which is why guardrails sit beside the target).
A deployed model lost 8% accuracy week over week. Build a tree of possible explanations, going at least two levels deep, and for each leaf say the one quick check that would confirm or rule it out.
Sample Answer
Direct answer
First I confirm what "8%" means: 90% down to 82% is 8 percentage points (about 8.9% relative), whereas 8% relative is 90% down to 82.8%. Then I organise explanations by what changed this week, and give each leaf one check that takes minutes and gives a clear yes or no. I run the cheapest checks first.
The tree (example: a support-ticket urgency classifier whose accuracy fell from 90% to 82%)
| Level 1 | Level 2 leaf | The one quick check |
|---|---|---|
| We shipped something | 1a. A different model version is serving | Compare deploy log times against the day accuracy began to fall |
| 1b. A threshold (the score cut-off above which the model says "urgent") or a preprocessing step (cleaning and reshaping inputs before the model sees them) changed | Diff the configuration between last week and this week | |
| The data feed changed | 2a. Missing or default values rose | Compare the null-rate per feature (the share of rows where that field is empty), this week against last |
| 2b. A category, unit or schema (the agreed list of fields and their types) changed | Compare each feature's minimum, maximum and category list with those at training time | |
| The world changed | 3a. The mix of tickets shifted | Compare the share of tickets by product area or customer tier with last week, and check whether each segment's own accuracy is unchanged while the overall figure fell |
| 3b. Behaviour changed for the same kind of ticket | Score today's model on a frozen older labelled set (a fixed sample of tickets labelled in the past and never changed) | |
| The measurement changed | 4a. Labels are late or incomplete | Recompute accuracy using only labels older than the usual delay |
| 4b. The labelling rule or sample changed | Read the labelling guideline change log and compare the labelled share of traffic |
Eight leaves under four branches. The frozen-set check in 3b is the most informative single test: if today's model still scores about the same on an old labelled set, the model is intact and what it sees has changed.
What confirming and ruling out look like (illustrative numbers)
- Leaf 3a, mix shift. Suppose billing tickets are 95% accurate and outage tickets 70%. Last week 80% of tickets were billing: 0.8 x 95 + 0.2 x 70 = 90%. This week outages are 50%: 0.5 x 95 + 0.5 x 70 = 82.5%. Each segment's accuracy did not move, yet the total fell 7.5 points. That pattern (segments steady, overall down) confirms mix. If instead billing fell to 87% and outages to 62% with the same shares as before, accuracy fell in every segment, so mix is ruled out and the cause is inside the model or its inputs.
- Leaf 3b, frozen set. If the model scored 90% on the frozen set last week and 90% today, the model is intact and the inputs or the world changed. If it now scores 82% on that same frozen set, the model or its serving code changed (go back to branch 1).
- Leaf 3b needs care: an unchanged score on the frozen set shows only that the model and serving code are intact. It cannot tell concept change (3b) from a feed change (2a, 2b) or a mix shift (3a), so 3b is confirmed by elimination: frozen set steady, 2a and 2b clean, 3a ruled out by segment accuracy, and accuracy on freshly labelled recent tickets still low.
- Leaf 4a, label lag. If accuracy recomputed on only mature labels (older than the usual delay) is still 90%, the fall was an artefact of incomplete recent labels.
Order of work: 1a, 1b, 4a, 2a first (minutes each, from logs and dashboards), then 2b, 3a, 3b, 4b.
How the tree shifts with system type
| System | Branches (in pipeline order) | Quick check per branch |
|---|---|---|
| Generative question-answering system (a large language model, LLM, answering from documents), hallucinations (confident but unsupported answers) up | Data: source documents stale or missing. Retrieval (looking up passages to give the model): wrong passages fetched. Prompt: instructions changed. Decoding (how the model picks each next word): sampling temperature (higher means more random wording) or length limits changed. Evaluation: judge (a second model or person scoring the answers) or test set changed | Does the correct passage exist in the index (the searchable store of passages)? Is the correct passage in the top results returned? Diff the prompt. Diff the decoding settings. Re-score with the previous judge |
| Fraud model, false negatives (missed fraud) rose | Label lag: confirmed fraud arrives weeks later, so recent weeks look better than they are. (Direction matters: lag hides missed fraud in recent weeks, so it cannot explain a rise in observed false negatives; it can only mask a bigger real rise, so matured labels may show the problem is worse.) Threshold: the score cut-off for "flag as fraud" was raised, so fewer cases are flagged. Skew (training/serving skew): a feature computed one way when the model was trained and another way in live traffic | Re-score once labels have matured. Compare threshold history. Compare live and training feature values for the same transactions |
Pitfalls
- Leaves with no check ("model drift") that give no way to rule them in or out.
- Checks that take days, not minutes. If so, split the leaf.
- Accepting a leaf as the cause because its check was positive, without asking whether it is big enough to explain the whole 8 points.
A binary classifier's production accuracy has degraded and you need to organize every plausible source of the error before anyone starts debugging. How would you structure the possible causes so they do not overlap and nothing is missed, and how would you check your structure is sound?
Sample Answer
Direct answer
Accuracy is correct predictions divided by labelled predictions. Both sides of that fraction come from only four places, which is why four branches can cover it. A prediction depends on the inputs and on the deployed model and pipeline; the label it is compared with depends on the real outcome and on how labels are produced. So the number is determined by four things: the inputs the model receives, the true relationship between inputs and the real outcome, the deployed model and pipeline that turns inputs into predictions, and the process that produces labels and the metric. A fall in accuracy requires a change in at least one of them, so those four are my top-level branches. I check soundness by replaying past incidents onto the tree and by testing every leaf for a single home.
The tree (example: a spam filter, where the two classes are spam and not spam)
| Branch | Leaves |
|---|---|
| A. The inputs changed | A1 Traffic mix changed (new senders, new languages, spam share shifted). A2 Upstream data broke (nulls, schema or unit change, stale feature values). A3 Training/serving skew: a feature is computed differently online than it was for training |
| B. The input-to-outcome relationship changed | B1 Real-world behaviour changed (spammers adopt new tactics, so old patterns no longer mean spam) |
| C. The model or pipeline changed | C1 A new model version or retrain shipped. C2 A threshold or configuration changed. C3 A dependency or preprocessing library changed behaviour |
| D. The measurement changed | D1 Labels are late or incomplete in the evaluation window. D2 The labelling rule or labeller pool changed. D3 The sampled population being labelled changed, or is too small so the number is noisy. D4 The metric or dashboard computation has a bug |
Terms in the leaves: a threshold is the score cut-off above which the model says "spam". Upstream means earlier in the data flow. A schema is the agreed list of fields and their types. Retraining means fitting the model again on newer data. A preprocessing library is shared code that cleans and converts raw data before the model sees it. Drift means live data or the real-world pattern has moved away from what the model learned from. Data drift is the inputs changing (A1); concept drift is the link between inputs and the true outcome changing (B1).
Tie rule that keeps leaves exclusive: classify each cause by where in the chain it originates. A broken upstream job that feeds bad values is A2, even though it also looks like data drift. A shift in the spam share is A1, since it changes the inputs, not the rule linking them to labels. Two more overlaps to settle in advance. Skew versus a changed library: if a feature is computed differently online than in training and nothing was deployed this week it is A3; if a deployed code or library change made it differ it is C3 (the change event is the origin). Traffic mix versus labelled-sample mix: if real traffic changed it is A1; if traffic is unchanged but the emails chosen for labelling changed, it is D3.
How I check the structure is sound
- One-home test: write five real past incidents (or imagine plausible ones) and place each. If one fits two leaves, sharpen the leaf definitions. If one fits none, there is a gap.
- Exhaustiveness argument: could accuracy move while all four factors stay fixed? If I cannot construct such a case, the four branches cover the space. Where I cannot argue it, I add an explicit "unexplained" leaf that must shrink to zero before anyone calls the investigation finished.
- So-what test: each leaf maps to a different owner or action (data team, ML team, labelling team, analytics).
- Peer review: ask someone who did not draw the tree to find a cause with no home.
One incident traced through the one-home test (illustrative numbers)
Daily accuracy on 1,000 labelled emails falls from 95% (950 correct) to 89% (890 correct). Investigation shows a feature called sender reputation arrives empty for 12% of emails since a data-job change last Tuesday. Placement: the model and threshold are unchanged (not C), labelling volume and rules are unchanged (not D), spammer behaviour is the same on emails with a score (not B). The inputs are wrong, and they are wrong because an upstream job broke, so the single home is A2, not A1 and not B1. Fixing the job and re-scoring the affected emails should restore accuracy; if it recovers only part of the 6 points, the remainder still has to be placed on a leaf, and an unplaceable remainder goes to the "unexplained" leaf.
Trying to break the exhaustiveness argument: random noise on a small labelled sample can move accuracy with nothing real changing. That is a measurement cause, which is why D3 includes "too small".
Same discipline on three other systems (one split each, checked with the same one-home and exhaustiveness tests used on the classifier tree)
A feature store is a service holding precomputed model inputs (features) for training and live use. A Kafka topic is a named stream of events, durably stored (the Kafka documentation likens it to a folder of events), that producers write to and consumers read from. Here a broker is a server holding the log, a partition is one slice of a topic, a sink is where a consumer finally writes the data, retries are repeated send attempts after a failure, replication lag is the delay before copies of data catch up, and cache lifetime is how long a stored value is reused before being refreshed.
| System and symptom | Buckets (by where it originates) | Mitigation per bucket |
|---|---|---|
| Feature store serving stale values | Writer side: the update job is late or failed. Store side: cache lifetime too long or replication lag. Reader side: wrong key, version or point in time requested | Alert on job freshness; shorten cache lifetime or fix replication; add a version check at read time |
| Kafka ingestion volume dropped | Producers send less (app change, real traffic fall). Transport loses or delays data (broker or partition trouble, exhausted retries). Consumers or sinks drop data (lag, skipped undecodable messages, write failures). Measurement (the counter itself) | Compare producer and consumer counts at each hop; alert on skipped messages; confirm with a second counter |
| Web page slowdown | Client and network. Server computation. Downstream dependencies (database, other services). Traffic or load | Trace one slow request to find which hop owns the extra time |
Pitfalls
- Mixing "what" and "where" in one level (for example "data drift" next to "upstream job failure").
- A catch-all "Other" holding most of the cases.
- Debugging before the tree is agreed, which anchors everyone on the first plausible story.
You have several plausible explanations for a problem and only a few days. How would you decide which to investigate first, and walk me through a concrete example with three candidate causes?
Sample Answer
Direct answer
Score every candidate on three things: how likely it is, how much of the problem it would explain if true, and how many hours it takes to check. Investigate in order of explained-per-hour, not by gut feeling or by whoever argues loudest. Cheap checks that can eliminate a cause go first, and each check gets a time limit.
The scoring rule
A hypothesis is a candidate explanation you can test. Priority = likelihood × share of the problem explained if true ÷ hours to check. The numbers are honest guesses, and their main value is that teammates can score separately and expose disagreement.
Worked example (illustrative numbers)
Checkout conversion fell from 3.0% to 2.7% a week ago. You have three days, about 18 working hours.
| Candidate cause | Likelihood | Share explained if true | Hours | Score |
|---|---|---|---|---|
| A. Tracking bug from last week's release undercounts orders | 0.30 | 1.0 (the drop would not be real) | 2 | 0.150 |
| B. Traffic shifted toward a new paid campaign with lower intent | 0.40 | 0.6 | 4 | 0.060 |
| C. Shipping fee change at checkout | 0.20 | 0.8 | 6 | 0.027 |
Likelihoods sum to 0.90, leaving 0.10 for "something else". To estimate "share explained if true", ask how many points of the 0.3-point drop (3.0% to 2.7%) the cause could produce if real, divided by 0.3. For B: if the campaign brings 10% of sessions and they convert at 1.2% instead of 3.0%, they pull the average down by 0.1 x 1.8 = 0.18 points, and 0.18 / 0.3 = 0.6. For A, a tracking bug would make the whole drop unreal, so 1.0. Order: A, B, C. Total effort is 12 hours, leaving 6 hours of the 18 for follow-up on whatever the checks reveal.
What would flip the order
If the release log shows nothing touched checkout tracking, A's likelihood falls to 0.05 and its score to 0.025. The order becomes B (0.060), C (0.027), A (0.025). A still costs only 2 hours, so it can run in parallel as a sanity check (a quick test that confirms a result is not an artefact).
Effort, risk and parallelism
- Independent checks run at the same time. With two analysts, A and B start together on day one, and the scores decide who gets a scarce third person.
- Add a cost-of-delay adjustment (weight a cause by what each extra day of waiting costs): if C means lost revenue every day and the fix is a one-line revert, move it up. For example, if a one-hour revert test replaces the six-hour investigation, C scores 0.20 x 0.8 / 1 = 0.160, above A's 0.150, so C runs first even though it is the least likely.
- Timebox each check (give it a fixed time limit), for example "if no signal after 4 hours, record that and move on." Allow one deep check only after the cheap ones fail.
- Write down what you ruled out and how, so the work is not repeated.
Pitfalls
Anchoring (locking onto the first idea or number you heard), treating the scores as measurements, and checking only evidence that confirms a favourite cause.
Unlock Full Question Bank
Get access to all 10 Structured Problem Solving and Decomposition interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.