Menu

AI & Machine Learning Topic

AI and ML Interview Questions: Clear Answers for Beginners

Practise the idea, then explain it in your own words. These are learning questions, not a prediction of every job interview. A clear small example is better than a list of terms you cannot explain.

How to use this guide

Give a short answer, add a practical example and mention a limitation. Be honest about work experience and lab experience. Ask a clarifying question when the task is unclear.

1. How are AI, machine learning and deep learning related?

AI is the broad field of systems doing tasks such as recognition, planning or language generation. Machine learning learns patterns from examples. Deep learning is a machine-learning approach using neural networks with many layers.

Example to discuss: Explain where the small flower classifier fits. A model does not need to think like a person to make a useful prediction.

2. What are the main types of machine learning?

Supervised learning uses input and answer pairs. Unsupervised learning explores patterns without a target label. Reinforcement learning learns a policy using rewards from interaction.

Example to discuss: Classifying labelled emails is supervised learning. Grouping unlabelled measurements is a different task.

3. How do classification and regression differ?

Classification predicts a class. Regression predicts a number. Choose the task from the result you need, then choose a suitable metric.

Example to discuss: Spam or not spam is classification. Predicting delivery minutes is regression.

4. What are overfitting and underfitting?

Overfitting means fitting training details that do not help on new data. Underfitting means the model misses useful structure. Compare training and validation behaviour before choosing a remedy.

Example to discuss: More training can worsen overfitting. More features can add noise rather than fix underfitting.

5. Why use cross-validation?

It checks a training process across several held-out folds. It helps compare choices without relying on one convenient split. The folds still need to respect time, groups and related records.

Example to discuss: Fit preparation steps inside each fold using a pipeline. Keep a separate final test where appropriate.

6. What is the bias-variance trade-off?

Bias describes error from restrictive assumptions. Variance describes sensitivity to the particular training sample. The balance is a useful way to think about generalisation, but complexity does not create the same curve for every model.

Example to discuss: Compare a very shallow tree with a highly flexible one on separate validation data.

7. What do precision and recall mean?

Precision asks how many positive predictions are correct. Recall asks how many actual positives are found. A confusion matrix shows the counts of correct and confused classes.

Example to discuss: For a fault detector, discuss the cost of a missed fault and an unnecessary inspection before choosing a threshold.

8. How do L1 and L2 regularisation differ?

L1 penalises absolute coefficient values and can make some coefficients zero. L2 penalises squared values and usually shrinks coefficients more smoothly. Feature scaling and the model formulation matter.

Example to discuss: Choose the strength with validation rather than assuming one always gives better results.

9. What is gradient descent?

It updates parameters using gradients of the loss. The learning rate controls the step size. Small steps are not a guarantee of the best solution.

Example to discuss: Explain a training step: prediction, loss, gradients and parameter update.

10. How do bagging and boosting differ?

Bagging fits models on resampled data and combines their predictions. Boosting adds models in stages to improve an objective. Their behaviour depends on the method and settings.

Example to discuss: Random forests are a bagging-related tree ensemble. Gradient boosting is a different staged approach; neither is immune to overfitting.

11. How do you handle missing data?

First understand why values are missing. Choose a suitable policy such as a training-set median, an explicit category or excluding unusable rows. Measure the effect.

Example to discuss: A missing purchase amount is not automatically zero. Fit the imputer only on training data.

12. What is feature engineering?

It creates or transforms inputs to make useful information available to a model. A feature must be available when the prediction is made.

Example to discuss: Account age at prediction time may be valid. A later refund status can leak future information.

13. What is one-hot encoding?

It represents categories using indicator columns. It avoids inventing a numeric order for names. Plan how new and missing categories will be handled.

Example to discuss: Red, green and blue are usually names, not a ranking of one, two and three.

14. Why keep test data separate?

It checks how the chosen process behaves on examples not used for fitting or repeated selection. A split does not itself prevent overfitting or guarantee realistic evaluation.

Example to discuss: Keep related rows together and avoid using the test score for every tuning decision.

15. Why use activation functions?

Non-linear activations let a network represent more than a chain of linear mappings. Different activations have different behaviour.

Example to discuss: ReLU is useful in many networks but does not solve every gradient problem. Output activation and loss must match the task.

16. What is transfer learning?

It reuses a model or representation learned on another task. You may freeze part of it or fine-tune it. Check whether its data, licence and capabilities fit the new task.

Example to discuss: A pretrained image model may help with a related image task, but its score still needs independent evaluation.

17. What is a CNN?

A convolutional neural network applies shared learned filters over local regions. It is useful for many image and other structured-data tasks.

Example to discuss: A filter can detect a local pattern at several positions. The full model is not automatically invariant to every translation.

18. What is NLP?

Natural language processing works with human language. Tasks include classification, retrieval, extraction and generation. Each needs its own quality checks.

Example to discuss: A positive-word count can miss negation. Test phrases such as not a good lesson.

19. How do you evaluate unsupervised learning?

Use checks that match the task, such as cluster stability, distance-based measures and review of representative examples. No single score proves that groups have a useful real meaning.

Example to discuss: K-means returns groups even when your chosen number of groups is not meaningful.

20. How do you start a new ML problem?

Define the decision, useful outcome and cost of mistakes. Check data quality and availability. Build a simple baseline, design an honest evaluation and only then add complexity.

Example to discuss: Ask whether a rule or ordinary software could solve the problem without a learned model.

21. How do you explain a model to someone without an ML background?

Start with what it helps them do. Show one example, explain a common mistake and say what the result cannot guarantee.

Example to discuss: A confidence score is not certainty. Discuss review and recovery for important decisions.

22. Which metrics help with imbalanced classes?

Inspect precision, recall, per-class results and the precision-recall curve along with a suitable baseline. Choose from the cost of mistakes and the deployment setting.

Example to discuss: A 99% accuracy score can be useless if one percent of cases are faults and every fault is missed.

Prepare one project you understand

Work through the flower classifier, evaluation example and local API. Explain where the data comes from, how you split it, what failed and what you would improve before release. For modern AI applications, also review RAG and the agent lessons.

Official references

Reviewed on 25 October 2026. Use documentation for your installed versions.

All AI & Machine Learning tutorials

Comments (0)

No comments yet. Be the first to comment!

LecturreAI Assistant

Hello! I'm LecturreAI

What would you like to learn today?