Brolly AI Generative AI

Artificial Intelligence Interview Questions and Answers, From Beginner to Advanced

A broad, levelled question set covering AI fundamentals, machine learning, deep learning, LLMs, Generative AI, ethics and design scenarios, with how to prepare.

Artificial intelligence interviews usually move from definitions to judgement. Beginner questions check that you can explain AI, machine learning and deep learning clearly and describe how a model is trained and evaluated. Intermediate questions test how neural networks, transformers, large language models (LLMs) and generative models work and where they fail. Advanced questions ask you to reason about bias, privacy, safety and the design of a whole system under real constraints. A strong answer at any level follows the same pattern: define the idea in plain words, give a concrete example, state a trade-off or limitation, and say how you would test it. This guide gives 41 original practice questions with answers across seven areas, a worked comparison of a weak and a strong answer, a preparation plan by level and the mistakes that cost candidates most. For depth on a single area, follow the links to our machine learning, MLOps, Generative AI and prompt engineering interview guides.

· By Brolly AI Team · 24 min read

How to use this guide

This is a broad overview for roles that touch AI: AI or ML engineer, data scientist, Generative AI developer, AI product manager, and software engineers joining AI teams. It covers each area at the depth an interviewer typically expects before moving to specialised questions. Our other interview guides go deeper on one area each, and this guide links to them rather than repeating them.

The questions are grouped by level. Read your level in full and skim the one above it, because interviewers often push one step past your comfort zone to see how you reason.

How to use this guide
LevelTypical candidateWhat interviewers checkSections
BeginnerStudents, freshers and career switchersClear definitions, correct vocabulary, simple examplesAI fundamentals; machine learning basics
IntermediateJunior to mid-level engineers and data scientistsHow methods work, when to use them and how they failDeep learning; NLP and LLMs; Generative AI
AdvancedSenior engineers, leads and people owning AI systemsJudgement about risk, trade-offs and whole-system designEthics and safety; system design and scenarios

What interviewers are really assessing

Few interviewers want a textbook definition for its own sake. They use definitions to find out whether you understand the idea well enough to apply it. Most AI interviews probe the same handful of qualities, whatever the job title.

  • Clarity: can you explain an idea simply, without hiding behind jargon?
  • Correctness: do you avoid common misconceptions, such as treating high accuracy as proof of a good model?
  • Judgement: can you choose between approaches and explain why, including when not to use AI?
  • Evidence: do you think about how to measure whether something works?
  • Responsibility: do you notice risks to users, data and the business before being prompted?

A four-part structure for any answer

When a question is open, use a simple structure so you do not ramble or stop too early. It works for a one-minute definition and for a twenty-minute design question.

  • Define: say what the thing is in one or two plain sentences.
  • Example: give a concrete case, ideally from a project you have worked on.
  • Trade-off: name a limitation, a cost or an alternative.
  • Test: say how you would check that it works, or how you would notice that it does not.

Beginner: AI fundamentals

1. What is artificial intelligence?

Artificial intelligence is the field of building computer systems that perform tasks we associate with human intelligence, such as recognising images, understanding language, making predictions or choosing actions. Most AI in use today is narrow: each system does one kind of task. A good answer also notes that AI covers both hand-written rule systems and systems that learn from data, and that most modern AI is the second kind.

2. How do AI, machine learning and deep learning relate?

They are nested. Machine learning is a part of AI in which systems learn patterns from data instead of following only hand-written rules. Deep learning is a part of machine learning that uses neural networks with many layers. Large language models are deep learning models trained on large amounts of text. Not every AI system uses machine learning, and not every machine learning model is deep.

3. What is the difference between narrow AI and general AI?

Narrow AI performs specific tasks, such as translating text or detecting fraud, and may do them very well. General AI would mean a system that can learn and perform a wide range of intellectual tasks at a human level. Today's systems, including large language models, are broad in what they can attempt but still have clear limits in reliability, reasoning and grounding. Avoid overstating what current systems can do.

4. When would you choose hand-written rules over a learned model?

Choose rules when the logic is known, stable and must be exact, such as tax calculations or access permissions, or when you have little data. Choose a learned model when the pattern is too complex to write down, such as recognising speech, and when you have representative data to learn from. Many good systems combine both: a model makes a suggestion and rules enforce hard constraints.

5. What are the main types of machine learning?

Supervised learning learns from examples with known answers, such as emails labelled spam or not spam. Unsupervised learning finds structure without labels, such as grouping customers by behaviour. Reinforcement learning learns by trial and reward, such as a game-playing agent. Self-supervised learning creates its own training signal from the data, for example predicting the next word, and is how large language models are pre-trained.

6. What is the difference between training and inference?

Training is the process of adjusting a model's parameters using data so that it performs a task well. Inference is using the trained model to make predictions or generate output on new inputs. Training is usually done occasionally and can be expensive; inference happens every time the model is used, so its speed and cost matter for the product.

Beginner: machine learning basics

These are the ideas almost every AI interview checks. Our machine learning interview guide goes deeper on validation, leakage and metrics.

7. What are features and labels?

Features are the input information a model uses, such as the size, location and age of a house. The label is the answer the model learns to predict, such as the sale price. Choosing features well matters: a feature that is only known after the outcome, or that encodes a protected attribute, can make a model look good in testing and fail or cause harm in use.

8. Why split data into training, validation and test sets?

The training set is used to fit the model, the validation set to compare options and tune settings, and the test set to estimate performance on unseen data at the end. Keeping them separate stops you from fooling yourself: if you tune against the test set, its score no longer measures how the model will do on new data. The split should also match how the model will be used, for example by time for forecasting.

9. What are overfitting and underfitting?

Overfitting is when a model learns patterns specific to the training data, including noise, and does worse on new data. Underfitting is when the model is too simple to capture the real pattern and does poorly everywhere. This is often described as a trade-off between bias and variance. You detect both by comparing training and validation performance, and you address them with more or better data, regularisation or a different model complexity.

10. How do classification, regression and clustering differ?

Classification predicts a category, such as whether a transaction is fraudulent. Regression predicts a number, such as next month's demand. Clustering groups similar items without labels, such as customer segments. The type of problem decides the model families and the metrics you use, so frame the problem before choosing an algorithm.

11. How do you choose an evaluation metric?

Start from the cost of each kind of mistake. In fraud detection, missing fraud and blocking a genuine customer have different costs, so precision and recall matter more than accuracy. For regression, choose between absolute and squared error depending on how much large errors matter. Agree the metric before comparing models, and check results on important groups of data, not only the overall average.

12. What is gradient descent?

Gradient descent is a way of training a model by repeatedly adjusting its parameters in the direction that reduces the error, as measured by a loss function. The learning rate controls the size of each step: too large and training can become unstable, too small and it is slow. Most deep learning uses variants that work on small batches of data at a time.

Sources: scikit-learn: cross-validation; scikit-learn: model evaluation metrics. Checked 23 October 2026.

Intermediate: deep learning

13. What is a neural network, and what does an activation function do?

A neural network is a model made of layers of simple units, each computing a weighted sum of its inputs followed by an activation function. The activation function adds non-linearity; without it, a stack of layers would behave like a single linear model. Common choices include ReLU and its variants in hidden layers, with output functions chosen for the task, such as softmax for multi-class classification.

14. What is backpropagation?

Backpropagation is the method for computing how much each parameter in a network contributed to the error. It applies the chain rule from the output layer back through the network to get gradients, which an optimiser such as gradient descent then uses to update the weights. In an interview, separate the two ideas: backpropagation computes gradients, the optimiser uses them.

15. What is transfer learning, and why is it so common?

Transfer learning starts from a model already trained on a large dataset and adapts it to a new task, instead of training from scratch. It works because early layers learn general patterns, such as edges in images or word relationships in text, that are useful across tasks. It usually needs far less data and compute. Check that the original training data suits your domain and licence terms allow your use.

16. When would you use a CNN, an RNN or a transformer?

Convolutional networks suit data with local spatial structure, such as images. Recurrent networks process sequences step by step and were widely used for text and time series. Transformers use attention to relate all positions in a sequence at once, which trains efficiently in parallel and now dominates language tasks and much of vision. The right choice still depends on data size, latency limits and the problem.

17. How do you reduce overfitting in a deep network?

Common methods are more or more varied data, data augmentation, dropout, weight decay, early stopping based on validation loss and a smaller model. Start by checking the data split and labels, because apparent overfitting can be a leakage or labelling problem. Change one thing at a time and compare on the same validation set so you know which change helped.

18. What is the vanishing gradient problem?

In deep networks, gradients can shrink as they are passed back through many layers, so early layers learn very slowly or not at all. Activation functions such as ReLU, careful weight initialisation, normalisation layers and residual connections, which let information skip layers, all help. Gradients can also grow too large, which is usually handled with gradient clipping.

Intermediate: NLP and large language models

Interviews for Generative AI roles go much further than this section. See our Generative AI interview guide for tokens, attention, retrieval and evaluation in application design.

19. How has natural language processing changed over time?

Early systems used hand-written rules. Statistical methods then represented text as word counts, which ignored word order and meaning. Word embeddings represented words as vectors that captured similarity. Recurrent networks added sequence modelling, and transformers made it practical to train very large models on huge amounts of text. Today many NLP tasks start from a pre-trained language model rather than a model built for one task.

20. What is the difference between static and contextual embeddings?

A static embedding gives each word one vector regardless of context, so 'bank' has the same representation in 'river bank' and 'bank loan'. A contextual embedding, produced by a model such as a transformer, depends on the surrounding words, so the two uses get different representations. Contextual embeddings are the basis of modern language models and of many semantic search systems.

21. How is a large language model trained?

Pre-training teaches the model to predict the next token on a very large text corpus, which gives it broad language and knowledge patterns. It is then usually adapted with instruction tuning on examples of tasks and responses, and often with training based on human or AI preference judgements to make outputs more helpful and safer. Each stage changes behaviour, but none guarantees factual accuracy.

22. What is a context window, and why does it matter?

The context window is the maximum amount of text, measured in tokens, that a model can consider at once, including the prompt and its response. It limits how much material you can supply directly. Longer contexts help, but cost more and the model may still miss or misuse information placed in a long input, so retrieving only relevant passages is often better than supplying everything.

23. What do temperature and other sampling settings control?

A language model produces a probability distribution over the next token. Temperature changes how sharp that distribution is: lower values make the most likely tokens more dominant and output more consistent, higher values make it more varied. Settings such as top-p limit sampling to the most likely tokens. Choose settings for the task, such as low variation for extraction, and test the result rather than assuming a setting guarantees behaviour.

24. What is the difference between a base model and an instruction-tuned model?

A base model has been pre-trained to continue text; given a question, it may continue with more questions rather than answer. An instruction-tuned model has been further trained to follow instructions and respond in a helpful format, which is what most chat assistants use. Base models are sometimes preferred as a starting point for further fine-tuning on a specialised task.

Sources: Vaswani et al.: Attention Is All You Need. Checked 23 October 2026.

Intermediate: Generative AI

25. How do generative and discriminative models differ?

A discriminative model learns to separate classes or predict a label from input, such as deciding whether an image shows a cat. A generative model learns the patterns of the data well enough to produce new examples, such as generating an image or a paragraph. Many products combine both, for example a generator that drafts a reply and a classifier that checks it.

26. Compare GANs, VAEs and diffusion models.

A GAN trains a generator against a discriminator that tries to tell real from generated samples; it can produce sharp output but training can be unstable. A VAE learns to encode data into a compressed latent space and decode it back, which gives a structured latent space but often blurrier samples. A diffusion model learns to reverse a gradual noising process and is widely used for high-quality image generation, at the cost of more computation per sample.

27. What is retrieval-augmented generation, and when is it used?

Retrieval-augmented generation (RAG) searches a collection of documents for passages relevant to a question and supplies them to a language model as context, so the answer can use current or private information the model was not trained on. It is used for document assistants and support tools. It does not guarantee correctness: retrieval can miss evidence and the model can misread it, so evaluate both parts.

28. How do you choose between prompting, RAG and fine-tuning?

Start with prompting, because it is cheapest and fastest to change. Add retrieval when answers depend on documents that change or are private. Consider fine-tuning when you need consistent behaviour, format or style that examples in a prompt cannot achieve reliably, and you have good training examples. These approaches can be combined. Whichever you choose, compare against a simpler baseline on a fixed test set.

29. What is an AI agent, and how is it different from a chatbot?

A chatbot responds to messages. An agent uses a model to plan and take actions, such as calling tools, searching, running code or updating records, often over several steps towards a goal. That makes agents more capable and riskier: they need limited permissions, validated tool inputs, step limits and human approval for consequential actions. Many tasks are better served by a fixed workflow than a free-running agent.

Sources: Goodfellow et al.: Generative Adversarial Networks; Kingma and Welling: Auto-Encoding Variational Bayes; Ho et al.: Denoising Diffusion Probabilistic Models; Lewis et al.: Retrieval-Augmented Generation. Checked 23 October 2026.

Advanced: AI ethics, safety and security

30. What kinds of bias can enter an AI system?

Bias can come from data that under-represents some groups, labels that reflect past unfair decisions, features that act as proxies for protected attributes, and evaluation that only checks the overall average. It can also come from how the system is deployed, such as who can use it. Reduce it by examining the data, measuring performance across relevant groups, involving affected people and reviewing decisions after launch.

31. How would you explain a model's decision to a non-technical stakeholder?

Start with what the model is for and how reliable it is on similar cases, then explain the main factors behind a decision in plain language. Feature-importance methods and example-based explanations can help, but they are approximations, not a full account of the model's reasoning. Be honest about uncertainty, and offer a route to human review for decisions that affect people significantly.

32. What privacy risks arise in AI systems, and how do you reduce them?

Risks include collecting more personal data than needed, training on data without a valid basis, models revealing sensitive training data, and logs that store personal information from prompts. Reduce them by minimising data, removing or masking identifiers, controlling access, setting retention limits and checking the law that applies; in India that includes the Digital Personal Data Protection Act, 2023. Involve your privacy or legal team early.

33. What does responsible AI mean in practice?

It means managing the risks of an AI system throughout its life, not only at launch. The NIST AI Risk Management Framework organises this into four functions: govern, map, measure and manage. In practice that means clear ownership, understanding the context and who could be harmed, measuring quality and risks with tests, and having processes to respond when something goes wrong.

34. What security risks are specific to LLM applications?

LLM applications add risks such as prompt injection, where untrusted text tries to override instructions; disclosure of sensitive information through outputs; insecure handling of model output passed to other systems; and agents with more permissions than they need. The OWASP Top 10 for LLM Applications is a useful checklist. Enforce permissions in code, treat model output as untrusted input and test with adversarial cases.

35. When should a human stay in the loop?

Keep a person reviewing or approving output when mistakes are costly or hard to reverse, when decisions significantly affect people, when the model's reliability on the task is not yet measured, or when regulation requires it. Design the review so it is real: give reviewers the evidence they need and enough time, and track how often they correct the model.

Sources: NIST: AI Risk Management Framework; OWASP: Top 10 for LLM Applications. Checked 23 October 2026.

Advanced: system design and scenario questions

Design questions have no single right answer. Interviewers watch how you clarify the problem, choose a baseline, plan evaluation and handle failure. Our MLOps interview guide covers deployment, monitoring and rollback in more depth.

36. How do you decide whether a problem needs AI at all?

Ask whether the task has a pattern too complex for rules, whether you have or can get representative data, whether occasional errors are acceptable and how they would be caught, and whether a simpler solution, such as a search box, a form or a rule, would meet the need. If the answer to most of these is no, AI may add cost and risk without benefit.

37. How would you design a system to route customer support tickets?

Clarify the categories, volumes, languages and the cost of misrouting. Start with a baseline, such as keyword rules or a simple classifier trained on past tickets, and measure it on a held-out set. Consider an LLM with structured output if categories change often or labelled data is limited. Send low-confidence cases to a person, monitor accuracy by category and review a sample of routed tickets regularly.

38. How do you balance accuracy, latency and cost?

Set requirements first: the quality the task needs, the response time users will accept and the budget per request. Then measure options against all three. A smaller or cheaper model may meet the quality bar for most requests, with a larger model only for hard cases. Caching, batching non-urgent work and shortening inputs reduce cost. Re-check quality after each optimisation.

39. How would you design a course recommendation system for a learning platform?

Clarify the goal, such as course completion rather than clicks. A common design has two stages: generate candidate courses from signals such as similar learners and course content, then rank them. Handle new users and new courses, which have no history, with content-based or popularity-based fallbacks. Evaluate offline on past data, then with a controlled online experiment, and watch for feedback loops that only promote already-popular courses.

40. How would you roll out a new AI feature safely?

Agree success measures and stop conditions before launch. Release to a small group first, with monitoring of quality, errors, latency and user feedback, and a tested way to switch the feature off or revert. Give users a clear way to report problems and reach a person. Widen the release only when the measures stay within the agreed limits.

41. Tell me about an AI project you built. How should you structure the answer?

Describe the problem and why it mattered, the data and how you split it, the baseline, what you built and why, how you measured it and the result, one thing that failed and what you changed, and what you would do next. Keep it to about two minutes, then let the interviewer choose where to go deeper. Be precise about your own contribution in team projects.

Sources: Google Cloud: MLOps delivery and automation. Checked 23 October 2026.

Worked example: a weak and a strong answer

Take question 9, on overfitting. Both answers below are correct in a narrow sense, but only one shows understanding. The difference is the four-part structure: define, example, trade-off and test.

Worked example: a weak and a strong answer
Part of the answerWeak answerStrong answer
DefinitionOverfitting is when the model memorises the data.The model learns patterns specific to the training data and does worse on new data.
ExampleNoneA churn model with high training accuracy that drops sharply on next month's customers.
Trade-offNoneReducing complexity can lead to underfitting, so you look for the balance on validation data.
TestUse more data.Compare training and validation scores, check the split for leakage, then try regularisation or simpler features one at a time.

Practise a scenario out loud

Try this scenario with a timer set to fifteen minutes. A hospital wants to use AI to summarise patient discharge notes for doctors. Before proposing any model, ask who reads the summaries, what decisions they support, what an error could cost and which data may be used under the hospital's rules.

Then propose a baseline, such as a structured template filled by an LLM from the notes, and explain how you would evaluate it: doctors rating a sample against the source notes, a check for omitted medications or allergies, and a test for invented facts. Explain why a doctor must review every summary, how you would protect patient data and what you would monitor after launch. End with the limits of your design.

Which questions matter most for your role

Which questions matter most for your role
RoleFocus onGo deeper with
Fresher or studentQuestions 1 to 12, and the project question (41)Machine learning interview questions
Data scientistQuestions 7 to 18, 30 and 31Machine learning interview questions
ML or MLOps engineerQuestions 12 to 18 and 36 to 40MLOps interview questions
Generative AI developerQuestions 19 to 29 and 34Generative AI and prompt engineering interview questions
AI product managerQuestions 1 to 6, 28 to 36 and 40Generative AI interview questions

How to prepare: a four-week plan

Adjust the pace to your level. Beginners can spend longer on weeks one and two; experienced candidates can compress them and spend more time on design practice.

How to prepare: a four-week plan
WeekFocusPractice
1AI fundamentals and machine learning basicsAnswer questions 1 to 12 aloud in under a minute each; build or revisit one small model
2Deep learning, NLP and LLMsExplain questions 13 to 24 using a diagram; run a small example with a pre-trained model
3Generative AI, ethics and safetyAnswer questions 25 to 35; write a one-page risk review of one of your projects
4System design and your own projectsDo two timed design scenarios and rehearse your project story with a friend
  • Record yourself answering and listen back for jargon and vague claims.
  • Prepare two projects you can discuss in depth, including what went wrong.
  • Read five current job descriptions for your target role and add any recurring topics to your plan.

Common mistakes in AI interview answers

Common mistakes in AI interview answers
MistakeWhy it costs youBetter approach
Reciting definitions with no exampleSounds memorised; interviewers cannot tell if you understandAdd a concrete example from your own work
Overclaiming what AI can doSuggests poor judgement about reliabilityState limitations and how you would test them
Jumping to the most complex modelIgnores cost, data and maintenancePropose a baseline first, then justify extra complexity
Ignoring evaluationWithout measurement there is no evidence the system worksSay what you would measure and on which data
Forgetting users, privacy and safetyThese are now central questions, not extrasRaise risks and controls before being asked
Bluffing when you do not knowInterviewers usually notice and trust you lessSay what you do know and reason towards the rest

Questions to ask your interviewer

Good questions at the end show that you think about how AI work is done in practice. They also help you judge the team.

  • How does the team decide whether a model is good enough to release?
  • What does the data pipeline look like, and who owns data quality?
  • How are AI features monitored after launch, and what happens when one fails?
  • How much of the work is building new models versus using and adapting existing ones?
  • What would a successful first six months in this role look like?

Where to go deeper

This guide is the broad overview. For a specialised interview, use the guide for that area: the machine learning interview questions for validation, leakage and metrics; the MLOps interview questions for reproducibility, deployment and monitoring; the Generative AI interview questions for LLM application design, retrieval and evaluation; and the prompt engineering interview questions for instruction design and testing. If you are considering a certificate as part of your preparation, our guide to Generative AI with LLMs certification explains how to judge one and what evidence to pair with it.

Common questions

How many questions should I prepare for an AI interview?

Depth matters more than number. Be able to answer the questions at your level clearly with an example, explain two of your own projects in detail and work through at least two design scenarios. That covers most of what a broad AI interview asks.

Are these real company interview questions?

No. These are original practice questions covering topics commonly discussed in AI interviews. They are not a leaked or verified question bank from any employer, and interviews vary by team and role.

Do I need to know mathematics for AI interviews?

For most engineering roles you should understand the ideas behind gradients, probability and common metrics well enough to explain them. Research and some data science roles go further into derivations. Check the job description and ask the recruiter what the technical rounds cover.

How do AI interviews for freshers differ from experienced roles?

Fresher interviews focus on fundamentals, a small project and how you learn. Experienced interviews add system design, trade-offs, incidents you handled and how you worked with others. Both reward clear explanations and honest limits.

Should I mention Generative AI in a general AI interview?

Yes, if it is relevant to the role. Many interviewers now ask about large language models even for broader roles. Be ready to explain how they work, where they fail and how they compare with other approaches.

What if I cannot answer a question?

Say so briefly, then explain what you do know and how you would find out. Reasoning aloud from first principles often earns more credit than a confident guess.

Bring Us the Problem. We Will Help Define the Right Build.

Tell us what users need to do, what is slowing the business down and what a successful outcome should look like. We will help you identify the appropriate AI, software, product or training pathway.