Careers / Prep packs

Mid level

Machine Learning Engineer interview questions and prep

Mid-level ML engineers build, train, evaluate and deploy models while debugging performance issues and data problems. Interviews test both technical ML fundamentals and your ability to think about data quality, model security, and production reliability.

  • 30 questions
  • 8 skills
  • 9 labs

Open roles this pack fits

  1. AI Engineering, GrowthCfoinsights

Skills this role needs

  • Data pipeline designYou need to build robust ingestion, cleaning and labeling workflows that catch poisoning and bias before training.
  • Model training and evaluationCore skill: selecting algorithms, tuning hyperparameters, using the right metrics and avoiding overfitting.
  • Production deploymentYou ship models that serve real traffic; you need to understand A/B testing, monitoring, rollback and latency.
  • Debugging model failuresWhen accuracy drops or predictions drift, you investigate the data, model weights and inference pipeline.
  • LLM and generative AI securityModern ML roles touch LLM-based systems; you must spot prompt injection, data leakage and agent hijacking.
  • Model serving and inferenceYou need to optimize latency, handle batching, manage dependencies and secure model endpoints.
  • Data quality and validationGarbage in, garbage out: you catch distribution shifts, missing values, poisoned samples and label noise.
  • Adversarial robustness awarenessYou understand evasion attacks on classifiers and know basic defenses and testing approaches.

Labs to practise

Hands-on labs on this site that match the work in this role. They run in the browser.

Courses that help

Tutorials to read

30 interview questions

Answer in your own words first, then open what a strong answer covers. Sign in to practise with AI feedback.

  1. Walk us through how you'd design a data pipeline for a classification model in production. What quality checks would you add and why?

    What a strong answer covers
    • data ingestion and cleaning steps
    • schema validation and anomaly detection
    • handling missing values and outliers
  2. You train a model that achieves 95% accuracy on the test set but only 72% on live traffic. What would you investigate first and why?

    What a strong answer covers
    • distribution shift and train-test mismatch
    • data drift and concept drift detection
    • debugging methodology for production models
  3. Describe the difference between precision, recall and F1 score. Which would you optimize for in a fraud detection system and why?

    What a strong answer covers
    • classification metrics and trade-offs
    • business impact of false positives and negatives
    • metric selection for imbalanced datasets
  4. How would you set up an A/B test to safely roll out a new model version? What would go wrong if you skipped validation?

    What a strong answer covers
    • canary deployments and traffic splitting
    • statistical significance testing
    • rollback procedures and monitoring
  5. A document summarization model that uses RAG starts returning incorrect summaries. How would you trace whether the issue is in retrieval, the model or ingestion?

    What a strong answer covers
    • RAG pipeline debugging
    • embedding quality and retrieval ranking
    • data poisoning in knowledge bases
  6. What is data poisoning in the context of ML training? Give an example and describe how you'd detect it.

    What a strong answer covers
    • adversarial data injection
    • label corruption detection
    • robustness testing of datasets
  7. A phishing classifier gets fooled by emails with certain character encodings. What's happening and how would you improve the model?

    What a strong answer covers
    • adversarial examples and evasion
    • feature robustness and input normalization
    • defense strategies against adversarial inputs
  8. You're deploying a model that will read user documents. What security risks should you consider before going live?

    What a strong answer covers
    • indirect prompt injection via document content
    • data extraction attacks on training data
    • model fingerprinting and probing defenses
  9. Explain how you'd implement proper handling of inference outputs when those outputs might be rendered to users. What could go wrong?

    What a strong answer covers
    • output validation and schema enforcement
    • XSS via LLM-generated content
    • unsafe output sinks and rendering contexts
  10. A model's inference latency doubled overnight with no code changes. Walk through your debugging steps.

    What a strong answer covers
    • profiling inference pipeline
    • identifying bottlenecks in model serving
    • dependency and environment issues
  11. What is membership inference and why should you care about it for models trained on sensitive data?

    What a strong answer covers
    • privacy attacks on trained models
    • detecting overfitting via membership inference
    • data privacy in production ML systems
  12. You need to retrain a model with new data. How do you ensure the new training data hasn't been poisoned?

    What a strong answer covers
    • data validation before training
    • outlier detection in training sets
    • version control and reproducibility
  13. An LLM-powered agent that uses your model as a tool starts producing harmful outputs. How would you investigate where the failure came from?

    What a strong answer covers
    • tool output injection and agent hijacking
    • model behavior in multi-stage pipelines
    • debugging agentic systems
  14. Describe hyperparameter tuning. What's the risk of tuning on the test set and how do you avoid it?

    What a strong answer covers
    • train, validation and test set splitting
    • overfitting to validation data
    • proper evaluation methodology
  15. A model works well for the majority class but fails on minority classes. How would you diagnose and fix class imbalance?

    What a strong answer covers
    • imbalanced dataset challenges
    • resampling, weighting and metric selection
    • stratified cross-validation
  16. What is feature drift? How is it different from label drift and why do you need to monitor both?

    What a strong answer covers
    • concept drift and performance degradation
    • statistical monitoring of feature distributions
    • retraining triggers and schedules
  17. You're building a model serving system. How would you handle dependency conflicts and ensure reproducible inference?

    What a strong answer covers
    • containerization and environment management
    • model artifact versioning
    • dependency pinning and testing
  18. An attacker finds that adding certain noise to images fools your computer vision model. How would you make it more robust?

    What a strong answer covers
    • adversarial robustness and perturbations
    • data augmentation as defense
    • adversarial training approaches
  19. Walk through how you'd set up monitoring for a production classification model. What metrics matter most?

    What a strong answer covers
    • real-time performance monitoring
    • alert thresholds for model degradation
    • data drift and schema validation alerts
  20. You suspect a model's training data contained secrets or PII. How would you investigate and what should you do next?

    What a strong answer covers
    • training data extraction attacks
    • identifying memorization in models
    • data hygiene and privacy practices
  21. A model that ranks search results starts showing biased results for certain demographic groups. How would you detect and mitigate this?

    What a strong answer covers
    • bias detection across protected attributes
    • fairness metrics and trade-offs
    • debiasing techniques and their limits
  22. Explain the bias-variance trade-off. How do you recognize each in your model and what's the right balance for production?

    What a strong answer covers
    • underfitting vs overfitting symptoms
    • regularization techniques
    • cross-validation for model selection
  23. You're deploying a model to a new geography with different data distributions. What would you do differently?

    What a strong answer covers
    • geographic distribution shifts
    • domain adaptation and transfer learning
    • baseline evaluation in new regions
  24. An ML pipeline that runs daily fails silently and produces stale predictions. How would you add resilience?

    What a strong answer covers
    • error handling in data pipelines
    • alerting on job failures
    • graceful degradation and fallbacks
  25. You need to explain a model's prediction to a user. What interpretability approaches would you use and when?

    What a strong answer covers
    • SHAP values, LIME and feature importance
    • trade-offs between accuracy and interpretability
    • building trust in model decisions
  26. A model's inference costs are too high. Walk through optimization strategies you'd try.

    What a strong answer covers
    • model quantization and pruning
    • batch inference and caching
    • latency vs accuracy trade-offs
  27. How would you detect if someone is trying to game your recommendation model and what would you do about it?

    What a strong answer covers
    • adversarial behavior patterns
    • feedback loop gaming and manipulation
    • robust ranking and filtering strategies
  28. You inherit a model with no documentation or tests. What's your first week of work?

    What a strong answer covers
    • model auditing and reverse-engineering
    • establishing baselines and test data
    • creating reproducible evaluation
  29. A model fine-tuned on company data starts leaking training examples. How would you have prevented this?

    What a strong answer covers
    • overfitting and memorization risks
    • data sanitization and deduplication
    • differential privacy and regularization
  30. You're reviewing a colleague's model deployment checklist. What important steps would you add before they go live?

    What a strong answer covers
    • pre-deployment validation requirements
    • security review and attack surface
    • monitoring and alerting setup

A 14-day preparation plan

  1. Days 1 to 3Take AI & LLM Security Fundamentals (5626) to build a foundation in LLM risks. Work through Prompt Injection From Zero (5533) labs and reading material to understand data-level attacks on models. Focus on how poisoned data and prompt injection affect model behavior.
  2. Days 4 to 7Complete Securing AI Agents and MCP (5537) to understand model serving security, then practice adversarial and evasion labs (ai-adversarial-evasion-1, ai-training-data-extraction-1, ai-membership-inference-1). Read the agent hijacking and tool injection materials (5157, 5158, 5159, 5160, 5161) to see how deployed model
  3. Days 8 to 11Work through RAG and embedding poisoning labs (ai-rag-poisoning-1, ai-embedding-poisoning-1, ai-adversarial-document-upload-1) and read the RAG and document attack materials (5168, 5169). Practice indirect injection scenarios. Answer 10 technical questions on data pipelines, debugging and metrics.
  4. Days 12 to 14Answer remaining 20 questions covering production deployment, monitoring, bias, adversarial robustness and security. Review notes from all three courses. Prepare two short scripts: one walking through a model degradation incident, one covering a security incident in a deployed model.

These questions are SecurityElites practice material for this kind of role. They are not taken from any employer, and a real interview may differ.