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
scikit-learn Core 1
pandas Core 1
Fine-tuning Core 9
- Fine-tuning leaf: Catastrophic forgetting-how to mitigate?
- Fine-tuning leaf: Serving multiple LoRA adapters?
- Fine-tuning leaf: Domain adaptation for code assistants?
- Fine-tuning leaf: License/compliance checks before FT?
- Fine-tuning leaf: Distillation use case?
- Fine-tuning leaf: Hyperparameters that matter most?
- Fine-tuning leaf: Continual fine-tuning strategy?
- Fine-tuning leaf: Hardware considerations?
- Fine-tuning leaf: Synthetic data-pros/cons?
Evaluation Core 15
- Most asked Evaluation leaf: Pros/cons of LLM-as-judge?
- Most asked How do you decide whether a prompt change is an improvement?
- Evaluation leaf: Online metrics that matter?
- Evaluation leaf: Red teaming for LLM apps?
- Evaluation leaf: How do you detect regressions after a prompt change?
- Evaluation leaf: How do toxicity/safety classifiers fit?
- Evaluation leaf: CI gate example for RAG PRs?
- How do you handle personal data in LLM features?
- Evaluation leaf: Inter-annotator agreement-why care?
- Evaluation leaf: Statistical significance in A/B for LLM features?
- Evaluation leaf: Synthetic eval data-when OK?
- Evaluation leaf: Tracking eval debt?
- Evaluation leaf: Multimodal eval challenges?
- How do you handle non-determinism in LLM evaluations?
- A safety eval passes at 99%. Is the feature safe to launch?
Python Developer Recommended 47
- Most asked Explain generators in Python.
- Most asked Explain decorators in Python.
- Most asked Explain context managers in Python.
- Most asked Explain GIL in Python.
- Most asked Backend Python interview: explain N+1 queries.
- Most asked Backend Python interview: explain SQL injection prevention.
- Most asked Explain LEGB scoping in Python.
- Most asked Explain *args and **kwargs in Python.
- Most asked Explain list/dict/set comprehensions in Python.
- Most asked Explain dataclasses in Python.
- Most asked Explain dunder methods in Python.
- Most asked Explain structural pattern matching (`match`/`case`).
- Most asked Walk through the request/response lifecycle in Django, and explain why middleware order matters.
- Most asked Explain MRO / C3 in Python.
- Explain __name__ == '__main__' in Python.
- Python packaging: virtualenv why?
- Backend Python interview: explain REST API design.
- Backend Python interview: explain migrations.
- How does asyncio work internally: event loop, coroutines, tasks and futures?
- Explain typing / type hints in Python.
- Explain exceptions hierarchy in Python.
- Python packaging: dependency pinning?
- Backend Python interview: explain FastAPI / Starlette.
- Backend Python interview: explain connection pooling.
- Backend Python interview: explain caching strategies.
- Backend Python interview: explain JWT pitfalls.
- Backend Python interview: explain idempotent APIs.
- Backend Python interview: explain background jobs.
- Backend Python interview: explain observability.
- Backend Python interview: explain 12-factor config.
- How do cancellation and timeouts work in asyncio?
- How does CPython manage memory?
- Explain slots in Python.
- Explain ABC / Protocol in Python.
- Explain property / descriptor in Python.
- Python packaging: semantic versioning?
- Python packaging: editable installs?
- Python packaging: entry points / scripts?
- Backend Python interview: explain rate limiting.
- How do you handle dates and time zones correctly in Python?
- How do `functools.cache`, `lru_cache` and `cached_property` work, and what are the pitfalls?
- How did annotation evaluation change in Python 3.14?
- How do sorting, `heapq` and `bisect` help with common algorithmic tasks?
- How do classic design patterns look in idiomatic Python?
- How do descriptors power properties, methods and ORMs?
- Python packaging: namespace packages?
- How does Python's garbage collection work?
Data Structures Recommended 50
- Most asked Explain a list and its typical time complexities.
- Most asked Explain a dict and its typical time complexities.
- Most asked Explain a set and its typical time complexities.
- Most asked Explain a hash table and its typical time complexities.
- Most asked Describe BFS and when you would use it.
- Most asked Describe DFS and when you would use it.
- Most asked Describe binary search and when you would use it.
- Most asked Describe two pointers and when you would use it.
- Most asked Describe sliding window and when you would use it.
- Most asked Describe dynamic programming and when you would use it.
- Most asked Describe LRU cache design and when you would use it.
- Most asked Explain a deque and its typical time complexities.
- Most asked Explain a heapq / priority queue and its typical time complexities.
- Explain a tuple and its typical time complexities.
- Explain a BST and its typical time complexities.
- Explain a graph (adjacency list) and its typical time complexities.
- Explain a stack and its typical time complexities.
- Explain a queue and its typical time complexities.
- Explain a linked list and its typical time complexities.
- Explain a binary tree and its typical time complexities.
- Explain a trie and its typical time complexities.
- Explain a union-find (DSU) and its typical time complexities.
- Describe prefix sums and when you would use it.
- Describe sorting: quicksort and when you would use it.
- Describe sorting: mergesort and when you would use it.
- Describe Dijkstra and when you would use it.
- Describe topological sort and when you would use it.
- Describe greedy algorithms and when you would use it.
- Describe backtracking and when you would use it.
- Describe Kadane's algorithm and when you would use it.
- Describe detect cycle in linked list and when you would use it.
- Amortized analysis?
- Best/average/worst case?
- In Python DSA interviews, explain: __hash__ and __eq__.
- In Python DSA interviews, explain: generators and memory.
- Explain a frozenset and its typical time complexities.
- Explain a AVL / red-black tree and its typical time complexities.
- Explain a graph (adjacency matrix) and its typical time complexities.
- Explain a bloom filter and its typical time complexities.
- Explain a segment tree and its typical time complexities.
- Describe sorting: heapsort and when you would use it.
- Describe Bellman-Ford and when you would use it.
- Describe KMP / string matching and when you would use it.
- Describe serialize binary tree and when you would use it.
- In-place algorithm?
- In Python DSA interviews, explain: dict insertion order.
- In Python DSA interviews, explain: list comprehension cost.
- In Python DSA interviews, explain: bisect module.
- In Python DSA interviews, explain: setdefault / Counter.
- Explain the time complexity of common dictionary operations in Python.
Algorithms Recommended 28
- Most asked Explain the sliding window pattern.
- Most asked Detect a cycle in a linked list—how?
- Most asked Reverse a singly linked list iteratively.
- Most asked How does Dijkstra work at a high level?
- Most asked Topological sort—requirements and uses?
- Most asked Name five high-frequency coding patterns.
- Most asked LRU cache—data structures?
- BFS uses which structure and why?
- Min-heap operations complexity?
- Inorder traversal of a BST yields what?
- Lowest common ancestor in a binary tree (not BST)?
- Detect a cycle in a directed graph?
- Does recursion use extra space?
- How do prefix sums help?
- Kadane's algorithm solves what?
- Find the middle of a linked list in one pass.
- Merge two sorted linked lists—approach?
- k-th smallest in a BST?
- Binary search bug that causes infinite loops?
- Search in a rotated sorted array—key idea?
- Classic recurrence for Fibonacci and its DP cost?
- Longest common subsequence—complexity of standard DP?
- Edit distance measures what?
- House Robber intuition?
- Grid unique paths DP state?
- Serialize and deserialize a binary tree—common approach?
- Is Python's sorted stable?
- Name a probabilistic alternative to exact set membership.
Data Engineering Recommended 9
- Most asked Explain slowly changing dimensions, especially Type 1 and Type 2.
- Most asked How do you handle late-arriving data in a daily batch pipeline?
- Most asked Data warehouse, data lake or lakehouse: what is the difference?
- Most asked How do you handle personal data (PII) in a data warehouse?
- How do partitioning and clustering improve warehouse performance and cost?
- How does a dbt incremental model work, and what are its pitfalls?
- How do you handle schema changes from source systems?
- How do you test a data pipeline before deploying changes?
- How do Kafka and stream processors fit into data pipelines?
Behavioral & STAR Recommended 8
- Most asked Describe a disagreement you had with a coworker and how you resolved it.
- Most asked Describe a mistake that had a significant impact and how you handled it.
- Most asked Describe a project you owned from start to finish.
- Describe a situation where you had to make a decision without all the information you wanted.
- Describe how you decide what to work on when everything feels urgent.
- Describe how you handle working on something without a clear owner.
- Describe your approach to onboarding a new team member.
- Describe how you typically respond to criticism.