Top List of Ultimate Gen AI Data Science ML Interview questions

Author
0

Complete Interview Questions — Gen AI, ML, MLOps, AiOps, LLM

8 min readJust now
Press enter or click to view image in full size

A. Introduction / Behavioral / Career

  1. Self-introduction and brief of your recent/current project.
  2. Why are you looking for a job change?
  3. What kind of role are you looking for here?
  4. What are your roles and responsibilities in your current organization? (As a tech lead, what are your responsibilities?)
  5. How much are you contributing to Data Science projects in your current organization?
  6. Talk about all the stages/tasks you perform from receiving a new project idea from a client till delivering the full-fledged product.
  7. How will you handle it if a critical resource from your team decides to move out of the organization?
  8. Will you be able to work over weekends if needed? Will you be able to convince your teammates for the same?
  9. Will you be able to join office in person 5 days a week?
  10. How many people report to you currently, and how do you resolve their blockers/challenges?

B. Classical ML, Stats & Feature Engineering

  1. Explain a conventional data science project in detail, with follow-ups on EDA and pre-processing.
  2. Why does an imbalanced dataset need to be handled, and what techniques are available (down-sampling, oversampling, SMOTE)? How does SMOTE work internally?
  3. Evaluation metrics for classification models — confusion matrix, precision, recall, ROC curve, PR curve — and how to choose the right metric.
  4. Evaluation metrics for regression models.
  5. Bias-variance tradeoff.
  6. What is regularization? Explain L1 vs L2.
  7. What is a cost function? Why is it needed? Give examples.
  8. Explain various feature selection techniques.
  9. What are ensemble techniques? How is boosting different from bagging? How are bootstrap and aggregation achieved in bagging?
  10. Explain the working of Random Forest, its hyperparameters, why it’s better than other algorithms, and when you might avoid it.
  11. What is out-of-bag error?
  12. What is PCA? Explain the mathematical intuition, eigenvectors and eigenvalues.
  13. After applying PCA, how do you explain to a client which features are driving predictions?
  14. What is the curse of dimensionality?
  15. How do you handle a categorical column with thousands of categories (e.g., town/district)?
  16. How do you identify and handle outliers? What’s the right sequence — outliers first or missing values first?
  17. How do you decide which encoder best suits a given feature?
  18. How do you handle missing values?
  19. How do you shortlist which ML model to try before training?
  20. How do you decide which evaluation metric to use?
  21. How do you monitor model performance in production? What is model drift, and how do you mitigate it?
  22. What are unsupervised ML algorithms? What’s the main drawback of unsupervised learning? Explain the functioning of one such algorithm.
  23. Besides the elbow method, what other approaches exist to choose the best value of k in k-means clustering?
  24. If you’ve trained two classification models on the same dataset, how do you compare their performance without using confusion-matrix-based metrics?
  25. How do you handle an unstable feature?
  26. What’s the difference between covariance and correlation?
  27. What is collinearity?
  28. What is cosine similarity? Its mathematical background (be ready to derive/draw it)? Difference between cosine similarity and Euclidean distance.
  29. What is p-value? Where is it used?
  30. How would you prove the average height of men is greater than that of women? How would you collect sample data?
  31. How would you pick one “interesting” number from 1000 numbers, and justify the choice?
  32. Explain the mathematical intuition behind any ML model of your choice (e.g., SVC/SVM), including drawbacks and advantages.
  33. Statistical terms to know: z-test, t-test, concordance index, gain chart, lift chart, Dunn index, Silhouette score, winsorization.
  34. Case study: Telecom churn — 1M rows, 200 columns, 60 cols with 15% missing values, 70 cols with 10% outliers. How would your end-to-end pipeline look? Which model would you use to segment the churn dataset?
  35. Case study: E-commerce dataset — design full flow to predict rating (regression) and whether to give a free sample (classification), covering EDA, preprocessing, encoding, outliers, missing values, modeling, evaluation.
  36. What problems did you face during LLM-based application training/development and after production deployment? (crosses into GenAI too)

C. GenAI / LLM Fundamentals

  1. Explain any GenAI project you’ve worked on (architecture, tech stack, business impact).
  2. Explain RAG architecture in detail — components, how queries get answered, options available at each stage.
  3. How do you evaluate a RAG-based solution?
  4. How did you evaluate an NLP2SQL solution — which metrics, and how did you communicate results to build client trust?
  5. Explain transformer architecture at a high level.
  6. What is multi-head attention, and why is it needed?
  7. What is positional encoding? Why is it needed for transformers, and how do RNNs manage without it? What techniques exist for positional encoding?
  8. Difference between encoder and decoder models, with examples. Name some encoder/decoder-based models and the use cases they suit best.
  9. Difference between RNN and LSTM. How is a transformer different from RNN/LSTM?
  10. Are LLMs bad at classification tasks? Why or why not?
  11. How do you choose between RAG and fine-tuning?
  12. Difference between classical ML, DL, GenAI, and Agentic AI — core features of each.
  13. Difference between pre-training, fine-tuning, and RAG.
  14. Do you have experience with fine-tuning techniques for LLMs? Explain one in detail (e.g., LoRA intuition).
  15. What is hallucination? How do you reduce/control it in production?
  16. What is context window overflow, and how do you solve it?
  17. What is the stale context problem, and how can it be solved?
  18. Can you build an AI app without calling LLM APIs directly?
  19. What is prompt injection? How do you deal with it?
  20. What factors determine the success criteria for an AI application?
  21. How do you check whether LLM output is biased?
  22. How do you force an LLM to output a response in a particular format?
  23. How do you perform data validation for GenAI pipelines?
  24. Explain different chunking strategies. What is semantic chunking? How do you choose the best approach for a use case?
  25. What is semantic search?
  26. Why can’t embeddings be stored in a conventional database?
  27. Why do we convert inputs into embeddings, and how are they generated for RAG? Why store them in vector DBs, and what factors decide which vector DB to use?
  28. How are best-matching chunks retrieved from a vector DB?
  29. What is reranking? How does it work, and what’s the trade-off?
  30. What is self-attention, and how is it calculated?
  31. What is bag of words? How do you decide the n-gram value?
  32. If your LLM API cost suddenly increases with no code change, how would you debug it? What factors could contribute?
  33. How can you control the reasoning capability of an LLM?
  34. What are best practices for writing a prompt?
  35. How can you reduce latency of LLM responses? What techniques have you used?
  36. How can you reduce GenAI solution cost without impacting output quality (same model version)?
  37. How do you choose between an LLM vs ML/DL model for a given problem?
  38. How were guardrails implemented to restrict unethical, harmful, or out-of-scope queries?
  39. How do you ensure product quality with every commit (unit tests, evaluations for agents)?
  40. Which part of the code would you revisit to maintain/improve quality after upgrading to a newer LLM version?
  41. Why build a solution from scratch instead of using a pre-built option like Vertex AI’s Data Agent?
  42. Do you have experience preparing architecture documents for a project? Walk through one.

D. Agentic AI / LangGraph / ADK

  1. Give a brief of your recent agentic projects and their high-level tech stack.
  2. Explain your LangGraph project in detail.
  3. How are agents and tools structured in LangGraph? How do you verify the executed flow works as expected?
  4. What is a state-graph? What is a sub-state-graph?
  5. How does a router agent decide the sequence in which sub-agents are called?
  6. How do you check which agent flow got executed while generating a response?
  7. How many agents were in your solution, and how were they interconnected/orchestrated?
  8. How is a supervisor-worker structure achieved with ADK agents? How are sub-agents created and invoked using Google ADK?
  9. What role does middleware play, and why is it important? How was it implemented in your project?
  10. How do you ensure final answers are grounded and not made up by the LLM (not hallucinated), and sourced only from internal data?
  11. For structured data, how do you ensure a generated SQL query references the right tables/columns (e.g., role of a reflector agent, AI-generated table/column definitions)?
  12. How was the connection to the data source made, and how did you ensure the data source wasn’t compromised?
  13. How many tools existed in the overall solution, and how was tool-calling managed for agents?
  14. Do you have experience with APIs? How did you create/call your backend APIs?
  15. How would you set up a RAG solution if the internal information is in the form of images?
  16. How are you testing/evaluating your agentic solution (unit tests, integration testing, response evaluation, manual QA)?
  17. What challenges did you face after business users started using your solution, and how did you address them?
  18. How do you handle a RAG solution that gives wrong answers confidently?
  19. How does your system respond when it has no relevant data in the corpus for a query?
  20. If asked to build an agentic app to create YouTube shorts for a given topic, explain the architecture and tech stack you’d use.

E. Cloud / GCP / Deployment / Databases

  1. Which cloud services/infrastructure have you worked with?
  2. Explain the complete CI/CD pipeline for your GCP project (version control, Docker, Jenkins, Secret Manager, GKE).
  3. Questions on deployment best practices.
  4. How did you create workloads and other resources required for deployment?
  5. Have you created a Docker image from scratch? What are the important components/configurations in a Dockerfile?
  6. How do you deploy a new code version to GKE across dev/QA/prod environments?
  7. How do you monitor deployment logs and troubleshoot deployment issues?
  8. How do you configure ingress and routing paths for your application?
  9. What Vertex AI services have you used — give a brief of each?
  10. Explain the architecture of one of your GCP projects along with the tech stack.
  11. How did you set up RAG Engine in Vertex AI?
  12. Why didn’t you use Vertex AI’s GenAI observability/traceability/evaluation features initially? How would you integrate them now?
  13. Where were your agents deployed, and how did you add observability to your agentic solution?
  14. How is traceability achieved in your solution?
  15. Which databases have you worked with?
  16. Before making a request to a server, how do you check if it has enough available resources to handle it?
  17. How would you write UI-entered data to a database, maintain uniqueness of records, and mask/encode sensitive information?
  18. Given 100 resumes in one PDF, how would you extract Name/phone/email for each candidate using RAG and store the info in a DB? How would you avoid duplicate entries?

F. Python & Coding Problems

  1. Difference between list, tuple, and set as data structures.
  2. Difference between deep copy and shallow copy.
  3. What are collections and Counter, and where are they used?
  4. Difference between *args and **kwargs.
  5. Which libraries would you use to analyze raw data?
  6. How is Seaborn different from Matplotlib?
  7. What are best practices for writing Python code?
  8. Predict the output of given code snippets (e.g., list comprehension over concatenated lists).
  9. Write a Python program to find a pair of elements from a list whose sum equals k.
  10. Write a program to find pairs of indices from a sorted list whose element sum equals a target — then optimize to O(n).
  11. Write a program to flatten a nested list, e.g. [1,2,[3,[4,5],6],[7,8],9,10][1,2,3,4,5,6,7,8,9,10].
  12. Write a program to return the frequency of each character in a given text.
  13. Write a program to subtract two numbers involving fractions, assuming the compiler doesn’t understand fractions natively.
Ritesh Sinha

Written by Ritesh Sinha

👋 Hi, I’m Ritesh Sinha Generative AI Engineer | AI Content Creator | Helping people decode the future of artificial intelligence.

No responses yet

Ritesh Sinha
Ritesh Sinha



Tags

Post a Comment

0Comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Ok, Go it!