AI engineer is no longer one interview shape
"AI engineer" can mean at least five things in 2026:
- LLM application engineer building product features on model APIs.
- ML engineer working with training, fine-tuning or model evaluation.
- AI infra engineer working on inference, scaling and reliability.
- LLMOps engineer owning deployment, monitoring, evals and safety gates.
- Forward deployed AI engineer turning customer workflows into working systems.
That is why generic AI interview prep wastes time. The role title is not enough. Read the job description for clues: RAG, tool calling, evals, latency, model serving, customer discovery, prompt design, safety, agents, vector search, data pipelines or infrastructure. A useful exercise before any loop is to tag each requirement against those five archetypes. If two thirds of the bullets are about retrieval, latency and product UX, you are interviewing for an application role and should not waste a weekend revising backpropagation. If they lean on training runs, distributed data loading and model evaluation, the opposite is true.
The research signal is strong. OpenAI's and Anthropic's hiring pages show broad engineering roles around models, tools and agents, not only classical ML. See OpenAI careers, Anthropic jobs, Stack Overflow's 2025 AI survey, and candidate discussions on ML and AI interview advice. Candidates also report that interview loops vary widely, which is why role-specific prep matters.
If you remember one thing from this guide, make it this: AI engineering interviews reward people who can reason about how model-powered systems behave under load, drift and adversarial input. Knowing the API surface is table stakes. Knowing the failure surface is what gets offers.
Expect a mixed loop
A realistic AI engineer loop may include:
| Round | What it tests |
|---|---|
| Coding | General programming, data handling, APIs, tests |
| LLM app design | RAG, prompts, tools, evals, latency, cost |
| System design | Scaling, reliability, observability, safety |
| ML fundamentals | Embeddings, classification, evaluation, fine-tuning |
| Product judgement | When AI is useful, failure modes, UX |
| Behavioural | Ownership, ambiguity, incidents, communication |
For most product AI roles, you do not need to be a research scientist. You do need to understand how model-powered systems fail. Hallucination, stale retrieval, prompt injection, latency spikes, rate limits, cost overruns and silent quality regressions are production problems, and each one has a corresponding interview question.
The weighting shifts by seniority. The table below is a rough guide to where the bar moves.
| Level | Coding emphasis | Design emphasis | What separates a pass from a strong pass |
|---|---|---|---|
| Junior to mid | High | Low to medium | Clean code, can wire up an API call, knows what an embedding is |
| Senior | Medium | High | Owns tradeoffs, names failure modes before being asked, scopes evals |
| Staff and above | Low | Very high | Frames the problem, challenges the premise, reasons about org-wide cost and risk |
A common mistake at the senior level is to keep answering like a mid-level engineer: lots of correct mechanics, no framing. Interviewers at that band listen for whether you would set the strategy, not just execute it.
Know the core LLM app architecture
A common interview prompt is: "Design an AI support assistant for our documentation."
A solid architecture:
- Ingest documents.
- Chunk and embed content.
- Store chunks in a vector database.
- Retrieve relevant chunks at query time.
- Build a prompt with citations.
- Call the model.
- Return an answer with source links.
- Log feedback and quality signals.
type RetrievedChunk = {
id: string;
url: string;
title: string;
text: string;
score: number;
};
export function buildSupportPrompt(question: string, chunks: RetrievedChunk[]) {
const context = chunks
.map((chunk, index) => {
return `[${index + 1}] ${chunk.title}\nURL: ${chunk.url}\n${chunk.text}`;
})
.join("\n\n");
return [
"Answer the user using only the provided sources.",
"If the sources do not contain the answer, say you do not know.",
"Cite sources by bracket number.",
"",
`Question: ${question}`,
"",
`Sources:\n${context}`,
].join("\n");
}This code is not the whole system. It shows a habit interviewers care about: constrain the model, pass sources, and make unsupported answers explicit.
The mistake most candidates make here is stopping at the happy path. Strong candidates poke at the edges of their own design, out loud, before the interviewer has to. A few questions worth raising yourself:
- What happens when retrieval returns nothing relevant? The assistant should refuse, not improvise.
- How do you chunk a 200-page PDF without splitting a table mid-row? Chunk size and overlap are real decisions, not defaults.
- What is your reranking step? Top-k vector similarity is a first pass, not a final answer. Naming a cross-encoder reranker or a hybrid keyword plus vector approach shows depth.
- How fresh is the index? If docs change daily and you re-embed weekly, you are shipping stale answers and calling them confident.
- What is the latency budget per stage? Retrieval, prompt assembly and generation each cost time, and the model call usually dominates.
What good looks like versus what weak looks like
| Dimension | Weak answer | Strong answer |
|---|---|---|
| Retrieval | "I'd use a vector DB and grab the top results" | "Hybrid retrieval, then rerank, then trim to a token budget I can defend" |
| Failure handling | Assumes the model always has the answer | Defines the refusal path and the empty-retrieval path up front |
| Evals | "I'd test some prompts" | "Golden set, refusal cases, regression gate before any prompt change" |
| Cost | Not mentioned | Estimates tokens per request and the monthly bill at expected traffic |
| Observability | "I'd add logging" | Names the specific signals: latency per stage, token cost, citation rate, thumbs-down rate |
Prepare evals, not just prompts
Prompt iteration is not enough. A serious AI engineer needs evaluation.
At minimum, define:
- Golden questions with expected source documents.
- Refusal cases where the assistant should say it does not know.
- Safety cases for prompt injection or policy-sensitive requests.
- Regression checks before changing prompts, models or retrieval settings.
- Human review for ambiguous quality.
Example eval record:
type EvalCase = {
id: string;
question: string;
requiredSourceUrls: string[];
mustContain: string[];
mustNotContain: string[];
};
export function scoreAnswer(answer: string, evalCase: EvalCase) {
const lower = answer.toLowerCase();
const containsRequired = evalCase.mustContain.every((term) =>
lower.includes(term.toLowerCase()),
);
const avoidsForbidden = evalCase.mustNotContain.every(
(term) => !lower.includes(term.toLowerCase()),
);
return containsRequired && avoidsForbidden;
}In a real product, scoring can be more sophisticated. The interview point is that you measure behaviour across changes. OpenAI's frontier governance framework and safety materials from OpenAI Safety show why model releases and safeguards need structured evaluation, not vibes.
There is a layered way to talk about evals that lands well. Describe three tiers and when each is worth the cost:
- Deterministic checks. String or regex matching, JSON schema validation, citation presence. Cheap, fast, run on every change. These catch the obvious regressions.
- Model-graded checks, sometimes called LLM-as-judge. A second model scores whether an answer is faithful to its sources or matches a rubric. More flexible, but the judge can be wrong, so you calibrate it against human labels and watch for it rewarding verbosity or its own style.
- Human review. Slow and expensive, reserved for ambiguous quality and for auditing the automated graders.
A quietly fatal mistake is treating an eval score as ground truth without ever sampling the cases it got wrong. If you mention that you spot-check disagreements between the grader and a human, you signal that you have actually run evals in anger rather than read about them.
Be ready for tradeoff questions
Common prompts:
- When would you use RAG instead of fine-tuning?
- How would you reduce hallucinations?
- How would you handle prompt injection?
- How would you manage model cost?
- How would you compare two model providers?
- What would you log, and what would you avoid logging?
Good answers are conditional. RAG helps when knowledge changes and sources matter. Fine-tuning can help with style, task format or specialised behaviour, but it does not magically add fresh private knowledge. Smaller models may reduce cost and latency but need quality checks. Caching can help repeated queries but can serve stale answers if invalidation is weak.
For privacy, do not log raw sensitive user data by default. Store enough metadata to debug quality and cost, but redact or hash where appropriate. If the role touches regulated data, ask about retention, access control and audit requirements.
The RAG versus fine-tuning question is asked so often it deserves a crisp default answer you can deliver in thirty seconds and then defend:
Reach for retrieval first when the knowledge is large, changing, or needs citations. Reach for fine-tuning when you need a consistent format, tone or behaviour the base model will not reliably produce from instructions alone. They are not rivals. A common production setup fine-tunes for behaviour and retrieves for facts.
On prompt injection, the weak answer is "I'd add a system prompt telling it to ignore malicious instructions." The strong answer treats the model as untrusted: separate the data plane from the instruction plane, never let retrieved content silently become a command, constrain what tools the model can call, and validate any side-effecting action before it executes. Noting that untrusted text in a retrieved document can itself carry an injection payload shows you understand why this is hard.
A short worked example: the cost question
Tradeoff answers are stronger with numbers. Imagine the interviewer asks, "We're getting 500,000 support queries a month. What does this cost, and how would you bring it down?"
Start with a back-of-envelope estimate. Suppose each request sends 6 retrieved chunks of roughly 400 tokens plus a 300-token system prompt and question, so about 2,700 input tokens, and generates a 400-token answer. At 500,000 requests that is roughly 1.35 billion input tokens and 200 million output tokens a month. Whether that bill is a problem depends entirely on the model you picked, which is the point: you cannot answer the cost question without naming the model tier and doing the arithmetic out loud.
Then attack it in order of leverage:
- Route by difficulty. Send easy, high-confidence queries to a smaller, cheaper model and reserve the frontier model for hard ones. This alone often moves most traffic to a fraction of the cost.
- Cache aggressively. Support questions cluster. A semantic cache on common queries can serve a large share of traffic with no model call at all, as long as invalidation tracks doc changes.
- Trim the context. Six chunks may be three more than the answer needs. Reranking and tighter top-k cut input tokens directly.
- Cap output length. Many support answers do not need 400 tokens.
The shape of that answer, measure then attack the biggest line item first, is what interviewers want to hear. The figures matter less than the discipline of estimating before optimising.
Tool calling and agents
More 2026 loops include an agent component. The phrasing is usually "how would you let the model take actions, not just answer." A grounded answer covers:
- Tool definitions as a typed contract. Each tool has a name, a description the model reads, and a schema for its arguments. Vague descriptions are the top cause of the model calling the wrong tool.
- Validation at the boundary. The model proposes a call; your code validates and executes it. Never let a generated argument reach a destructive operation unchecked.
- A loop with a budget. Agents can spin. Cap the steps, set a timeout, and decide what happens when the cap is hit.
- Observability per step. Log which tool was called, with what arguments, and what came back. When an agent misbehaves, this trace is the only way to debug it.
A common mistake is describing an agent as a magic autonomous worker. The senior framing is the opposite: an agent is a constrained loop you are responsible for, and most of the engineering is in the guardrails.
Build one serious portfolio project
An AI engineer portfolio project should include:
- A real user workflow.
- Retrieval or tool use.
- Evals with failing cases.
- Observability: latency, token cost, errors.
- A README that explains tradeoffs.
- A demo that can be run without secrets, or clear setup instructions.
Avoid yet another generic PDF chatbot with no evals. A smaller project with honest failure analysis is stronger than a polished demo that cannot explain its own errors. The highest-signal artefact you can show is an eval suite with cases that currently fail, plus a note on why they fail and what you would try next. It proves you measure, that you are honest about limits, and that you think in iterations.
The market research notes that candidates need proof of production skill because AI has made polished artefacts cheap. That is consistent with HackerRank's real-world skills argument, Built In's AI cheating debate, and discussions around real-codebase interviews.
A two-week prep plan
With a loop coming up and limited time, prioritise like this rather than trying to revise everything.
| Days | Focus | Concrete output |
|---|---|---|
| 1 to 3 | Match prep to the role | Tagged job description, list of likely rounds |
| 4 to 7 | Build or harden one project | Working retrieval flow plus an eval suite |
| 8 to 10 | Tradeoff drills | Spoken answers to the RAG, hallucination, cost and injection questions |
| 11 to 12 | System design reps | Two full whiteboard runs of the support-assistant prompt |
| 13 to 14 | Behavioural stories | Three incident stories in STAR form, each with a real metric |
The behavioural round is where strong engineers under-prepare. AI work is full of ambiguity, silent regressions and incidents, which gives you rich material. Have a story ready about a quality regression you caught, what your eval missed, and how you closed the gap. That single story signals ownership, measurement and honesty in one go.
FAQ
Do I need deep maths for an AI engineer interview? For application and LLMOps roles, usually not. You need to reason about embeddings, similarity, evaluation metrics and probability at a conceptual level. For ML engineer and research-leaning roles, expect more depth on training, loss functions and model internals.
Is LeetCode still relevant? Often yes for the coding round, but the bar is shifting toward realistic data handling, API work and tests rather than puzzle-style problems. Practise writing clean, tested code that calls a model and handles errors.
Should I mention specific model providers? Yes, and you should be able to compare them on cost, latency, context window and tooling without turning it into a sales pitch. Interviewers want to see that you choose models for reasons, and that you would re-evaluate as the landscape changes.
How do I stand out without research credentials? Show production judgement. Evals with failing cases, an honest README, a cost estimate, and a clear account of a failure you debugged will beat a glossy demo every time.
Continue your prep
Anchor your prep in the exact AI role: