Tricky Artificial Intelligence interview questions

75 questions with answers (AIE-426 to AIE-500). Try each one aloud before reading the answer.

Math & Statistics for ML

AIE-426 · Does a correlation of 0 mean two variables are unrelated?

Trap: Pearson correlation measures only linear relationships. y = x² over a symmetric range has zero correlation but perfect dependence. Use scatter plots, rank correlations or mutual information to detect non-linear relationships.

AIE-427 · Does a p-value of 0.03 mean there is a 97% chance the effect is real?

Trap: A p-value is the probability of data at least this extreme if the null hypothesis were true; it isn't the probability the hypothesis is true. Whether the effect is real also depends on prior plausibility, power and multiple testing.

AIE-428 · Does a positive test result with a 99%-accurate test for a rare disease mean you almost certainly have it?

Trap: With a prevalence of 1 in 1,000 and 1% false positives, about 10 healthy people test positive for every true case, so the chance of disease given a positive is only about 9%. Base rates matter (Bayes' theorem).

AIE-429 · Does gradient descent always find the global minimum?

Trap: Only for convex problems. Neural network losses are non-convex, so gradient descent finds local minima or saddle regions; in practice many minima generalise similarly well, and saddle points are a bigger obstacle than bad local minima.

AIE-430 · Is the mean always the best summary of a dataset?

Trap: Skewed data and outliers pull the mean away from typical values; incomes are better summarised by the median. Report distributions and robust statistics, not just averages.

AIE-431 · If a trend holds in every subgroup, must it hold for the combined data?

Trap: Simpson's paradox: a trend in each group can reverse when groups are combined because of confounding group sizes. Always consider confounders when aggregating.

AIE-432 · Does more data always fix a model with high bias?

Trap: More data reduces variance but doesn't fix a model that is too simple to capture the pattern. High bias needs more capacity, better features or a different model.

Classical Machine Learning

AIE-433 · Does a random forest with more trees overfit?

Trap: Adding trees reduces variance and doesn't cause overfitting; performance plateaus. Overfitting in forests comes from deep, unpruned trees on noisy data, which depth and leaf-size limits control.

AIE-434 · Is k-NN fast because it has no training phase?

Trap: Training is trivial, but prediction requires computing distances to all stored points, which is slow for large datasets unless approximate nearest-neighbour indexes are used.

AIE-435 · Does PCA always improve a model's accuracy?

Trap: PCA keeps directions of maximum variance, not maximum predictive power; it can discard low-variance features that matter for the target. Use it for compression or noise reduction and validate its effect.

AIE-436 · Does a high feature importance mean the feature causes the outcome?

Trap: Importance shows predictive usefulness, which can come from correlation, proxies or leakage. Causal claims need experiments or causal inference methods.

AIE-437 · Does logistic regression only work for linearly separable data?

Trap: It models a linear decision boundary in feature space but works on any data, outputting probabilities; with engineered or polynomial features it captures non-linear patterns.

AIE-438 · Does k-means always find the same clusters for the same data?

Trap: Results depend on random initialisation and can converge to different local optima. Use k-means++ and multiple restarts.

AIE-439 · Is gradient boosting always better than random forests?

Trap: Boosting often wins on accuracy after tuning, but it is more sensitive to hyperparameters and noisy labels. Random forests are robust and need little tuning.

Model Evaluation & Validation

AIE-440 · Should you always deploy the checkpoint with the lowest validation loss?

Trap: Validation loss may not match the metric the business cares about (e.g. recall at a fixed precision), and the lowest-loss checkpoint can be overfit to that particular validation set after many comparisons. Choose by the target metric, check it on a held-out test set and consider calibration, latency and robustness.

AIE-441 · Is a model with a higher AUC always better for your use case?

Trap: AUC summarises ranking over all thresholds, but you operate at one threshold. A model with lower AUC can have higher precision at the recall level you need, and AUC ignores calibration and costs.

AIE-442 · If cross-validation gives a great score, will the model perform the same in production?

Trap: CV assumes future data looks like training data. Leakage, temporal drift, a different population or pipeline differences in production all break that assumption.

AIE-443 · Can you tune hyperparameters on the test set if you only do it a few times?

Trap: Every decision based on the test set leaks information into the model, making its score optimistic. Tune on validation data or with cross-validation and use the test set once at the end.

AIE-444 · Does an R² of 0.9 mean the model's predictions are accurate enough?

Trap: R² measures variance explained relative to predicting the mean; errors can still be large in absolute terms or for important ranges, and R² can be inflated by trends. Check residuals and business-relevant error metrics.

AIE-445 · Is it fine to randomly split time-series data into train and test?

Trap: Random splits let the model learn from the future to predict the past, overstating performance. Use chronological splits or rolling validation.

AIE-446 · Does a confident prediction mean a correct one?

Trap: Neural networks are often overconfident, especially on out-of-distribution inputs. Check calibration and use uncertainty estimation where decisions depend on confidence.

Feature Engineering & Data Preparation

AIE-447 · Should you scale features before splitting into train and test sets?

Trap: Fitting the scaler on the full dataset leaks test-set statistics into training. Fit scalers, imputers and encoders on the training data only, then apply them to validation and test data.

AIE-448 · Does oversampling the minority class before cross-validation improve evaluation?

Trap: Oversampling before splitting puts copies of the same minority samples in both training and validation folds, inflating scores. Oversample only within the training folds.

AIE-449 · Do more features always improve a model?

Trap: Irrelevant or noisy features increase overfitting, training cost and the curse of dimensionality. Feature selection or regularisation is often needed.

AIE-450 · Is dropping rows with missing values always a safe default?

Trap: Missingness is often informative or non-random, and dropping rows can bias the data and throw away a large share of examples. Analyse why values are missing first.

AIE-451 · Does label encoding categorical variables work for every model?

Trap: Integer labels imply an order and distance (e.g. red=1, green=2, blue=3) that linear and distance-based models misinterpret. Tree models tolerate it better; otherwise use one-hot or target encoding.

AIE-452 · Is data cleaning a one-time step before modelling?

Trap: Production data keeps changing, so validation and cleaning must be built into pipelines with monitoring, or the model degrades silently.

Deep Learning Fundamentals

AIE-453 · Does a deeper neural network always perform better?

Trap: Beyond a point, deeper networks are harder to train (vanishing gradients, degradation) and overfit small datasets; benefits depend on architecture (residual connections), data size and compute.

AIE-454 · Is a lower training loss always a sign of a better model?

Trap: Training loss can approach zero while the model memorises noise; generalisation is measured on validation data.

AIE-455 · Should you always use the largest learning rate that doesn't diverge?

Trap: Very large learning rates can lead to unstable training and poor final minima. Schedules with warmup and decay often outperform a fixed high rate.

AIE-456 · Does dropout help every network?

Trap: Dropout regularises large models on limited data, but it can hurt small models, slow convergence and interact badly with batch normalisation; many large pretrained transformers use little or no dropout during fine-tuning.

AIE-457 · Is a neural network a black box that can't be explained at all?

Trap: Exact reasoning is hard to state, but saliency maps, SHAP, probing, attention analysis and mechanistic interpretability give useful insight. Explanations must be checked, because some methods can be misleading.

AIE-458 · Do more epochs always improve a model if you have time?

Trap: After a point, validation performance stops improving and starts to fall as the model overfits. Early stopping and validation monitoring decide when to stop.

CNNs & Computer Vision

AIE-459 · Are CNNs fully invariant to translation, rotation and scale?

Trap: Convolutions are translation-equivariant and pooling adds limited invariance, but CNNs aren't naturally rotation or scale invariant; small shifts can even change predictions due to aliasing. Augmentation and architecture choices provide robustness.

AIE-460 · If a vision model reaches 98% accuracy on the test set, will it work on photos from a new camera?

Trap: Different sensors, lighting, resolution and compression create a distribution shift. Evaluate on data from the new conditions before deployment.

AIE-461 · Does a Grad-CAM heatmap prove what the model "looked at"?

Trap: Saliency methods are approximations; they can be noisy, insensitive to model parameters in some cases, and are best used as qualitative hints, verified with counterfactual tests.

AIE-462 · Is pretraining on ImageNet always useful for medical or satellite images?

Trap: It often helps with low data, but domain-specific pretraining (or self-supervised pretraining on in-domain images) can be much better when image statistics differ strongly.

AIE-463 · Does a higher IoU threshold always mean a better detector?

Trap: A stricter threshold measures localisation precision more strictly; a model can score well at IoU 0.5 and poorly at 0.75. Report results across thresholds.

AIE-464 · Will adding more augmentation always improve a vision model?

Trap: Excessive or unrealistic augmentation can create images unlike real data or change labels, hurting performance. Augmentations must match plausible variation.

RNNs & Sequence Models

AIE-465 · Do LSTMs completely solve long-term memory problems?

Trap: They greatly improve over vanilla RNNs, but still struggle with very long sequences (thousands of steps) and process tokens sequentially; attention-based models handle long-range dependencies more directly.

AIE-466 · Is a lower perplexity always a better language model for an application?

Trap: Perplexity measures next-token prediction on a test corpus, not helpfulness, factuality or task performance. Compare on task-specific evaluations too.

AIE-467 · Can you compare perplexities of models with different tokenizers directly?

Trap: Perplexity is per token, and different tokenizers split text into different numbers of tokens, so values aren't comparable. Normalise per character or byte instead.

AIE-468 · Does a forecasting model with low error on past data predict well during unusual events?

Trap: Models trained on normal patterns fail during structural breaks (pandemics, policy changes). Monitor and adapt rather than trusting historical accuracy.

AIE-469 · Is a bidirectional RNN suitable for real-time prediction?

Trap: It needs future context, which isn't available in streaming settings. Use unidirectional models for real-time tasks.

AIE-470 · Does beam search always produce better translations than sampling?

Trap: Beam search maximises likelihood but can produce generic, repetitive text; very large beams can reduce quality. The best decoding depends on the task.

Transformers & NLP

AIE-471 · Do attention weights explain why a transformer made a prediction?

Trap: Attention shows where information was mixed in one layer, but it isn't a faithful explanation of the whole computation; different attention patterns can give the same output. Use gradient-based attribution or causal interventions for explanations.

AIE-472 · Is a transformer's context window the same as its memory of a conversation?

Trap: The model has no memory beyond the tokens it is given; anything outside the window is simply not seen. Applications must resend or summarise history, or use external memory and retrieval.

AIE-473 · Does BERT generate text like GPT?

Trap: BERT is an encoder trained with masked language modelling for understanding tasks; it isn't designed for left-to-right generation. Decoder models like GPT generate text.

AIE-474 · Does a bigger tokenizer vocabulary always improve a model?

Trap: Larger vocabularies shorten sequences but increase embedding parameters and leave rare tokens poorly trained. Vocabulary size is a trade-off chosen with data and languages in mind.

AIE-475 · Is a model that tops a benchmark the best one for your task?

Trap: Benchmarks may be contaminated in training data, saturated, or unrelated to your domain. Evaluate candidates on your own representative data.

AIE-476 · Does fine-tuning always outperform prompting a strong model?

Trap: With little data, fine-tuning can overfit or degrade general abilities, while a well-designed prompt with examples may perform as well. Compare both on a held-out set.

LLMs, Prompting, RAG & Agents

AIE-477 · Does an LLM look up facts in a database when answering?

Trap: A plain LLM generates text from patterns stored in its weights; it doesn't query a database unless the application provides retrieval or tools. That's why it can produce confident but false statements.

AIE-478 · Does setting temperature to 0 make LLM output completely deterministic and correct?

Trap: Temperature 0 makes decoding greedy, but outputs can still vary slightly across hardware and batching, and greedy decoding doesn't make answers correct. It only reduces randomness.

AIE-479 · Does RAG eliminate hallucinations?

Trap: RAG reduces them, but the model can still ignore or misread retrieved context, combine it wrongly, or answer when retrieval returned nothing relevant. Evaluate faithfulness and instruct the model to say when the answer isn't in the sources.

AIE-480 · Is a longer context window always better than retrieval?

Trap: Long contexts cost more and models can miss information in the middle of long inputs. Retrieval that selects the most relevant passages is often more accurate and cheaper.

AIE-481 · Can you trust an LLM to grade its own answers perfectly?

Trap: LLM judges have biases (favouring longer answers, their own style, position in the prompt) and may miss subtle errors. Calibrate them against human labels.

AIE-482 · Does giving an agent more tools always make it more capable?

Trap: More tools increase confusion, wrong tool selection and security risk. Provide a focused set of well-described tools with least-privilege permissions.

Generative Models (GANs, VAEs, Diffusion)

AIE-483 · Does a GAN's generator loss going down mean image quality is improving?

Trap: GAN losses are adversarial and often don't track sample quality; the generator loss can fall while modes collapse. Monitor samples visually and with metrics such as FID.

AIE-484 · Are VAE outputs blurry because the model is too small?

Trap: Blurriness largely comes from the pixel-wise reconstruction loss and Gaussian assumptions, which average plausible outputs; larger models help less than better likelihoods, perceptual losses or hierarchical VAEs.

AIE-485 · Does a diffusion model store and copy the training images it learned from?

Trap: Generally it learns a distribution and produces new images, but it can memorise and reproduce near-copies of images duplicated many times in training data. Deduplication and output filtering reduce this.

AIE-486 · Is a lower FID always proof that a generator is better?

Trap: FID depends on the Inception feature space, sample size and preprocessing, can be gamed, and doesn't measure prompt alignment or specific failures like distorted hands. Combine it with human evaluation and task-specific metrics.

AIE-487 · Does a watermark guarantee that AI-generated images can always be identified?

Trap: Watermarks can be weakened or removed by cropping, compression or re-generation, and unwatermarked generators exist. Provenance needs several signals, not one mechanism.

AIE-488 · Is synthetic data always privacy-safe because it isn't real?

Trap: Generators can memorise and leak real records, especially rare ones. Privacy needs testing (membership inference, nearest-record distance) or formal guarantees like differential privacy.

Reinforcement Learning

AIE-489 · Does maximising reward always produce the behaviour the designer intended?

Trap: Agents exploit any gap between the reward and the real goal (reward hacking), such as boat-racing agents circling to collect points instead of finishing. Reward design and behavioural evaluation are critical.

AIE-490 · Is RL the right choice whenever decisions are sequential?

Trap: If a good simulator or safe exploration isn't available, or the problem can be solved with supervised learning, optimisation or bandits, RL adds cost and risk. Use the simplest method that fits.

AIE-491 · Does an RL agent that performs well in simulation work equally well in the real world?

Trap: Simulation never matches reality exactly, so policies can fail on real friction, sensor noise or delays (the sim-to-real gap). Domain randomisation and real-world fine-tuning are needed.

AIE-492 · Does a higher discount factor always give a better policy?

Trap: A γ close to 1 values long-term rewards but makes learning slower and noisier. The right value depends on the task's time horizon.

AIE-493 · Is exploration only needed early in training?

Trap: Environments can change, and premature convergence leaves better strategies undiscovered. Exploration schedules and entropy bonuses must be tuned, sometimes throughout training.

AIE-494 · Can reinforcement learning be trained on any logged dataset without problems?

Trap: Offline RL struggles with distribution shift; policies may choose actions rarely seen in data, where value estimates are unreliable. Conservative methods and coverage checks are needed.

MLOps, Deployment & Responsible AI

AIE-495 · Once a model is deployed, is the ML project finished?

Trap: Deployment starts the operational phase: monitoring, drift handling, retraining, incident response and governance. Many models degrade silently without this ongoing work.

AIE-496 · Does removing protected attributes like gender from the data make a model fair?

Trap: Other features (postcode, name, purchase history) can act as proxies, so bias persists. Measure fairness outcomes across groups instead of assuming that removing a column fixes it.

AIE-497 · Is a highly accurate model automatically trustworthy?

Trap: Trust also requires robustness, fairness, transparency, privacy, security and accountability. A model can be accurate on average but fail badly for specific groups or adversarial inputs.

AIE-498 · Does quantising a model always reduce its accuracy noticeably?

Trap: 8-bit quantisation often loses very little accuracy with calibration or quantisation-aware training, while 4-bit needs more care. Measure accuracy on representative data.

AIE-499 · Is explainability only needed for regulators?

Trap: Explanations also help developers debug errors, detect leakage and spurious correlations, and help users trust and appropriately rely on predictions.

AIE-500 · Does human-in-the-loop review guarantee safe AI decisions?

Trap: Reviewers can over-trust AI (automation bias), lack time or context, or rubber-stamp decisions. Human oversight must be designed with training, workload limits and the ability to override.

Other levels: Basic · Intermediate · Advanced · All Artificial Intelligence questions