Machine Learning Engineer · interview questions

Machine Learning Engineer interview questions: how it works

From the role's core and recommended topics, most asked first. Filter by the kind of answer the question wants.

Machine Learning Fundamentals Core 4

  1. Most asked Explain the bias-variance trade-off.
  2. Explain gradient descent and the role of the learning rate.
  3. How does k-means clustering work, and how do you choose k?
  4. Explain how a neural network learns with backpropagation.

scikit-learn Core 1

  1. Most asked How do scikit-learn Pipelines and ColumnTransformer work, and why use them?

pandas Core 1

  1. Explain groupby in pandas: split-apply-combine, agg, transform and filter.

Fine-tuning Core 9

  1. Fine-tuning leaf: Catastrophic forgetting-how to mitigate?
  2. Fine-tuning leaf: Serving multiple LoRA adapters?
  3. Fine-tuning leaf: Domain adaptation for code assistants?
  4. Fine-tuning leaf: License/compliance checks before FT?
  5. Fine-tuning leaf: Distillation use case?
  6. Fine-tuning leaf: Hyperparameters that matter most?
  7. Fine-tuning leaf: Continual fine-tuning strategy?
  8. Fine-tuning leaf: Hardware considerations?
  9. Fine-tuning leaf: Synthetic data-pros/cons?

Evaluation Core 15

  1. Most asked Evaluation leaf: Pros/cons of LLM-as-judge?
  2. Most asked How do you decide whether a prompt change is an improvement?
  3. Evaluation leaf: Online metrics that matter?
  4. Evaluation leaf: Red teaming for LLM apps?
  5. Evaluation leaf: How do you detect regressions after a prompt change?
  6. Evaluation leaf: How do toxicity/safety classifiers fit?
  7. Evaluation leaf: CI gate example for RAG PRs?
  8. How do you handle personal data in LLM features?
  9. Evaluation leaf: Inter-annotator agreement-why care?
  10. Evaluation leaf: Statistical significance in A/B for LLM features?
  11. Evaluation leaf: Synthetic eval data-when OK?
  12. Evaluation leaf: Tracking eval debt?
  13. Evaluation leaf: Multimodal eval challenges?
  14. How do you handle non-determinism in LLM evaluations?
  15. A safety eval passes at 99%. Is the feature safe to launch?

Python Developer Recommended 47

  1. Most asked Explain generators in Python.
  2. Most asked Explain decorators in Python.
  3. Most asked Explain context managers in Python.
  4. Most asked Explain GIL in Python.
  5. Most asked Backend Python interview: explain N+1 queries.
  6. Most asked Backend Python interview: explain SQL injection prevention.
  7. Most asked Explain LEGB scoping in Python.
  8. Most asked Explain *args and **kwargs in Python.
  9. Most asked Explain list/dict/set comprehensions in Python.
  10. Most asked Explain dataclasses in Python.
  11. Most asked Explain dunder methods in Python.
  12. Most asked Explain structural pattern matching (`match`/`case`).
  13. Most asked Walk through the request/response lifecycle in Django, and explain why middleware order matters.
  14. Most asked Explain MRO / C3 in Python.
  15. Explain __name__ == '__main__' in Python.
  16. Python packaging: virtualenv why?
  17. Backend Python interview: explain REST API design.
  18. Backend Python interview: explain migrations.
  19. How does asyncio work internally: event loop, coroutines, tasks and futures?
  20. Explain typing / type hints in Python.
  21. Explain exceptions hierarchy in Python.
  22. Python packaging: dependency pinning?
  23. Backend Python interview: explain FastAPI / Starlette.
  24. Backend Python interview: explain connection pooling.
  25. Backend Python interview: explain caching strategies.
  26. Backend Python interview: explain JWT pitfalls.
  27. Backend Python interview: explain idempotent APIs.
  28. Backend Python interview: explain background jobs.
  29. Backend Python interview: explain observability.
  30. Backend Python interview: explain 12-factor config.
  31. How do cancellation and timeouts work in asyncio?
  32. How does CPython manage memory?
  33. Explain slots in Python.
  34. Explain ABC / Protocol in Python.
  35. Explain property / descriptor in Python.
  36. Python packaging: semantic versioning?
  37. Python packaging: editable installs?
  38. Python packaging: entry points / scripts?
  39. Backend Python interview: explain rate limiting.
  40. How do you handle dates and time zones correctly in Python?
  41. How do `functools.cache`, `lru_cache` and `cached_property` work, and what are the pitfalls?
  42. How did annotation evaluation change in Python 3.14?
  43. How do sorting, `heapq` and `bisect` help with common algorithmic tasks?
  44. How do classic design patterns look in idiomatic Python?
  45. How do descriptors power properties, methods and ORMs?
  46. Python packaging: namespace packages?
  47. How does Python's garbage collection work?

Data Structures Recommended 50

  1. Most asked Explain a list and its typical time complexities.
  2. Most asked Explain a dict and its typical time complexities.
  3. Most asked Explain a set and its typical time complexities.
  4. Most asked Explain a hash table and its typical time complexities.
  5. Most asked Describe BFS and when you would use it.
  6. Most asked Describe DFS and when you would use it.
  7. Most asked Describe binary search and when you would use it.
  8. Most asked Describe two pointers and when you would use it.
  9. Most asked Describe sliding window and when you would use it.
  10. Most asked Describe dynamic programming and when you would use it.
  11. Most asked Describe LRU cache design and when you would use it.
  12. Most asked Explain a deque and its typical time complexities.
  13. Most asked Explain a heapq / priority queue and its typical time complexities.
  14. Explain a tuple and its typical time complexities.
  15. Explain a BST and its typical time complexities.
  16. Explain a graph (adjacency list) and its typical time complexities.
  17. Explain a stack and its typical time complexities.
  18. Explain a queue and its typical time complexities.
  19. Explain a linked list and its typical time complexities.
  20. Explain a binary tree and its typical time complexities.
  21. Explain a trie and its typical time complexities.
  22. Explain a union-find (DSU) and its typical time complexities.
  23. Describe prefix sums and when you would use it.
  24. Describe sorting: quicksort and when you would use it.
  25. Describe sorting: mergesort and when you would use it.
  26. Describe Dijkstra and when you would use it.
  27. Describe topological sort and when you would use it.
  28. Describe greedy algorithms and when you would use it.
  29. Describe backtracking and when you would use it.
  30. Describe Kadane's algorithm and when you would use it.
  31. Describe detect cycle in linked list and when you would use it.
  32. Amortized analysis?
  33. Best/average/worst case?
  34. In Python DSA interviews, explain: __hash__ and __eq__.
  35. In Python DSA interviews, explain: generators and memory.
  36. Explain a frozenset and its typical time complexities.
  37. Explain a AVL / red-black tree and its typical time complexities.
  38. Explain a graph (adjacency matrix) and its typical time complexities.
  39. Explain a bloom filter and its typical time complexities.
  40. Explain a segment tree and its typical time complexities.
  41. Describe sorting: heapsort and when you would use it.
  42. Describe Bellman-Ford and when you would use it.
  43. Describe KMP / string matching and when you would use it.
  44. Describe serialize binary tree and when you would use it.
  45. In-place algorithm?
  46. In Python DSA interviews, explain: dict insertion order.
  47. In Python DSA interviews, explain: list comprehension cost.
  48. In Python DSA interviews, explain: bisect module.
  49. In Python DSA interviews, explain: setdefault / Counter.
  50. Explain the time complexity of common dictionary operations in Python.

Algorithms Recommended 28

  1. Most asked Explain the sliding window pattern.
  2. Most asked Detect a cycle in a linked list—how?
  3. Most asked Reverse a singly linked list iteratively.
  4. Most asked How does Dijkstra work at a high level?
  5. Most asked Topological sort—requirements and uses?
  6. Most asked Name five high-frequency coding patterns.
  7. Most asked LRU cache—data structures?
  8. BFS uses which structure and why?
  9. Min-heap operations complexity?
  10. Inorder traversal of a BST yields what?
  11. Lowest common ancestor in a binary tree (not BST)?
  12. Detect a cycle in a directed graph?
  13. Does recursion use extra space?
  14. How do prefix sums help?
  15. Kadane's algorithm solves what?
  16. Find the middle of a linked list in one pass.
  17. Merge two sorted linked lists—approach?
  18. k-th smallest in a BST?
  19. Binary search bug that causes infinite loops?
  20. Search in a rotated sorted array—key idea?
  21. Classic recurrence for Fibonacci and its DP cost?
  22. Longest common subsequence—complexity of standard DP?
  23. Edit distance measures what?
  24. House Robber intuition?
  25. Grid unique paths DP state?
  26. Serialize and deserialize a binary tree—common approach?
  27. Is Python's sorted stable?
  28. Name a probabilistic alternative to exact set membership.

Data Engineering Recommended 9

  1. Most asked Explain slowly changing dimensions, especially Type 1 and Type 2.
  2. Most asked How do you handle late-arriving data in a daily batch pipeline?
  3. Most asked Data warehouse, data lake or lakehouse: what is the difference?
  4. Most asked How do you handle personal data (PII) in a data warehouse?
  5. How do partitioning and clustering improve warehouse performance and cost?
  6. How does a dbt incremental model work, and what are its pitfalls?
  7. How do you handle schema changes from source systems?
  8. How do you test a data pipeline before deploying changes?
  9. How do Kafka and stream processors fit into data pipelines?

Behavioral & STAR Recommended 8

  1. Most asked Describe a disagreement you had with a coworker and how you resolved it.
  2. Most asked Describe a mistake that had a significant impact and how you handled it.
  3. Most asked Describe a project you owned from start to finish.
  4. Describe a situation where you had to make a decision without all the information you wanted.
  5. Describe how you decide what to work on when everything feels urgent.
  6. Describe how you handle working on something without a clear owner.
  7. Describe your approach to onboarding a new team member.
  8. Describe how you typically respond to criticism.

Was this page helpful?

Report a mistake