AI Interview Questions
Commonly asked AI fundamentals interview questions with clear, practical answers.
A curated set of foundational AI interview questions — the kind used to check whether a candidate actually understands the field's basic vocabulary before diving into specific techniques.
Fundamentals
Q: What's the difference between AI, machine learning, deep learning, and an LLM? They're nested subsets, not four separate things. AI is the overall field of building systems that behave intelligently, by any method — including hand-written rules. Machine learning is the subset of AI where the system learns patterns from data instead of following explicit rules. Deep learning is the subset of ML that uses multi-layer neural networks, which can learn useful features directly from raw data. An LLM is a specific application of deep learning — a transformer network trained on massive text data to predict the next token, which produces a general-purpose language system.
Q: What's the difference between supervised and unsupervised learning, conceptually? Supervised learning trains on labeled examples — each input comes with the correct answer (for example, emails labeled spam/not-spam), and the model learns to map inputs to those known outputs. Unsupervised learning has no labels; the algorithm looks for structure in the data itself, like grouping similar customers together, without anyone telling it what the "right" groups are in advance.
Q: When would you explicitly choose NOT to use deep learning? When the dataset is small and tabular (a few thousand rows, a few dozen meaningful columns) — a gradient-boosted tree or linear model will usually match or beat it with far less data, tuning, and compute. When you need the decision to be interpretable — a regulator or customer asking "why was I denied?" needs an answer a linear model or shallow tree can give directly, which a deep network's millions of weights cannot. And when latency or resource constraints rule out running a large model at all, such as on constrained edge hardware.
Q: Give an example each of a classification, regression, clustering, and generation problem. Classification: is this transaction fraudulent (yes/no)? Regression: what will this house sell for (a number)? Clustering: group these customers into behaviorally similar segments (no predefined labels). Generation: write a paragraph summarizing this document (new content, not a label or a number).
Q: Is a rule-based expert system "AI"? Yes. AI is defined by the goal (behavior that looks intelligent), not the method. A rules engine encoding a human expert's explicit logic is a legitimate, and historically foundational, branch of AI — it simply isn't machine learning, because nothing in it is learned from data.
History and classical AI
Q: What caused the "AI winters," and why does that history matter for evaluating AI hype today? Both major AI winters (roughly 1974–1980 and 1987–1993) followed periods where funders and the public were promised capabilities — general machine translation, human-level expert reasoning — that the technology of the time couldn't actually deliver, and funding collapsed hard once that gap became obvious. The pattern matters beyond history trivia: it's a concrete precedent for treating bold capability claims skeptically until they're demonstrated, since the field has been through this exact hype-to-disappointment cycle more than once before.
Q: What's the difference between A search and minimax, and when would you use each?* Both are classical search algorithms, but they solve different shapes of problem. A* finds the cheapest path through a state space toward a single, fixed goal, guided by a heuristic estimate of remaining cost — it's the right tool for pathfinding and puzzle-solving, where there's no adversary. Minimax is for two-player adversarial games, where an opponent is actively trying to produce the worst outcome for you — it assumes optimal opposition and picks the move that's best for you under that assumption, which A* has no mechanism for at all.
Q: Is search-based AI (like A or minimax) still relevant, or has it been replaced by machine learning?* Still very relevant — it was never really replaced, it was combined with learning where combining them helps. AlphaGo paired deep neural networks with tree search rather than relying on either alone; route planners, robotics motion planning, and many game engines still run classical, unmodified search algorithms in production, because the problems they solve have exactly the well-defined states, actions, and goals search algorithms are built for.
Ethics and fairness
Q: How can a model be biased against a group even if that group's protected attribute (race, gender, etc.) was deliberately excluded from the training data? Through proxy variables — features that correlate strongly enough with the excluded attribute that the model can reconstruct its effect indirectly. Zip code can correlate with race; college attended or specific phrasing on a resume can correlate with gender. Amazon's scrapped internal recruiting tool is a documented real example: it learned to penalize resumes containing "women's" (as in "women's chess club"), despite gender never being an explicit input.
Q: Why can't a model satisfy every reasonable definition of "fairness" at once? Because several intuitively reasonable fairness definitions — for example, equal selection rates across groups (demographic parity) versus equal error rates across groups (equalized odds) — are mathematically incompatible whenever the true base rate of the outcome differs between groups, which is common in real-world data. This is exactly the disagreement underlying the well-known COMPAS controversy: defenders and critics of the tool were each correctly citing a different, legitimate fairness metric that the tool satisfied or failed. Building a fair system means explicitly choosing (and documenting) which definition matters most for a given use case, not satisfying a single universal standard.