Most AI ML interview questions for freshers are not trick questions. Interviewers want to see that you understand the basics (how a model learns, how you know it is any good, how you prepare data) and that you can explain one project you built yourself in plain words. This guide covers 60 commonly asked questions for entry-level AI, machine learning and GenAI roles, from supervised learning and precision/recall to tokens, embeddings and RAG. Each answer is written the way a calm, well-prepared fresher could say it in an interview.
How to use this guide
- Fundamentals: interviewers check vocabulary and intuition. Can you explain overfitting with an example, not just a definition?
- Intermediate: they check whether you know why. Why three data splits, why F1 instead of accuracy, why scale features?
- Practical and coding: short Python, NumPy, pandas and scikit-learn tasks. Type the snippets yourself; do not just read them.
- Simple scenarios: a small real-world problem. Answer in the order "understand the problem, check the data, pick a simple baseline, measure, improve".
After reading an answer, close the page and say it aloud in your own words, using your own project as the example. Interviewers notice memorised lines very quickly.
Contents
- AI, ML, deep learning and GenAI basics (Q1–Q7)
- Supervised and unsupervised learning, overfitting and metrics (Q8–Q18)
- Data preparation basics (Q19–Q23)
- Python, NumPy and pandas basics (Q24–Q30)
- Neural network basics (Q31–Q36)
- LLM basics: tokens, prompts, embeddings and RAG (Q37–Q43)
- AI ethics basics (Q44–Q47)
- Project and portfolio questions (Q48–Q51)
- HR-style AI questions (Q52–Q54)
- Simple scenarios (Q55–Q60)
- How freshers should prepare
- Key takeaways
- Interview preparation checklist
- FAQ
AI, ML, deep learning and GenAI basics
1. What is the difference between AI, machine learning, deep learning and generative AI?
Answer: They are nested circles. Artificial intelligence is the broad goal of making computers do tasks that normally need human intelligence. Machine learning is a part of AI where the system learns patterns from data instead of following hand-written rules. Deep learning is a part of ML that uses neural networks with many layers, which works well for images, audio and text. Generative AI uses (mostly deep learning) models to create new content such as text, images or code, rather than only predicting a label. A spam filter is ML; a model that writes a reply to the email is generative AI.
Interview tip: If asked about agentic AI too, add one line: an agent uses a model to plan and call tools to complete a task. Our explainer on AI vs generative AI vs agentic AI has a clean comparison you can borrow.
2. What are the main types of machine learning?
Answer: Three classic types, plus one that matters for modern AI. Supervised learning learns from labelled examples (emails marked spam or not spam). Unsupervised learning finds structure in unlabelled data (grouping customers by behaviour). Reinforcement learning learns by trial and error from rewards (a game-playing agent). Self-supervised learning creates its own labels from raw data, for example hiding the next word in a sentence and learning to predict it. Large language models are pre-trained mostly this way.
3. What is a "model", and what is the difference between training and inference?
Answer: A model is a mathematical function with adjustable numbers (parameters) that maps inputs to outputs. Training is the phase where we show the model data and adjust its parameters to reduce error. Inference is using the trained model to make predictions on new data. Training is usually done once or periodically and can be expensive; inference happens every time a user sends a request, so it must be fast and cheap enough to run at scale.
Real-world example: A loan-default model may be retrained monthly on new repayment data, but inference runs every time a customer applies.
4. What is the difference between parameters and hyperparameters?
Answer: Parameters are learned from data during training, such as the weights in a linear regression or a neural network. Hyperparameters are settings you choose before training that control how learning happens, such as learning rate, number of trees in a random forest, tree depth, number of epochs or batch size. You tune hyperparameters using a validation set or cross-validation, never the test set.
5. When should you NOT use machine learning?
Answer: When a simple rule solves the problem reliably, when there is not enough relevant data, when every decision must be fully explainable and a rule can do it, or when mistakes are very costly and there is no way to review them. For example, "apply the GST rate listed for this product category" is a rule, not an ML problem. ML is useful when patterns are too complex to write by hand and you have data that represents them.
Interview tip: Freshers who say "I would start with a simple rule or baseline and only use ML if it clearly beats it" sound mature.
6. What is the difference between classical ML and deep learning in practice?
Answer: Classical ML (linear models, decision trees, random forests, gradient boosting) works very well on structured, tabular data like spreadsheets and database tables, trains fast, and is easier to explain. Deep learning shines on unstructured data such as images, audio and text, where it learns features automatically, but it usually needs more data and compute. For a bank's customer table, gradient boosting is often a strong first choice; for reading scanned cheques, a deep learning model is the natural choice.
7. What is generative AI, and how is it different from a traditional ML classifier?
Answer: A traditional classifier picks from a fixed set of answers ("fraud" or "not fraud"). A generative model produces new output, one piece at a time, such as text, images or code. Large language models (LLMs) are the most common generative models today: they are trained to predict the next token in text and, after further tuning, can follow instructions, summarise, translate and write code. Because they generate freely, they can also produce confident but wrong answers, which is why grounding and evaluation matter (see Q41 and Q42).
Supervised and unsupervised learning, overfitting and metrics
8. Explain supervised vs unsupervised learning with one example each.
Answer: In supervised learning every training example has the correct answer attached. Predicting house prices from past sales, where each record has the final price, is supervised. In unsupervised learning there is no answer column; the algorithm finds structure by itself. Grouping an e-commerce store's customers into segments based on what and how often they buy, without anyone labelling the segments, is unsupervised. A useful test: "Do I have a column I want to predict?" If yes, supervised.
9. What is the difference between classification and regression?
Answer: Both are supervised. Classification predicts a category: spam or not spam, which of five product categories, approve or reject. Regression predicts a number: price, delivery time in minutes, monthly electricity usage. Logistic regression, despite its name, is a classification algorithm because it outputs a probability that is turned into a class. Choosing the right type decides your loss function and your metrics.
10. How does k-means clustering work, in simple words?
Answer: You choose k, the number of groups. The algorithm places k centre points, assigns every data point to its nearest centre, moves each centre to the average of its assigned points, and repeats until the centres stop moving much. The result is k clusters of similar points. Limitations: you must pick k (the elbow method or silhouette score helps), it assumes roughly round clusters of similar size, and it is sensitive to feature scale, so scale features first.
11. Explain the bias–variance trade-off.
Answer: High bias means the model is too simple and misses real patterns: it underfits, doing badly on both training and test data. High variance means the model is too sensitive to the training data and learns its noise: it overfits, doing very well on training data but badly on new data. Making a model more complex usually lowers bias but raises variance. The goal is the balance that gives the lowest error on unseen data, which you tune through model complexity, regularisation and more data.
Real-world example: Predicting exam scores using only "hours slept" has high bias. A very deep decision tree that memorises every student in the class has high variance: it fails for next year's batch.
12. What is overfitting, how do you detect it and how do you handle it?
Answer: Overfitting is when a model memorises the training data instead of learning general patterns. You detect it by comparing scores: training accuracy is high but validation accuracy is clearly lower, or validation loss starts rising while training loss keeps falling. To handle it: get more or cleaner data, use a simpler model, add regularisation (L1/L2 penalties, dropout in neural networks), use cross-validation to choose settings, stop training early when validation loss stops improving, and use data augmentation for images or text. Always confirm the fix on a held-out set.
Interview tip: Mention a learning curve (training and validation score plotted against training size or epochs). Drawing it on a whiteboard shows real understanding.
13. Why do we split data into train, validation and test sets?
Answer: The training set is used to fit the model. The validation set is used to compare models and tune hyperparameters. The test set is kept aside and used once, at the end, to estimate how the model will perform on truly new data. If you tune on the test set, information leaks into your choices and the reported score becomes too optimistic. For time-based data, such as sales forecasts, split by time (train on older months, test on newer months), not randomly.
14. What is cross-validation, and when is it useful?
Answer: In k-fold cross-validation you split the training data into k parts, train on k−1 parts and validate on the remaining part, repeating so each part is used for validation once, then average the scores. It gives a more reliable estimate than a single split, which is especially useful for small datasets. Use stratified k-fold for classification so each fold keeps the same class balance, and time-series splits for time-ordered data.
15. What is a confusion matrix, and why can accuracy be misleading?
Answer: A confusion matrix for a yes/no problem has four counts: true positives (caught correctly), false positives (false alarms), false negatives (misses) and true negatives. Accuracy is the share of all predictions that are correct, and it hides the type of errors. Suppose 10 out of 1,000 card transactions are fraud. A model that always says "not fraud" is correct 990 times out of 1,000, which looks impressive, yet it catches zero fraud. On imbalanced data, always look at the confusion matrix and class-specific metrics.
16. Precision vs recall vs F1: what are they, and when does each matter?
Answer: Precision = of everything the model flagged as positive, how many were really positive. Recall = of all the real positives, how many the model caught. F1 is the harmonic mean of the two, useful when you need one number that punishes a model that is good at only one of them. Use the fraud example: 10 real frauds; the model flags 20 transactions, 8 of which are real fraud. Precision = 8/20 = 0.40. Recall = 8/10 = 0.80. F1 = 2 × 0.40 × 0.80 / (0.40 + 0.80) ≈ 0.53.
Prioritise recall when misses are costly (cancer screening, fraud): you would rather review some false alarms. Prioritise precision when false alarms are costly (blocking a genuine customer's card, sending a legal notice). Moving the decision threshold trades one against the other.
Interview tip: Do the arithmetic on paper in front of the interviewer. It is the most reliable way to show you are not just reciting.
17. What is ROC-AUC, in intuitive terms?
Answer: Most classifiers output a score, and you choose a threshold to turn it into yes or no. The ROC curve plots the true positive rate (recall) against the false positive rate for every possible threshold. AUC is the area under that curve. Intuitively, AUC is the probability that the model gives a randomly chosen positive example a higher score than a randomly chosen negative one. An AUC of 0.5 is random guessing; 1.0 is perfect ranking. AUC tells you how well the model ranks, independent of threshold. When positives are very rare, the precision-recall curve (and its average precision) is often more informative, because ROC can look good even with many false alarms.
18. Which metrics do you use for regression?
Answer: MAE (mean absolute error) is the average size of the errors, in the same units as the target, and is easy to explain ("we are off by about ₹2,000 on average" in an illustrative price model). RMSE (root mean squared error) squares errors before averaging, so it punishes large mistakes more. R² describes how much of the variation in the target the model explains compared with always predicting the mean. Pick based on the business: if big misses are dangerous, watch RMSE; if you need a simple explanation for a manager, report MAE.
Data preparation basics
19. How do you handle missing values?
Answer: First, understand why values are missing: a sensor failure, an optional form field, or a join that went wrong. Then choose: drop rows if very few are affected and missingness is random; drop a column if it is mostly empty and not important; impute with the median (numbers) or the most frequent value (categories); or use a model-based imputer. Often it helps to add a "was_missing" flag, because missingness itself can carry information. Fit the imputer on training data only, then apply it to validation and test data.
20. How do you convert categorical data into numbers?
Answer: One-hot encoding creates a 0/1 column per category; good for a small number of unordered categories like city or payment mode. Ordinal encoding maps ordered categories to numbers (low=0, medium=1, high=2); only use it when the order is real. For columns with many categories, such as product IDs, consider grouping rare values, frequency encoding or target encoding (computed carefully inside cross-validation to avoid leakage). Tree-based models are more tolerant of encoding choices than linear models.
21. Why do we scale features, and what is the difference between standardisation and normalisation?
Answer: Models that use distances or gradients (k-means, k-nearest neighbours, SVMs, linear and logistic regression with regularisation, neural networks) can be dominated by features with large ranges. Salary in rupees would overpower age in years. Standardisation rescales a feature to mean 0 and standard deviation 1. Min-max normalisation squeezes it into a range, usually 0 to 1. Tree-based models generally do not need scaling. As with imputation, fit the scaler on training data only.
22. What is data leakage? Give an example.
Answer: Data leakage is when information that would not be available at prediction time sneaks into training, making the model look far better in testing than it will be in real use. Example: predicting whether a customer will cancel a subscription, with a "cancellation_reason" column in the features. That column is only filled after the customer cancels, so the model "cheats". Another common leak: scaling or imputing on the whole dataset before splitting. Prevent it by asking "would I know this value at the moment of prediction?" for every feature, and by doing all preprocessing inside a pipeline fitted on training data.
23. How do you handle an imbalanced dataset?
Answer: Start by measuring correctly: use precision, recall, F1 or PR-AUC instead of accuracy, and use a stratified split so rare cases appear in every set. Then try, roughly in this order: class weights (most scikit-learn classifiers accept class_weight="balanced"), tuning the decision threshold, resampling the training set only (undersampling the majority class or oversampling the minority, for example with SMOTE), and collecting more examples of the rare class. Never resample the test set; it must reflect reality.
from sklearn.model_selection import train_test_split
X_tr, X_te, y_tr, y_te = train_test_split(
X, y, test_size=0.2, stratify=y,
random_state=42)
Python, NumPy and pandas basics
24. What is the difference between a list, a tuple, a set and a dictionary in Python?
Answer: A list is an ordered, changeable sequence ([1, 2, 3]). A tuple is ordered but cannot be changed after creation ((1, 2)), so it is useful for fixed records and can be a dictionary key. A set holds unique items with no order, with fast membership checks (x in s). A dictionary maps keys to values ({"name": "Asha"}) with fast lookup by key. In ML code you will see dictionaries everywhere: hyperparameter grids, JSON from APIs, and model configuration.
Interview tip: If you want a structured refresher, our guide to Python for AI engineers lists the Python features that actually show up in AI work.
25. Why is NumPy faster than plain Python loops? What is broadcasting?
Answer: NumPy stores numbers in compact, typed arrays and runs operations in optimised compiled code over the whole array at once (vectorisation), instead of interpreting a Python loop element by element. Broadcasting lets NumPy combine arrays of different but compatible shapes without copying data, for example subtracting a per-column mean from every row.
import numpy as np
X = np.array([[1.0, 200.0],
[2.0, 300.0],
[3.0, 400.0]])
# standardise each column (broadcasting)
X_std = (X - X.mean(axis=0)) / X.std(axis=0)
26. In pandas, what is the difference between loc and iloc?
Answer: loc selects by label (index labels and column names), and its slices include the end label. iloc selects by integer position, like Python lists, and excludes the end. For example, df.loc[df["city"] == "Hyderabad", ["name", "score"]] filters rows by a condition and picks columns by name, while df.iloc[0:5, 0:2] takes the first five rows and first two columns by position. Using loc for assignments also avoids the common "SettingWithCopyWarning" that comes from chained indexing.
27. You get a new CSV file. What are the first pandas commands you run?
Answer: I check its shape, types, missing values, duplicates and basic statistics before touching a model.
import pandas as pd
df = pd.read_csv("orders.csv")
print(df.shape)
df.info() # types, non-null counts
print(df.head())
print(df.isna().sum()) # missing per column
print(df.duplicated().sum())
print(df.describe()) # numeric summary
print(df["status"].value_counts())
Then I look for suspicious values: negative quantities, dates in the future, a numeric column stored as text, or a target column that is almost all one class.
28. Write pandas code to find the average order value per city, sorted highest first.
Answer: Use groupby then aggregate. Showing named aggregation earns extra credit because it produces readable column names.
summary = (
df.groupby("city")
.agg(avg_value=("order_value", "mean"),
orders=("order_id", "count"))
.sort_values("avg_value", ascending=False)
.reset_index()
)
Interview tip: Mention that you would check for missing city values first, because groupby drops NaN keys by default.
29. Write a Python function that computes precision and recall from two lists of 0/1 labels.
Answer: Count true positives, false positives and false negatives, and guard against division by zero.
def precision_recall(y_true, y_pred):
tp = fp = fn = 0
for t, p in zip(y_true, y_pred):
if p == 1 and t == 1:
tp += 1
elif p == 1 and t == 0:
fp += 1
elif p == 0 and t == 1:
fn += 1
prec = tp / (tp + fp) if tp + fp else 0.0
rec = tp / (tp + fn) if tp + fn else 0.0
return prec, rec
Then say you would use sklearn.metrics.precision_score and recall_score in real projects, and that you wrote this to show you understand the definition.
30. Show a basic scikit-learn workflow that avoids data leakage.
Answer: Put preprocessing and the model in one Pipeline, so scaling and imputation are learned only from training folds.
from sklearn.pipeline import Pipeline
from sklearn.impute import SimpleImputer
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LogisticRegression
from sklearn.model_selection import cross_val_score
pipe = Pipeline([
("impute", SimpleImputer(strategy="median")),
("scale", StandardScaler()),
("model", LogisticRegression(max_iter=1000)),
])
scores = cross_val_score(pipe, X_tr, y_tr,
cv=5, scoring="f1")
print(scores.mean())
pipe.fit(X_tr, y_tr)
print(pipe.score(X_te, y_te))
For mixed numeric and categorical columns, add a ColumnTransformer with a one-hot encoder for the categorical ones.
Neural network basics
31. What is a neuron in a neural network, and why do we need activation functions?
Answer: An artificial neuron multiplies each input by a weight, adds them up with a bias, and passes the result through an activation function. Layers of neurons stacked together form a network. Activation functions add non-linearity; without them, any number of layers would collapse into one linear function and could not learn curved patterns. Common choices: ReLU (outputs the input if positive, else zero) for hidden layers, sigmoid for a single yes/no probability, and softmax to turn several outputs into probabilities that add up to 1.
32. What is gradient descent?
Answer: Gradient descent is the method most models use to learn. The loss function measures how wrong the model is; the gradient tells us in which direction each parameter should move to increase the loss, so we move a small step the opposite way: w = w - learning_rate * gradient, and repeat. Think of walking downhill in fog by feeling the slope under your feet. Batch gradient descent uses all data per step, stochastic (SGD) uses one example, and mini-batch uses a small group (the usual choice). Optimisers like Adam adapt the step size per parameter. If the learning rate is too high, training jumps around or diverges; too low, it crawls.
33. What are backpropagation, epochs and batch size?
Answer: Backpropagation is how a neural network computes gradients efficiently: after a forward pass produces a prediction and a loss, it applies the chain rule backwards through the layers to find how much each weight contributed to the error. Gradient descent then uses those gradients to update weights. An epoch is one full pass over the training data. Batch size is how many examples are processed before one weight update. If you have 10,000 examples and a batch size of 100, one epoch is 100 updates.
34. What loss function would you use for regression and for classification?
Answer: For regression, mean squared error is the usual default (it punishes large errors more); mean absolute error is more robust to outliers. For classification, cross-entropy (log loss) is standard: binary cross-entropy for yes/no, categorical cross-entropy for many classes. Cross-entropy strongly penalises confident wrong predictions, which pushes the model to output well-calibrated probabilities. The loss is what the model optimises; the metric (accuracy, F1, MAE) is what you report to people.
35. CNN vs RNN vs Transformer: explain each in one or two lines.
Answer: CNNs (convolutional neural networks) slide small filters over an image to detect local patterns such as edges and shapes, so they suit images and video. RNNs (including LSTMs) process a sequence one step at a time, carrying a memory forward; they were widely used for text and time series but are slow to train on long sequences. Transformers use self-attention to look at all positions of a sequence in parallel, which scales well, and they power today's LLMs and much of modern vision and speech work.
36. What is "attention" in a Transformer, in plain words?
Answer: Attention lets each word (token) decide which other words in the sentence matter most for understanding it. In "The bank approved the loan because it had enough deposits", attention helps the model link "it" to "bank". Technically, each token produces a query, a key and a value; the model compares queries with keys to get weights and uses them to mix the values. Multi-head attention runs several of these in parallel so different heads can focus on different relationships.
Interview tip: Freshers are rarely asked to derive attention. A clear example sentence plus "query, key, value" is usually enough.
LLM basics: tokens, prompts, embeddings and RAG
37. What is a large language model (LLM)?
Answer: An LLM is a very large Transformer model trained on huge amounts of text to predict the next token. Through that simple task it learns grammar, facts, reasoning patterns and coding styles. It is then further tuned, for example with instruction tuning and human feedback, so it follows instructions and behaves helpfully. An LLM does not look up facts in a database; it generates the most likely continuation based on patterns it learned, which is why it can sound right while being wrong. For a fuller picture, read what an LLM is and how it works.
38. What are tokens and a context window?
Answer: LLMs do not read whole words; they read tokens, which are words or pieces of words produced by a tokenizer. "Unbelievable" may become several tokens. The context window is the maximum number of tokens the model can consider at once, including your prompt, any documents you add and its own answer. Tokens matter in practice because cloud LLM APIs usually charge per input and output token, and because anything outside the window is invisible to the model. Text in Indian languages often splits into more tokens than the same meaning in English with many tokenizers, which affects cost. See tokens and context windows explained for detail.
39. What is a prompt, a system prompt and temperature?
Answer: A prompt is the input you give the model. A system prompt is a standing instruction from the application that sets role and rules ("You are a support assistant for a college. Answer only from the provided policy text.") and usually carries more weight than the user's message. Temperature controls randomness when the model picks the next token: low values give more focused, repeatable answers (good for extraction and factual Q&A), higher values give more varied output (brainstorming). Good prompts are specific about the task, the format of the answer and what to do when information is missing.
Interview tip: Mention giving one or two examples in the prompt (few-shot prompting) and asking for structured output such as JSON when another program will read the answer.
40. What are embeddings?
Answer: An embedding is a list of numbers (a vector) that represents the meaning of a piece of text, an image or another item, produced by an embedding model. Items with similar meaning end up close together in that vector space, so "How do I reset my password?" and "I forgot my login" will be near each other even though they share few words. We measure closeness with cosine similarity or dot product. Embeddings power semantic search, recommendations, clustering, duplicate detection and the retrieval step in RAG. Our guide to embeddings explained covers how they are created and stored.
41. What is RAG, in plain words, and why does it matter?
Answer: RAG (retrieval-augmented generation) means "look it up first, then answer". Instead of relying only on what the LLM remembers, the application searches your own documents for relevant passages and gives them to the model along with the question, asking it to answer from that text. This keeps answers current, lets them use private data and makes it possible to show sources, which reduces (but does not remove) hallucinations.
Documents -> split into chunks -> embeddings
|
vector store
|
Question -> embed -> search top chunks
|
prompt = question + chunks
|
LLM -> answer with sources
Real-world example: A college help desk bot answers "What is the last date to pay the exam fee?" by retrieving the current circular, not by guessing. Building a small RAG app end to end is one of the most useful fresher projects because it touches data, embeddings, search, prompts and evaluation. Start with what RAG is, then practise with our RAG interview questions for freshers.
42. What is a hallucination, and how can you reduce it?
Answer: A hallucination is when an LLM produces information that sounds confident but is false or unsupported, such as an invented policy rule or a fake reference. It happens because the model generates likely-sounding text rather than checking facts. To reduce it: ground answers with RAG, instruct the model to say "I don't know" when the context lacks the answer, ask it to cite the passages it used, keep temperature low for factual tasks, validate structured outputs in code, and test with a set of questions where you know the right answers. See LLM hallucinations explained.
43. Prompting vs RAG vs fine-tuning: when would you use each?
Answer: Start with prompting: it is cheap and fast to change, and often enough for formatting, tone or simple tasks. Use RAG when the model needs knowledge it does not have or that changes often (company policies, product catalogues, recent documents). Use fine-tuning when you need the model to consistently follow a style, format or narrow task that prompting cannot reliably achieve, and you have good labelled examples. Fine-tuning is not the usual way to teach new facts; RAG is. Many real systems combine a good prompt with RAG and never fine-tune.
| Approach | Changes | Good for | Effort |
|---|---|---|---|
| Prompting | Instructions only | Format, tone, simple tasks | Low |
| RAG | What the model reads | Private or changing knowledge | Medium |
| Fine-tuning | The model's weights | Consistent style or narrow skill | Higher |
If you want to learn these foundations hands-on, with projects that go from a notebook to a deployed app, the APEX AI, ML, Cloud and Security program covers Python, machine learning and GenAI in one structured path, in Ameerpet or live online.
AI ethics basics
44. What is bias in an AI system, and where does it come from?
Answer: Bias here means the system treats some groups unfairly, for example approving loans less often for applicants from certain areas with the same repayment ability. It usually comes from the data: historical decisions that were already unfair, under-representation of some groups, labels created by biased processes, or features that act as proxies for sensitive attributes (a PIN code can stand in for community or income). You check for it by measuring performance and outcomes separately for different groups, not only overall. Our guide to bias and fairness testing for AI shows practical checks.
Interview tip: Note that "statistical bias" in the bias–variance sense (Q11) is a different idea. Saying so shows precision.
45. How should an AI project handle personal data?
Answer: Collect only what you need, get the right consent, protect it (access control, encryption), and avoid sending personal data such as Aadhaar numbers, phone numbers or medical details to external services unless it is allowed and necessary. Mask or remove personal identifiers before using data for training or putting it into prompts, keep logs free of sensitive values, and delete data when it is no longer needed. In India, the Digital Personal Data Protection (DPDP) Act sets obligations for how personal data is processed; freshers are not expected to know the legal detail, only the engineering habits.
46. What is explainability, and why does it matter?
Answer: Explainability means being able to say why a model made a decision. It matters when decisions affect people (credit, hiring, healthcare) and when engineers need to debug a model. Simple models such as logistic regression and small decision trees are easier to explain. For complex models, tools like feature importance, SHAP values and partial dependence plots give insight. For LLM applications, showing the source passages behind an answer is a practical form of explainability.
47. Is it okay to use AI coding assistants or ChatGPT-style tools for your work?
Answer: Yes, if you use them responsibly and follow your organisation's policy. I treat generated code like code from a stranger: I read it, run it, test it and make sure I understand it before committing. I do not paste confidential code, customer data or credentials into public tools. In interviews and assignments, I am honest about what I wrote and what a tool helped with. The skill employers value is judgement: knowing when the output is wrong.
Project and portfolio questions
48. "Explain your final-year project." How should you answer?
Answer: Use a simple, repeatable structure and keep it to about two minutes, then let the interviewer dig in.
- Problem: who has the problem and why it matters, in one sentence.
- Data: where it came from, size in plain terms, what cleaning you did.
- Approach: your baseline first, then the model you chose and why.
- Evaluation: the metric you used and why it suits the problem, plus the result on a held-out test set.
- Your part: what you personally built, especially in a team project.
- Learning: one thing that went wrong and how you fixed it, and what you would improve.
Real-world example: "We predicted which students might miss attendance thresholds so mentors could help early. We used three semesters of anonymised attendance data, started with logistic regression as a baseline, then tried a random forest. We optimised recall because missing a struggling student was worse than an extra mentor call. My part was feature engineering and the Streamlit dashboard."
Interview tip: Be ready for "why that model?", "what if you had ten times the data?" and "how would this run in production?". Never claim results you cannot reproduce.
49. What would you improve in your project if you had more time?
Answer: Give specific, honest improvements, not "use deep learning". Good answers include: collecting more data for the weak class, adding proper cross-validation, testing on data from a different time period, adding error analysis (which examples does the model get wrong, and why?), packaging the model as an API with FastAPI, containerising it with Docker, and adding monitoring for input drift. This shows you understand that a model in a notebook is not yet a working product.
50. How did you evaluate your project, and how do you know it actually works?
Answer: Explain the split (train, validation, test, or time-based), the metric and why it fits, a baseline you compared against, and an example of error analysis. For a GenAI or RAG project, describe a small test set of questions with expected answers, how you checked that answers were grounded in retrieved documents, and how you tracked failures. Saying "I had 30 hand-written test questions and checked each answer against the source" is far stronger than "it worked well when I tried it". The LLM evaluation guide explains common approaches.
51. What projects should a fresher have on GitHub for AI/ML roles?
Answer: Two or three well-finished projects beat ten half-done notebooks. A good mix: (1) one classical ML project on tabular data with clean EDA, a baseline, a pipeline and an honest evaluation; (2) one deep learning or NLP project, such as image classification or text classification; (3) one GenAI project, such as a RAG assistant over a set of public documents, exposed through a simple API or UI. Each repository should have a README with the problem, how to run it, results, limitations and screenshots. Our RAG knowledge assistant project walkthrough is a good template for the third one.
HR-style AI questions
52. Why do you want to work in AI/ML?
Answer: Connect a real experience to a real interest, and avoid "because AI is the future". For example: "During my project I enjoyed the full loop of cleaning messy data, building a model and seeing it help real users. I like problems where I can measure whether my work made something better. I want to start in a role where I can learn how models are deployed and maintained, not just trained." Then link it to the company's product or domain if you can.
53. How do you keep up with changes in AI?
Answer: Show a habit, not a list of buzzwords. Mention a few concrete practices: reading official documentation and release notes of the libraries you use, following a couple of trusted technical blogs or courses, reproducing a small example when something new appears, and writing short notes or posts about what you learned. Add one recent thing you actually tried and what you learned from it. Interviewers often follow up with "tell me about it", so only mention what you have done.
54. Tell me about a time your model or code did not work. What did you do?
Answer: Use a short STAR story (situation, task, action, result). For example: "My classifier scored very high in validation but failed on new data. I checked feature by feature and found a column that was created after the outcome, a data leak. I removed it, rebuilt the pipeline so preprocessing happened after the split, and the score dropped to a realistic level that held up on a fresh test set. Since then I check every feature for 'would I know this at prediction time?'." The lesson matters more than the failure.
Simple scenarios
55. Your model performed well in the notebook but poorly after deployment. What could be wrong?
Answer: The most likely causes are data leakage during training, a difference between training data and live data (data drift), or a difference in preprocessing between the notebook and the deployed code (training-serving skew). I would compare the live inputs with the training data before changing the model.
What I would check:
- Whether any training feature would not exist at prediction time.
- Whether the same preprocessing (imputer, scaler, encoder) is used in production, ideally the same saved pipeline.
- Distributions of key features in live data vs training data: new categories, different ranges, more missing values.
- Whether the test set was split randomly when it should have been split by time.
- How "poorly" is being measured in production, and whether labels arrive late.
Production consideration: Save the whole pipeline as one artefact, log model inputs and predictions, and monitor drift so you notice problems before users do.
56. A small retailer wants to predict which customers will stop buying, but has only a few thousand customer records. How would you start?
Answer: I would first define "stop buying" clearly with the business, for example "no purchase in the next 90 days", because the label decides everything. With a few thousand records, a simple model on well-designed features is the right start.
What I would check:
- How many customers actually churned in the past (is the data imbalanced?).
- Useful features: recency, frequency and value of purchases, returns, complaints.
- A baseline rule, such as "no purchase in 60 days", to beat.
- Logistic regression or a small tree-based model with cross-validation.
- Recall and precision at a threshold the marketing team can act on.
Production consideration: The output should be a ranked list the team can use (who to contact first), refreshed on a schedule. A model nobody acts on delivers no value.
57. A college chatbot built on an LLM gives a wrong fee deadline. How would you fix it?
Answer: The bot is probably answering from the model's general knowledge or from an outdated document. I would ground it with RAG over the current official circulars and instruct it to answer only from retrieved text, cite the source and say it is not sure when the documents do not contain the answer.
What I would check:
- Whether retrieval returned the right circular for this question.
- Whether old versions of the circular are still in the index.
- Whether the prompt tells the model to rely only on the provided context.
- A small test set of known questions and correct answers to re-run after every change.
Production consideration: Keep the document index updated when policies change, and show the source link with each answer so students can verify.
58. Your dataset has a key column with many missing values. What do you do?
Answer: I would not drop it immediately. First I would find out why values are missing and whether the missingness itself predicts the target, then decide between imputing, adding a missing-indicator flag, using a model that handles missing values natively, or dropping the column if it adds little.
What I would check:
- Is the data missing for a reason (a form field added later, a branch that never records it)?
- Does the target rate differ between rows with and without the value?
- Model performance with and without the column, using cross-validation.
- Whether missing values will also appear in live data.
Production consideration: Whatever you choose must happen the same way at prediction time; put it inside the pipeline.
59. Consider a bank whose email spam filter is moving some genuine customer emails to spam. What would you suggest?
Answer: This is a precision problem for the spam class: false positives are costly because customers' genuine messages are missed. I would raise the decision threshold for marking spam, review the misclassified emails to find patterns, and consider a "review" or quarantine folder for borderline scores instead of a hard yes/no.
What I would check:
- The confusion matrix at the current threshold.
- Precision and recall at a few different thresholds, and how much extra spam each would let through.
- What the wrongly flagged emails have in common (attachments, certain keywords, new senders).
- Whether the training data reflects the bank's actual customer emails.
Production consideration: Agree the acceptable trade-off with the business owner, and let users mark "not spam" so their feedback becomes new training data.
60. You are asked to choose between logistic regression and a deep neural network for a tabular dataset. Which do you pick?
Answer: I would start with logistic regression (and probably a gradient-boosted tree model) as baselines. On tabular data these are fast, strong and easy to explain. I would only move to a neural network if it clearly beats them on the validation set and the extra complexity is justified.
What I would check:
- Dataset size and feature types.
- Whether decisions must be explainable to customers or auditors.
- Validation scores of each model on the same splits and metric.
- Training and inference cost, and who will maintain the model.
Production consideration: The simpler model that meets the target is usually easier to deploy, monitor and debug. Interviewers like candidates who choose the least complex solution that works.
How freshers should prepare
Preparation for an entry-level AI interview works well as a cycle: learn a concept, use it in code, explain it aloud. A practical order:
- Python and data handling first. Be comfortable with lists, dictionaries, functions, NumPy arrays and pandas filtering, grouping and merging. Most fresher coding rounds stay at this level.
- Core ML with scikit-learn. Linear and logistic regression, decision trees, random forests, k-means, train/validation/test splits, cross-validation and pipelines. Practise computing precision, recall and F1 by hand.
- Neural network intuition. Neurons, activations, loss, gradient descent, backpropagation and overfitting controls. Train one small network yourself.
- LLM and GenAI basics. Tokens, prompts, embeddings, RAG and hallucinations. Build one small RAG app and test it with questions you know the answers to.
- One project you can defend deeply. Know your data, your baseline, your metric, your mistakes and your next improvements.
- Mock interviews. Practise explaining your project in two minutes and answering "why?" three times in a row.
Go deeper with our companion guides: the machine learning interview questions guide for more algorithm depth, data science interview questions for statistics and analysis rounds, prompt engineering interview questions for GenAI roles, and the AI engineer interview questions guide when you are ready for the next level.
Key takeaways
- Fresher AI/ML interviews test fundamentals and clear thinking more than advanced theory.
- Always explain concepts with a small example: fraud for precision/recall, house prices for regression, a college bot for RAG.
- Accuracy alone is rarely enough; know the confusion matrix, precision, recall, F1 and ROC-AUC.
- Data leakage, overfitting and imbalanced data are the mistakes interviewers most like to probe.
- For LLMs, understand tokens, prompts, embeddings, RAG and hallucinations in plain words.
- One well-understood project, with honest evaluation and known limitations, carries more weight than many shallow ones.
- Start simple: a rule or baseline first, then a more complex model only if it clearly helps.
Interview preparation checklist
- I can explain AI vs ML vs deep learning vs generative AI in under a minute.
- I can calculate precision, recall and F1 from a confusion matrix on paper.
- I can explain overfitting, bias–variance and data leakage with my own examples.
- I can load a CSV in pandas, check missing values, group and aggregate without searching online.
- I have written a scikit-learn pipeline with preprocessing and cross-validation.
- I can explain gradient descent, backpropagation and activation functions simply.
- I can describe tokens, embeddings and RAG and have built at least one small RAG demo.
- My GitHub has two or three finished projects with clear READMEs, results and limitations.
- I have a two-minute explanation of my final-year project and have practised follow-up questions.
- I have one STAR story about a failure or bug and what I learned.
- I know the basic ethics points: bias, personal data and responsible use of AI tools.
FAQ
What skills do freshers need for an entry-level AI or ML job?
Freshers need solid Python, NumPy and pandas, core machine learning with scikit-learn, basic statistics, an understanding of evaluation metrics, and at least one project they can explain end to end. Basic knowledge of LLMs, embeddings and RAG is increasingly useful for GenAI roles.
How should a fresher prepare for an AI ML interview?
Learn each concept, implement it in a small piece of code, then explain it aloud. Focus on Python, core ML, metrics, data preparation, neural network basics and LLM basics, and practise explaining your main project and answering follow-up questions.
Do I need a strong maths background for AI interviews as a fresher?
You need working intuition rather than proofs: basic probability and statistics, what a gradient is, and simple linear algebra such as vectors and dot products. Most fresher interviews ask you to explain ideas, not derive formulas.
Is machine learning or generative AI better for a fresher to learn first?
Learn machine learning fundamentals first, because evaluation, overfitting and data preparation also apply to GenAI systems. Then add LLM basics, prompting, embeddings and RAG, which build naturally on that foundation.
How many projects should a fresher have for AI/ML roles?
Two or three finished projects are usually enough: one classical ML project on tabular data, one deep learning or NLP project, and one GenAI project such as a small RAG assistant. Depth and honest evaluation matter more than the number of projects.
Are coding rounds common in fresher AI interviews?
Yes, many include Python, pandas or simple algorithm questions, and some ask you to write a small scikit-learn workflow. Practise writing code without autocomplete and explaining it as you go.
Can I get an AI job without a computer science degree?
Yes, many people move into AI from electronics, mechanical, statistics and other backgrounds. What matters is demonstrable skill: clean Python, solid ML fundamentals and projects you can explain and defend.
Is AI/ML a good career choice for freshers in India?
AI work is growing across product companies, services firms and global capability centres in cities such as Hyderabad and Bengaluru. It suits freshers who enjoy data, coding and continuous learning, and strong fundamentals plus real projects matter more than job titles.
What is the difference between an AI engineer and an ML engineer?
An ML engineer typically builds, trains and deploys predictive models from data, while an AI engineer often builds applications on top of models, such as LLM-based assistants with RAG and tool calling. The roles overlap, and both need software engineering and evaluation skills.
If you want guided practice that takes you from Python and ML fundamentals to GenAI projects you can show in interviews, explore the APEX program for AI, ML and cloud careers, available in our Ameerpet classroom or live online. Once you are comfortable with the basics and want to learn how AI systems are integrated and deployed for enterprise customers, the AI Forward Deployed Engineer FDE PRO program goes from AI demo to enterprise outcome, with placement support until you're placed. For a free demo session, call +91 96660 19191.


