Interview preparation · Foundation to advanced

AI Engineer interview questions and answers

Practise AI engineering interviews across the complete prediction and assistant lifecycle. The questions cover Python execution and data contracts, training and validation, retrieval and generation, evaluation, model serving and operational recovery.

Practise AI Engineer interviews

Topics in this question bank

Python for AI services; Python and data preparation; machine learning; deep learning and PyTorch; LLMs and retrieval-augmented generation; AI evaluation and safety; MLOps and inference.

How to prepare your answers

Prepare to separate model quality from system quality. Discuss leakage, representative validation, feature availability and numerical behavior before presenting a score. For LLM and RAG systems, distinguish retrieval coverage, evidence support, access controls and tool authority. For production models, explain versioning, monitoring and rollback.

In general preparation, choose at least three topics and your target level. For a specific job, enter the technologies required and your current skills. Keyword matching selects supported topics; it does not infer proficiency from a resume or generate new questions.

Sample AI Engineer questions with expected answers

These examples are a starting point for focused interview preparation. Accept other technically sound approaches and check the primary references for the relevant environment and version.

Python for AI engineering · foundation

Why do AI services need explicit Python object ownership?

Models, tensors, caches and request data can outlive one call through retained references. Define shared and per-request state deliberately, because garbage collection cannot remove live references or prevent cross-user mutable-state leakage.

Follow-up: Which object retains the last batch?

A stronger answer: Connects Python lifecycle to serving.

Read the primary reference

Python & data preparation · foundation

Why separate training and test data before preprocessing?

Fitting preprocessing on all data can leak test information into the model-building process. Learn transformations from training folds and apply them to held-out data without refitting. Pipelines help maintain that boundary consistently.

Follow-up: Where should imputation parameters come from during cross-validation?

A stronger answer: Applies the boundary to every learned transformation.

Read the primary reference

Machine learning · intermediate

Why is accuracy misleading for a rare positive class?

Predicting the majority class can score highly while missing valuable events. Examine precision, recall and threshold-dependent costs, with representative prevalence and suitable ranking metrics. Choose metrics from consequences rather than habit.

Follow-up: How would changing prevalence affect precision?

A stronger answer: Relates metrics to deployment conditions.

Read the primary reference

Deep learning & PyTorch · foundation

What does backpropagation compute?

It applies the chain rule to compute gradients of a scalar objective with respect to model parameters through the computation graph. An optimizer then uses those gradients to update parameters. Gradient computation and parameter updates are distinct steps.

Follow-up: Why are accumulated gradients usually cleared between training steps?

A stronger answer: Explains gradient lifecycle.

Read the primary reference

LLMs & RAG · intermediate

A RAG answer cites a source that does not support its claim. What do you inspect?

Check retrieved passages, context assembly and claim-to-source alignment. Measure support at the claim level rather than checking only that a citation exists. Improve evidence selection or answer constraints and abstain when support is absent.

Follow-up: How would you build a test that catches citation mismatch?

A stronger answer: Evaluates evidence entailment rather than citation presence.

Read the primary reference

AI evaluation & safety · foundation

Why should an AI evaluation set include difficult negative cases?

It exposes unsupported answers, unsafe actions and plausible failures that easy positives hide. Include realistic unanswerable or misleading inputs and state acceptable behavior. A high average score on convenient examples is weak deployment evidence.

Follow-up: How would you prevent test cases from leaking into prompt tuning?

A stronger answer: Protects independent evaluation.

Read the primary reference

MLOps & model serving · foundation

What should a model registry record?

Track model identity, artifacts, lineage, evaluation evidence and lifecycle state under controlled access. Include preprocessing and dependency information needed for serving. A filename or score alone cannot reconstruct the deployed predictor.

Follow-up: How would you identify the exact model behind one prediction?

A stronger answer: Connects registry records to runtime versions.

Read the primary reference

LLMs & RAG · intermediate

How should a RAG system handle documents a user cannot access?

Enforce authorization during retrieval and context construction, preserving document permissions and tenant boundaries. Verify caches and citations too. Asking the model to hide forbidden content after giving it that content is not a reliable access control.

Follow-up: How do permission changes invalidate previously cached evidence?

A stronger answer: Treats access as a system invariant.

Read the primary reference

Using these questions as an interviewer

Ask for evidence and failure cases: which data was available at prediction time, what the metric actually measures, how an unsupported answer would be detected and which actions an assistant is allowed to take. Several architectures may be valid when their assumptions are explicit.

In the interviewer workspace, enter role requirements and candidate skills, inspect the keyword-based skill map and build a plan. Reveal guides as needed, replace questions, record notes and assess the candidate yourself. The app does not provide semantic grading or a hiring score.

Start a focused practice session

Learn mode lets you reveal guides at your own pace. Practice asks you to answer first and provides a phrase-based concept check. Mock keeps guides hidden until you finish. Optional speech input and spoken questions depend on browser support; typed answers are always available in the workspace.

Regular practice is free without an account. Verified members can also access optional AI coaching, subject to usage limits and availability. Job and resume drafts stay in memory; optional member AI matching sends them to Gemini only after separate permission. Saved answers and notes use this browser's local storage. Export JSON or print the completed-session review when you need a copy.

Open AI Engineer practice