Skip to content
Tech Interview Prep

AI Engineer Interview Prep

Overview

Owns the retrieval, evaluation, and guardrail machinery that turns foundation model calls into product capabilities meeting stated quality, cost, and latency targets in production.

Curated: · Written: · Reviewed:

Interview Q&A
110
Practice MCQs
110

The role in one line

Owns the retrieval, evaluation and guardrail layer that turns foundation model calls into product features meeting stated quality, cost and p99 latency targets in production.

The interview loop

Round formats vary by employer. The typical loop and what each round scores:

RoundWhat it scores
Recruiter screenProduction exposure to model-backed systems, and which targets you have owned
System design: model-backed featureDecomposition into retrieval, context, model, orchestration and product contract; explicit budgets
Failure diagnosis caseAttribution: which component the evidence indicts, and the smallest change that fixes it
Evaluation designTask metrics, labelled and incident-derived sets, judge calibration, release thresholds that name the change
Coding (Python)Retrieval pipeline, eval harness, schema validation; correctness over cleverness
Stakeholder roundBuild versus fine-tune decisions, and saying no with evidence

Five must-know areas

  • Failure attribution: where a fault sits (instructions, retrieval, context assembly, model, orchestration, product contract) and how you prove it before changing anything.
  • Retrieval quality: chunk boundaries, hybrid lexical plus dense retrieval for identifiers, reranking, and recall@k on labelled queries.
  • Evaluation design: task-level metrics, human-labelled and incident-derived sets, judge agreement against human labels, and release gates.
  • Context and cost budgets: token ceilings, per-tenant retrieval scoping, p99 latency composition, cost per request.
  • Output contracts and traceability: schema-validated outputs, bounded retries, and logs linking each answer to prompt version, sources and calls.

Numbers and formulas to have ready

The figures you quote come from the product spec or your own measurements. If the spec gives no target, state the assumption you are using. Do not quote a provider's price or latency from memory; check its current price sheet and your own p99 under load.

Cost per request, with prices in dollars per million tokens from the provider's current sheet:

cost=Tin pin+Tout pout106\text{cost} = \frac{T_{in}\,p_{in} + T_{out}\,p_{out}}{10^{6}}

Approximate p99 end-to-end latency. Measure the p99 of each term, not the mean, because the tail is what the target constrains:

Lp99≈Lretrieve+Lrerank+LTTFT+ToutrL_{p99} \approx L_{\text{retrieve}} + L_{\text{rerank}} + L_{\text{TTFT}} + \frac{T_{out}}{r}

Here r is decode tokens per second under production load.

Recall at k, which is the figure to report for any retrieval change:

recall@k=∣relevant documents in top k∣∣relevant documents∣\text{recall@}k = \frac{|\text{relevant documents in top } k|}{|\text{relevant documents}|}

Judge agreement with human labels: report Cohen's kappa on a labelled sample, with the sample size stated.

Reference architecture

Request with tenant ID Query rewrite and filters Hybrid retrieval scoped to tenant Reranker Context assembly under token budget Model call with pinned prompt version Schema validation and citation check Answer plus trace of prompts, sources and calls

The retrieval stages and the model call are separate failure points, and each has its own metric. Tenant scoping happens at retrieval, not in the prompt. The citation check is where unsupported answers get caught. The trace is what lets you attribute a bad answer to a stage.

Strong vs weak answers

QuestionStrong answer sounds likeWeak answer sounds like
Dense retriever misses error codesRecall@10 on identifier queries is low; I add a lexical index, fuse the rankings, and re-measure identifier recall before touching the embedding modelSwitch to a bigger embedding model
Fine-tune for this use case?Retrieval gaps and output-format errors come first; I fine-tune only if the eval shows a behaviour that prompt and retrieval changes cannot fixFine-tuning will make it more accurate
Model as judgeI measure kappa against 200 human labels, check position bias by swapping order, and report bothThe judge model grades the outputs
Confidently wrong answerI trace the answer to its prompt version, sources and calls, check whether the source held the fact, then attribute the fault before editing anythingI add a line to the prompt saying to be accurate
Stream the outputTime to first token is tracked separately; validation runs on the completed output, and I say what the user sees if validation failsStreaming is faster

Interview tips

  1. Open every failure answer with the category, then the evidence, then the intervention.
  2. Name the component you will not change and why. Minimal intervention is scored.
  3. Quote your budgets: tokens per request, dollars per request, p99 latency.
  4. Bring one production incident you traced end to end, with the fix and the eval that now guards it.
  5. Say what result would change your mind before you commit to a fix.

Last-week checklist:

  • Drill the Top 100 scenarios aloud in one order: failure category, evidence, intervention, evaluation plan, model versus code boundary.
  • Work the Practice MCQs on retrieval and evaluation.
  • Work through the Concepts in study order, starting with Model Serving and Inference Infrastructure. Close the step you stalled on.
  • Calculate cost and p99 for one feature from memory, using the formulas above.
  • Prepare two questions about the team's evaluation set and how releases are gated.

Feedback on this overview

Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.