Complete Interview Questions — Gen AI, ML, MLOps, AiOps, LLM
8 min readJust now

A. Introduction / Behavioral / Career
- Self-introduction and brief of your recent/current project.
- Why are you looking for a job change?
- What kind of role are you looking for here?
- What are your roles and responsibilities in your current organization? (As a tech lead, what are your responsibilities?)
- How much are you contributing to Data Science projects in your current organization?
- Talk about all the stages/tasks you perform from receiving a new project idea from a client till delivering the full-fledged product.
- How will you handle it if a critical resource from your team decides to move out of the organization?
- Will you be able to work over weekends if needed? Will you be able to convince your teammates for the same?
- Will you be able to join office in person 5 days a week?
- How many people report to you currently, and how do you resolve their blockers/challenges?
B. Classical ML, Stats & Feature Engineering
- Explain a conventional data science project in detail, with follow-ups on EDA and pre-processing.
- Why does an imbalanced dataset need to be handled, and what techniques are available (down-sampling, oversampling, SMOTE)? How does SMOTE work internally?
- Evaluation metrics for classification models — confusion matrix, precision, recall, ROC curve, PR curve — and how to choose the right metric.
- Evaluation metrics for regression models.
- Bias-variance tradeoff.
- What is regularization? Explain L1 vs L2.
- What is a cost function? Why is it needed? Give examples.
- Explain various feature selection techniques.
- What are ensemble techniques? How is boosting different from bagging? How are bootstrap and aggregation achieved in bagging?
- Explain the working of Random Forest, its hyperparameters, why it’s better than other algorithms, and when you might avoid it.
- What is out-of-bag error?
- What is PCA? Explain the mathematical intuition, eigenvectors and eigenvalues.
- After applying PCA, how do you explain to a client which features are driving predictions?
- What is the curse of dimensionality?
- How do you handle a categorical column with thousands of categories (e.g., town/district)?
- How do you identify and handle outliers? What’s the right sequence — outliers first or missing values first?
- How do you decide which encoder best suits a given feature?
- How do you handle missing values?
- How do you shortlist which ML model to try before training?
- How do you decide which evaluation metric to use?
- How do you monitor model performance in production? What is model drift, and how do you mitigate it?
- What are unsupervised ML algorithms? What’s the main drawback of unsupervised learning? Explain the functioning of one such algorithm.
- Besides the elbow method, what other approaches exist to choose the best value of k in k-means clustering?
- If you’ve trained two classification models on the same dataset, how do you compare their performance without using confusion-matrix-based metrics?
- How do you handle an unstable feature?
- What’s the difference between covariance and correlation?
- What is collinearity?
- What is cosine similarity? Its mathematical background (be ready to derive/draw it)? Difference between cosine similarity and Euclidean distance.
- What is p-value? Where is it used?
- How would you prove the average height of men is greater than that of women? How would you collect sample data?
- How would you pick one “interesting” number from 1000 numbers, and justify the choice?
- Explain the mathematical intuition behind any ML model of your choice (e.g., SVC/SVM), including drawbacks and advantages.
- Statistical terms to know: z-test, t-test, concordance index, gain chart, lift chart, Dunn index, Silhouette score, winsorization.
- 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?
- 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.
- What problems did you face during LLM-based application training/development and after production deployment? (crosses into GenAI too)
C. GenAI / LLM Fundamentals
- Explain any GenAI project you’ve worked on (architecture, tech stack, business impact).
- Explain RAG architecture in detail — components, how queries get answered, options available at each stage.
- How do you evaluate a RAG-based solution?
- How did you evaluate an NLP2SQL solution — which metrics, and how did you communicate results to build client trust?
- Explain transformer architecture at a high level.
- What is multi-head attention, and why is it needed?
- What is positional encoding? Why is it needed for transformers, and how do RNNs manage without it? What techniques exist for positional encoding?
- Difference between encoder and decoder models, with examples. Name some encoder/decoder-based models and the use cases they suit best.
- Difference between RNN and LSTM. How is a transformer different from RNN/LSTM?
- Are LLMs bad at classification tasks? Why or why not?
- How do you choose between RAG and fine-tuning?
- Difference between classical ML, DL, GenAI, and Agentic AI — core features of each.
- Difference between pre-training, fine-tuning, and RAG.
- Do you have experience with fine-tuning techniques for LLMs? Explain one in detail (e.g., LoRA intuition).
- What is hallucination? How do you reduce/control it in production?
- What is context window overflow, and how do you solve it?
- What is the stale context problem, and how can it be solved?
- Can you build an AI app without calling LLM APIs directly?
- What is prompt injection? How do you deal with it?
- What factors determine the success criteria for an AI application?
- How do you check whether LLM output is biased?
- How do you force an LLM to output a response in a particular format?
- How do you perform data validation for GenAI pipelines?
- Explain different chunking strategies. What is semantic chunking? How do you choose the best approach for a use case?
- What is semantic search?
- Why can’t embeddings be stored in a conventional database?
- 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?
- How are best-matching chunks retrieved from a vector DB?
- What is reranking? How does it work, and what’s the trade-off?
- What is self-attention, and how is it calculated?
- What is bag of words? How do you decide the n-gram value?
- If your LLM API cost suddenly increases with no code change, how would you debug it? What factors could contribute?
- How can you control the reasoning capability of an LLM?
- What are best practices for writing a prompt?
- How can you reduce latency of LLM responses? What techniques have you used?
- How can you reduce GenAI solution cost without impacting output quality (same model version)?
- How do you choose between an LLM vs ML/DL model for a given problem?
- How were guardrails implemented to restrict unethical, harmful, or out-of-scope queries?
- How do you ensure product quality with every commit (unit tests, evaluations for agents)?
- Which part of the code would you revisit to maintain/improve quality after upgrading to a newer LLM version?
- Why build a solution from scratch instead of using a pre-built option like Vertex AI’s Data Agent?
- Do you have experience preparing architecture documents for a project? Walk through one.
D. Agentic AI / LangGraph / ADK
- Give a brief of your recent agentic projects and their high-level tech stack.
- Explain your LangGraph project in detail.
- How are agents and tools structured in LangGraph? How do you verify the executed flow works as expected?
- What is a state-graph? What is a sub-state-graph?
- How does a router agent decide the sequence in which sub-agents are called?
- How do you check which agent flow got executed while generating a response?
- How many agents were in your solution, and how were they interconnected/orchestrated?
- How is a supervisor-worker structure achieved with ADK agents? How are sub-agents created and invoked using Google ADK?
- What role does middleware play, and why is it important? How was it implemented in your project?
- How do you ensure final answers are grounded and not made up by the LLM (not hallucinated), and sourced only from internal data?
- 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)?
- How was the connection to the data source made, and how did you ensure the data source wasn’t compromised?
- How many tools existed in the overall solution, and how was tool-calling managed for agents?
- Do you have experience with APIs? How did you create/call your backend APIs?
- How would you set up a RAG solution if the internal information is in the form of images?
- How are you testing/evaluating your agentic solution (unit tests, integration testing, response evaluation, manual QA)?
- What challenges did you face after business users started using your solution, and how did you address them?
- How do you handle a RAG solution that gives wrong answers confidently?
- How does your system respond when it has no relevant data in the corpus for a query?
- 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
- Which cloud services/infrastructure have you worked with?
- Explain the complete CI/CD pipeline for your GCP project (version control, Docker, Jenkins, Secret Manager, GKE).
- Questions on deployment best practices.
- How did you create workloads and other resources required for deployment?
- Have you created a Docker image from scratch? What are the important components/configurations in a Dockerfile?
- How do you deploy a new code version to GKE across dev/QA/prod environments?
- How do you monitor deployment logs and troubleshoot deployment issues?
- How do you configure ingress and routing paths for your application?
- What Vertex AI services have you used — give a brief of each?
- Explain the architecture of one of your GCP projects along with the tech stack.
- How did you set up RAG Engine in Vertex AI?
- Why didn’t you use Vertex AI’s GenAI observability/traceability/evaluation features initially? How would you integrate them now?
- Where were your agents deployed, and how did you add observability to your agentic solution?
- How is traceability achieved in your solution?
- Which databases have you worked with?
- Before making a request to a server, how do you check if it has enough available resources to handle it?
- How would you write UI-entered data to a database, maintain uniqueness of records, and mask/encode sensitive information?
- 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
- Difference between list, tuple, and set as data structures.
- Difference between deep copy and shallow copy.
- What are
collectionsandCounter, and where are they used? - Difference between
*argsand**kwargs. - Which libraries would you use to analyze raw data?
- How is Seaborn different from Matplotlib?
- What are best practices for writing Python code?
- Predict the output of given code snippets (e.g., list comprehension over concatenated lists).
- Write a Python program to find a pair of elements from a list whose sum equals k.
- Write a program to find pairs of indices from a sorted list whose element sum equals a target — then optimize to O(n).
- 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]. - Write a program to return the frequency of each character in a given text.
- Write a program to subtract two numbers involving fractions, assuming the compiler doesn’t understand fractions natively.
AI
Genai
Mlops
LLM
Written by Ritesh Sinha
👋 Hi, I’m Ritesh Sinha Generative AI Engineer | AI Content Creator | Helping people decode the future of artificial intelligence.


