25 assignments · 5 roles · time-boxed · graded like the real thing

AI / ML / Data Science Take-Home Assignments

Question lists don't prepare you for a real take-home. These 25 exercises across Data Analyst, Data Scientist, ML Engineer, GenAI/LLM Engineer, and MLOps Engineer roles are modeled on real company-style assignments — each with a genuine public dataset, a realistic time box, concrete deliverables, and the criteria an interviewer would actually grade you on.

📊 Data Analyst · 5 assignments

E-commerce funnel drop-off investigation

Beginner

⏱ Time box: 3 hours

Given a funnel events dataset (visit → add-to-cart → checkout → purchase), find the biggest drop-off step and propose a specific fix.

  • Dataset: Kaggle e-commerce funnel / clickstream datasets
📦 Deliverables & grading criteria

📦 Deliverables

  • A conversion-rate chart by funnel step
  • A written diagnosis of the biggest drop-off with a plausible cause
  • One recommended experiment to test the fix

✅ What you'd be graded on

  • Conversion rate at each step is computed correctly
  • The diagnosis is grounded in the data, not speculation
  • The recommendation is specific and testable, not generic advice

💡 Tip

Interviewers care more about the recommendation than the chart — spend real time on 'so what should we actually do about it.'

Retail sales cohort & seasonality report

Intermediate

⏱ Time box: 1 day

Using 1-2 years of retail transaction data, build a monthly cohort retention view and separate genuine growth from seasonal spikes.

  • Dataset: UCI Online Retail dataset
📦 Deliverables & grading criteria

📦 Deliverables

  • A cohort retention table or heatmap
  • A trend-vs-seasonality decomposition of overall sales
  • An executive summary under 200 words

✅ What you'd be graded on

  • Cohort table is correctly computed with no signup-month errors
  • Trend and seasonal effects are genuinely separated, not eyeballed
  • Summary is written for a non-technical stakeholder

💡 Tip

State your assumptions about what counts as a 'returning' customer explicitly — graders check this.

SQL diagnostic: why did revenue drop last week?

Beginner

⏱ Time box: 2 hours

Write SQL against a sample e-commerce schema to isolate whether a week-over-week revenue dip is driven by traffic, conversion rate, or average order value.

  • Dataset: Any sample e-commerce SQL schema (e.g. a Postgres sample DB you set up)
📦 Deliverables & grading criteria

📦 Deliverables

  • The SQL queries used, in the order you ran them
  • A one-paragraph conclusion naming the primary driver
  • One caveat about data quality or a possible confounder

✅ What you'd be graded on

  • Queries correctly isolate each candidate driver
  • The conclusion actually follows from the numbers shown
  • Shows awareness of at least one confounder (e.g. a tracking outage)

💡 Tip

Show your query history, not just the final answer — interviewers grade the path, not just the destination.

Dashboard build: subscription business health

Intermediate

⏱ Time box: 1 day

Build a one-page dashboard showing a subscription business's health — MRR, churn rate, and net revenue retention — from raw event/billing data.

  • Dataset: Kaggle SaaS/subscription simulated datasets, or data you generate yourself
📦 Deliverables & grading criteria

📦 Deliverables

  • A working dashboard (Power BI, Tableau, Looker Studio, or Streamlit)
  • Written definitions for every metric shown
  • One flagged data-quality issue you found while building it

✅ What you'd be graded on

  • Metrics are correctly and consistently defined
  • The dashboard has a clear visual hierarchy, not chart soup
  • The flagged data-quality issue is real and specific

💡 Tip

Precisely defining 'active subscriber' matters more than the chart library you pick.

A/B test readout

Beginner

⏱ Time box: 2 hours

Given raw experiment data, decide whether variant B should ship — compute significance, effect size, and check for at least one common pitfall.

  • Dataset: Kaggle A/B test datasets
📦 Deliverables & grading criteria

📦 Deliverables

  • A significance test with p-value and a confidence interval on the lift
  • A clear ship/no-ship recommendation
  • One genuine check for a pitfall (sample ratio mismatch, peeking, or novelty effect)

✅ What you'd be graded on

  • Test choice and statistics are correct
  • The recommendation matches the evidence, including its uncertainty
  • The pitfall check is actually performed, not just mentioned

💡 Tip

A recommendation of 'ship it' with a confidence interval that includes zero is a red flag graders look for.

🔬 Data Scientist · 5 assignments

Churn prediction with a business recommendation

Intermediate

⏱ Time box: 1 day

Build a churn model and translate it into a concrete retention-targeting recommendation with a rough cost/benefit estimate.

  • Dataset: Telco Customer Churn (Kaggle)
📦 Deliverables & grading criteria

📦 Deliverables

  • A trained model reported with a metric appropriate for class imbalance (PR-AUC or F1, not accuracy)
  • Top churn drivers explained with SHAP or coefficients
  • A written targeting recommendation with a rough ROI estimate

✅ What you'd be graded on

  • Metric choice is appropriate for the class imbalance
  • Drivers are correctly interpreted, not just listed by importance score
  • The recommendation ties model output to a specific business action

💡 Tip

A model with great AUC but no clear 'so who do we call, and is it worth it' answer will not pass a real interview.

Pricing elasticity estimate

Advanced

⏱ Time box: 1 day

Estimate price elasticity of demand from historical price and quantity data, then recommend a specific price change with an expected revenue impact.

  • Dataset: Any retail pricing dataset on Kaggle, or simulated price/quantity data
📦 Deliverables & grading criteria

📦 Deliverables

  • An elasticity estimate with a stated confidence range
  • A specific recommended price change
  • A discussion of at least one confounder (promotions, seasonality, competitor pricing)

✅ What you'd be graded on

  • Elasticity is estimated with a defensible method, not a single correlation
  • The recommendation includes uncertainty, not a false-precision number
  • Confounders are addressed, not ignored

💡 Tip

Naive correlation between price and quantity is almost always confounded — this is the trap the exercise is testing for.

Fraud detection under heavy class imbalance

Advanced

⏱ Time box: 1 day

Build a fraud classifier on a dataset where positives are under 0.5% of rows, and justify your evaluation approach and threshold choice.

  • Dataset: Credit Card Fraud Detection (Kaggle)
📦 Deliverables & grading criteria

📦 Deliverables

  • A model evaluated with PR-AUC and a cost-weighted confusion matrix
  • A justified classification threshold, not the 0.5 default
  • A discussion of resampling or class-weighting choices made

✅ What you'd be graded on

  • Accuracy is not used as the headline metric
  • Threshold choice is tied to a stated cost trade-off (false positive vs. false negative cost)
  • Resampling/weighting decisions are explained, not just applied by default

💡 Tip

If your writeup reports accuracy as the main metric on a 0.5%-positive dataset, that alone signals a miss to most graders.

Demand forecast with a naive baseline

Intermediate

⏱ Time box: 1 day

Forecast next-month demand for a retail or store-item dataset, and prove your model actually beats a naive baseline with proper backtesting.

  • Dataset: Rossmann Store Sales or M5 (Kaggle)
📦 Deliverables & grading criteria

📦 Deliverables

  • A time-based (not random) train/test split
  • A forecast compared against a naive baseline (e.g. last-value or seasonal-naive)
  • A prediction interval, not a single point estimate

✅ What you'd be graded on

  • Split respects time order — no leakage from the future
  • The model is shown to beat the baseline on a real metric (MAPE/RMSE), not just presented alone
  • A prediction interval is included and explained

💡 Tip

A forecast without a baseline comparison tells the interviewer nothing about whether the extra modeling effort was worth it.

Statistical case study: is this result real?

Beginner

⏱ Time box: 3 hours

Given summary statistics from a claimed A/B test result with a suspiciously large effect size, investigate whether it's statistically and practically credible.

  • Dataset: Simulated experiment summary data (write your own scenario with a planted flaw)
📦 Deliverables & grading criteria

📦 Deliverables

  • A recomputation of the claimed significance
  • An assessment of practical significance, not just statistical significance
  • A written verdict: trust it, or not, and why

✅ What you'd be graded on

  • Correctly identifies whether the sample size supports the claimed effect
  • Distinguishes statistical from practical significance
  • Verdict is clearly justified, not just asserted

💡 Tip

This tests skepticism as much as statistics — a good analyst questions a suspiciously good result before acting on it.

⚙️ ML Engineer · 5 assignments

Productionize a model behind an API

Intermediate

⏱ Time box: 1 day

Train a simple model, then wrap it in a REST API with input validation, a health check, and basic versioning.

  • Dataset: Any tabular dataset (e.g. Ames Housing)
📦 Deliverables & grading criteria

📦 Deliverables

  • A working API serving predictions (e.g. FastAPI)
  • Input validation with clear error responses on bad input
  • A small test suite covering the happy path and one edge case

✅ What you'd be graded on

  • API design uses sensible status codes and request/response shapes
  • Validation actually rejects malformed input rather than crashing
  • Tests genuinely exercise the running service

💡 Tip

A model.predict() wrapped in a route with zero validation is the most common way this exercise is failed.

Debug a silently underperforming pipeline

Advanced

⏱ Time box: 1 day

Given a training pipeline with a deliberately planted bug (data leakage or a preprocessing error), find and fix the root cause.

  • Dataset: Your own deliberately-broken pipeline, built by injecting a leakage bug into any public dataset pipeline
📦 Deliverables & grading criteria

📦 Deliverables

  • A written root-cause diagnosis
  • The fix applied, with a before/after metric comparison
  • A regression test that would have caught the bug

✅ What you'd be graded on

  • Diagnosis identifies the true root cause, not just a symptom
  • The fix measurably changes the metric in the expected direction
  • The regression test is meaningful, not superficial

💡 Tip

Classic planted bugs: fitting a scaler on the full dataset before the train/test split, or leaking the target through a derived feature.

Batch vs. real-time serving design

Intermediate

⏱ Time box: Half day (design only)

For a given business scenario (e.g. fraud scoring vs. weekly churn scoring), decide between batch and real-time inference and justify the trade-off.

  • Dataset: N/A — this is a system design writeup
📦 Deliverables & grading criteria

📦 Deliverables

  • A one-page design document
  • A clear recommendation justified on latency, cost, and data-freshness needs
  • A monitoring and rollback plan

✅ What you'd be graded on

  • The recommendation matches the scenario's actual latency/freshness needs
  • Trade-offs are explicitly reasoned, not just asserted
  • The monitoring/rollback plan is concrete, not generic

💡 Tip

The 'right' answer depends entirely on the scenario — graders are testing your reasoning, not a memorized default.

CI pipeline that blocks a model regression

Intermediate

⏱ Time box: 1 day

Add a CI pipeline to a model repo that runs tests, checks the input data schema, and blocks a merge if key metrics regress versus a stored baseline.

  • Dataset: N/A — your own model repo
📦 Deliverables & grading criteria

📦 Deliverables

  • A working CI configuration (e.g. GitHub Actions)
  • An automated data-schema check
  • A metric-regression gate that fails the build on a real regression

✅ What you'd be graded on

  • The pipeline actually runs and fails correctly on a deliberately regressed metric
  • The schema check catches a genuine schema violation
  • The gate's threshold is sensible, not arbitrary

💡 Tip

Test that your gate actually fails by deliberately breaking something — an untested CI check is worse than no check.

Minimal feature store to prevent train/serve skew

Advanced

⏱ Time box: 1-2 days

Build a minimal feature store that computes a feature identically at training time and at serving time, eliminating train/serve skew for that feature.

  • Dataset: Any tabular dataset with at least one time-windowed feature (e.g. 'purchases in the last 30 days')
📦 Deliverables & grading criteria

📦 Deliverables

  • Shared feature-computation code used by both training and serving paths
  • A test proving the two paths produce identical values
  • A short writeup explaining what skew this prevents

✅ What you'd be graded on

  • Training and serving genuinely share the same computation, not two similar copies
  • The equivalence test is real and passes
  • The writeup correctly explains the skew risk being solved

💡 Tip

The bug this exercise tests for is subtle: two 'equivalent-looking' implementations that quietly diverge on edge cases like time-zone boundaries.

🤖 GenAI / LLM Engineer · 5 assignments

RAG chatbot over a document set

Intermediate

⏱ Time box: 1 day

Build a RAG chatbot over roughly 20 PDFs that answers with citations to the source page and has a genuine 'not in the docs' fallback.

  • Dataset: Any set of ~20 PDFs (policies, manuals, textbooks)
📦 Deliverables & grading criteria

📦 Deliverables

  • A working chatbot that cites its sources
  • A written explanation of the chunking/retrieval strategy chosen
  • A demonstrated case where it correctly says it doesn't know

✅ What you'd be graded on

  • Answers are grounded and citations point to the correct source
  • Chunking choices are justified, not arbitrary defaults
  • The fallback genuinely triggers on an out-of-scope question rather than hallucinating

💡 Tip

Graders will deliberately ask something not in the documents — make sure your fallback actually works before you submit.

Prompt injection red-team and patch

Intermediate

⏱ Time box: Half day

Attempt 5 distinct prompt-injection attacks against an agent with tool access, then patch defenses and confirm they hold.

  • Dataset: Your own agent + hand-crafted injection payloads
📦 Deliverables & grading criteria

📦 Deliverables

  • A log of the 5 attack attempts and their outcomes before patching
  • The defenses applied
  • Re-run results showing the attacks now fail

✅ What you'd be graded on

  • Attacks are genuinely distinct, not five variations of one idea
  • Defenses address the actual mechanism of the attack, not just the specific wording used
  • Re-test evidence is included, not just claimed

💡 Tip

A defense that only blocks the exact phrase you tested, rather than the underlying pattern, will be caught by a grader trying a slightly different wording.

Cut LLM feature cost by 50%+

Intermediate

⏱ Time box: 1 day

Given a working but expensive LLM feature, reduce cost per request by at least 50% without materially hurting output quality.

  • Dataset: Your own or a sample LLM-powered feature (e.g. a summarizer or classifier)
📦 Deliverables & grading criteria

📦 Deliverables

  • A before/after cost-per-request comparison
  • The specific optimizations applied (caching, model routing, prompt trimming, etc.)
  • Evidence that output quality didn't materially regress

✅ What you'd be graded on

  • The cost reduction is real and measured, not estimated
  • At least one structural optimization is used, not just a smaller model swap
  • Quality is actually re-evaluated after the change, not assumed unchanged

💡 Tip

Swapping to a cheaper model alone is the obvious answer — the strongest submissions also restructure the prompt or add caching.

Evaluate two prompts with evidence

Beginner

⏱ Time box: 3 hours

Build a small eval harness that scores two prompt variants for the same task against 20 fixed test cases, and recommend one with data.

  • Dataset: A small hand-labelled test set for any task (e.g. classifying support tickets)
📦 Deliverables & grading criteria

📦 Deliverables

  • The eval harness code
  • A scored comparison table for both prompts
  • A recommendation backed by the scores, not intuition

✅ What you'd be graded on

  • The same 20 test cases are used fairly for both prompts
  • Scoring is consistent and explained (exact match, rubric, or LLM-judge)
  • The recommendation is evidence-based

💡 Tip

This is exactly the muscle real teams want: 'prompt engineering with evidence, not vibes.'

Build a minimal MCP server

Intermediate

⏱ Time box: Half day

Expose one real tool (e.g. a database query or a public API call) via an MCP server and connect it to an MCP-compatible client.

  • Dataset: N/A — any local tool or public API of your choice
📦 Deliverables & grading criteria

📦 Deliverables

  • A working MCP server exposing at least one tool
  • Confirmation the client discovers it with zero custom integration code
  • A short writeup of what the server exposes and why

✅ What you'd be graded on

  • The server correctly implements the MCP schema for tool discovery
  • The tool actually executes and returns a correct result end-to-end
  • The writeup demonstrates understanding of why MCP matters, not just that it works

💡 Tip

The point of this exercise is proving you understand the discovery/schema layer, not just calling an API from Python.

🛠️ MLOps Engineer · 5 assignments

Containerize and deploy a model

Beginner

⏱ Time box: Half day

Dockerize an existing model service and deploy it (locally or to a free-tier cloud provider) with a working health-check endpoint.

  • Dataset: N/A — any existing model service
📦 Deliverables & grading criteria

📦 Deliverables

  • A working Dockerfile and built image
  • A deployed, reachable service
  • A health-check endpoint that reflects real service state

✅ What you'd be graded on

  • The image builds and runs cleanly from scratch
  • The service is actually reachable, not just running locally
  • The health check meaningfully reflects whether the service can serve requests

💡 Tip

A health check that always returns 200 regardless of model state defeats the purpose — make it check something real.

Set up drift monitoring

Intermediate

⏱ Time box: 1 day

Instrument a deployed model to track prediction/feature distribution drift against the training distribution, and alert past a threshold.

  • Dataset: Any tabular dataset, split into a 'training' and a deliberately shifted 'production' sample
📦 Deliverables & grading criteria

📦 Deliverables

  • A drift metric computed per feature (e.g. PSI or KS statistic)
  • A dashboard or log showing drift over time
  • An alert that fires when a deliberately shifted sample is fed through

✅ What you'd be graded on

  • The drift metric is appropriate and correctly computed
  • The alert genuinely fires on the shifted sample and not on unshifted data
  • Thresholds are justified, not arbitrary

💡 Tip

Test your alert with a batch you know is shifted — an alert that never fires in testing is a bug, not a safe default.

Canary rollout plan with auto-rollback

Intermediate

⏱ Time box: Half day (design)

Design a canary rollout strategy for a new model version, including a concrete automatic rollback trigger.

  • Dataset: N/A — system design writeup
📦 Deliverables & grading criteria

📦 Deliverables

  • A one-page rollout plan (traffic split, ramp schedule)
  • A specific, measurable rollback trigger (not 'if it looks bad')
  • A description of what's logged to decide the rollback

✅ What you'd be graded on

  • The traffic ramp is concrete and reasonable
  • The rollback trigger is a specific metric and threshold
  • The plan would actually be actionable by an on-call engineer at 2am

💡 Tip

'Roll back if performance degrades' is not a plan — name the exact metric, threshold, and who/what acts on it.

Make an ad-hoc notebook reproducible

Intermediate

⏱ Time box: 1 day

Take an existing ad-hoc training notebook and make it fully reproducible: pinned dependencies, seeded randomness, and versioned data/model artifacts.

  • Dataset: Any existing notebook of yours, or a public one you adopt for this exercise
📦 Deliverables & grading criteria

📦 Deliverables

  • A pinned dependency file
  • Confirmed identical results across two separate runs
  • Versioned artifacts for the data and the trained model

✅ What you'd be graded on

  • Two independent runs produce identical (or near-identical) metrics
  • Dependencies are actually pinned, not just listed loosely
  • Artifacts are versioned in a way someone else could trace back

💡 Tip

Run it twice yourself, on a clean environment, before you claim it's reproducible — this is the step most people skip.

Cost audit of an ML pipeline

Advanced

⏱ Time box: 1 day

Given a cloud bill breakdown and a pipeline architecture description, identify the top 3 cost drivers and propose concrete reductions.

  • Dataset: A sample cloud cost breakdown you construct from a realistic pipeline architecture (compute, storage, data transfer, inference)
📦 Deliverables & grading criteria

📦 Deliverables

  • The top 3 cost drivers, ranked and quantified
  • A specific reduction proposal for each, with an estimated savings
  • One trade-off each proposal introduces (latency, reliability, or complexity)

✅ What you'd be graded on

  • Cost drivers are correctly ranked by actual magnitude, not guessed
  • Proposals are specific and technically sound
  • Trade-offs are honestly stated, not omitted

💡 Tip

The strongest answers name the trade-off a cost cut introduces — free lunches are a red flag to experienced graders.