Free to read · 120 questions · 12 chapters · 2026 edition
All 120 AI engineer interview questions in the kit, by level (2026)
Every question in the AI Engineer Interview Kit, free to read: the question, the level it is pitched at, the kinds of company that ask it, and the one line on what the interviewer is really testing. Use it to find your gaps before an interview.
The kit adds what this page leaves out: a worked answer for each of the 120 questions, the follow-ups interviewers ask next, and a 14-day prep plan. Want to judge the answers first? Read 12 free questions (PDF), no email needed, or read the free article AI Engineer Interview Questions (2026): 13 Worked Answers, which works through 12 of these questions (13 worked answers in all).
New · $49AI Engineer Interview KitQuestions, worked answers and a 2-week prep plan for AI/LLM engineering interviewsGet the kit · $49Level is where the question usually comes up: junior and mid questions cover the fundamentals, senior and staff questions expect trade-offs and systems judgement. Company types are where it is most often asked: AI lab, startup, big tech or enterprise.
1. LLM fundamentals for application engineers
1.1 What is a token, and why does tokenization matter in practice?
What they're testing: Connecting tokenization to cost, limits and odd model behaviour.
1.2 Explain temperature and top-p sampling. When would you change them?
What they're testing: Understanding how outputs are sampled and why they vary.
1.3 Explain self-attention at a level you'd use with a fellow engineer.
What they're testing: A clear mental model of attention and its cost.
1.4 What happens between a pretrained base model and the assistant model you call through an API?
What they're testing: Understanding pretraining, instruction tuning and preference tuning, and why it matters to applications.
1.5 Why do LLMs hallucinate?
What they're testing: A mechanistic explanation and the practical mitigations.
1.6 What are embeddings, and how is cosine similarity used with them?
What they're testing: Understanding vector representations and their limits.
1.7 What does a large context window let you do, and what are its limits?
What they're testing: Realistic expectations about long context.
1.8 What's a mixture-of-experts model, and why does it matter for serving?
What they're testing: Awareness of architectures that affect cost and infrastructure.
1.9 What does the training cutoff mean for an application you build?
What they're testing: Knowing that model knowledge is frozen and how to supply current information.
1.10 How do you choose which model to use for a new feature?
What they're testing: A practical, evidence-based selection process.
2. RAG and retrieval
2.1 Your RAG assistant gives fluent, confident answers that are wrong. How do you find out whether retrieval or generation is at fault?
What they're testing: Whether you separate the pipeline into measurable stages instead of tweaking the prompt.
2.2 How do you choose a chunk size, and what goes wrong at each extreme?
What they're testing: Understanding that chunking is a retrieval-quality decision, not a storage detail.
2.3 When would you use hybrid search (keyword plus vector) instead of pure vector search?
What they're testing: Knowing the failure modes of embeddings on exact terms.
2.4 What does a reranker add, and what does it cost?
What they're testing: The bi-encoder versus cross-encoder trade-off, and latency budgeting.
2.5 How do you evaluate a RAG system before launch, and how do you keep evaluating it afterwards?
What they're testing: A layered evaluation plan with offline sets, automated graders and production signals.
2.6 Documents in the corpus have different access permissions. How do you make sure the assistant never answers from a document the user can't see?
What they're testing: Security thinking: authorization at retrieval time, not in the prompt.
2.7 The retrieved passages contradict each other because some are outdated. What do you do?
What they're testing: Data hygiene and metadata, not just model instructions.
2.8 Questions often need facts from two different documents (multi-hop). How do you handle that?
What they're testing: Query decomposition and agentic retrieval, with awareness of their cost.
2.9 What happens to your index when you change the embedding model?
What they're testing: Operational awareness: vectors from different models aren't comparable.
2.10 Leadership asks whether to replace the RAG pipeline with a long-context model that reads all the documents every time. How do you answer?
What they're testing: Trade-off reasoning with cost, latency, quality and data freshness.
3. Evaluation and testing
3.1 Why can't you test an LLM feature the way you unit-test ordinary code?
What they're testing: Understanding non-determinism and open-ended outputs, and what replaces exact-match assertions.
3.2 You have a new LLM feature and no eval set. How do you build one?
What they're testing: Practical dataset construction: coverage, labels and maintenance.
3.3 How do you make an LLM-as-judge grader trustworthy?
What they're testing: Calibration against humans and awareness of known judge biases.
3.4 Your eval score went from 84% to 86% after a prompt change. Do you ship it?
What they're testing: Statistical judgement about small differences and per-case analysis.
3.5 How do you evaluate an agent that takes several tool-calling steps to complete a task?
What they're testing: Evaluating outcomes and trajectories, plus safety of side effects.
3.6 How do you get reliably structured output (JSON) from a model, and how do you test it?
What they're testing: Knowing the layers: schema-constrained decoding, validation and retries.
3.7 The model provider ships a new model version. How do you decide whether to migrate?
What they're testing: Using evals as a migration gate, with cost and latency in the decision.
3.8 Tell me about a time an AI feature you built hallucinated in production. What did you change?
What they're testing: Behavioral: ownership, a concrete root cause and a systemic fix, not just a prompt tweak.
3.9 How would you test an LLM application for prompt injection?
What they're testing: Security testing mindset and defence in depth, not a single filter.
3.10 Several teams are shipping LLM features with no shared way to evaluate them. What would you set up?
What they're testing: Platform thinking: shared tooling, standards and release gates without blocking teams.
4. Inference, latency and cost
4.1 Walk me through estimating the monthly model cost of a support chatbot. What goes into the calculation?
What they're testing: Setting up a cost model from first principles with input and output tokens priced separately.
4.2 What is the KV cache, and how do you estimate its memory use?
What they're testing: Understanding why long contexts and large batches are memory-bound during inference.
4.3 Explain time to first token versus tokens per second. Which matters for which product?
What they're testing: Knowing the two phases of inference and how they map to user experience.
4.4 How does batching improve GPU throughput, and what does it cost in latency?
What they're testing: The throughput-latency trade-off and continuous batching.
4.5 What are the trade-offs of quantizing a model to 8-bit or 4-bit?
What they're testing: Memory, speed and quality trade-offs, and how to validate them.
4.6 When would you self-host an open-weights model instead of calling a hosted API?
What they're testing: Total cost of ownership and non-cost factors, not just per-token price.
4.7 How does model routing (sending requests to different models) reduce cost, and how can it go wrong?
What they're testing: Designing a router with an evaluation plan and a fallback.
4.8 What is prompt caching and when does it help?
What they're testing: Recognising repeated prefixes and structuring prompts to exploit them.
4.9 Your LLM feature's p99 latency is ten times its median. How do you investigate?
What they're testing: Systematic latency debugging across the whole request path.
4.10 The company's LLM spend tripled in a quarter. Leadership asks you to bring it down without hurting quality. What's your plan?
What they're testing: Cost attribution first, then prioritised levers with quality gates.
5. Agents and tool use
5.1 How does tool calling work, from the model's point of view and from your application's?
What they're testing: Knowing that the model only proposes calls and the application executes them.
5.2 When should you build an agent rather than a fixed workflow of LLM calls?
What they're testing: Judgement about autonomy versus predictability.
5.3 How do you stop an agent from looping forever or running up a large bill?
What they're testing: Hard limits, loop detection and graceful termination.
5.4 An agent can send emails and modify records. How do you make that safe?
What they're testing: Least privilege, confirmation for irreversible actions and containment of prompt injection.
5.5 What is the Model Context Protocol (MCP), and what problem does it solve?
What they're testing: Understanding MCP as a standard interface between AI applications and tools or data sources.
5.6 The agent has 60 tools and keeps picking the wrong one. What do you do?
What they're testing: Tool design, selection and context management.
5.7 How do you manage context for a long-running agent whose history no longer fits in the window?
What they're testing: Context engineering: summarisation, external memory and selective retrieval.
5.8 A tool the agent depends on is slow and sometimes fails. How do you design around it?
What they're testing: Ordinary distributed-systems reliability applied to agents.
5.9 How would you observe and debug agents in production?
What they're testing: Tracing, replay and turning failures into tests.
5.10 Design a coding agent that fixes failing tests in a repository. What are the main components and risks?
What they're testing: End-to-end agent design with sandboxing, verification and evaluation.
6. Prompting and context engineering
6.1 What goes into a good system prompt for a production feature?
What they're testing: Structure and specificity rather than clever wording.
6.2 When do few-shot examples help, and how can they hurt?
What they're testing: Understanding that examples are strong signals the model will copy.
6.3 Does asking a model to reason step by step improve results? What are the costs?
What they're testing: Nuanced view of reasoning, including models with built-in reasoning.
6.4 What does "context engineering" mean, and how is it different from prompt engineering?
What they're testing: Thinking about everything in the context window as a designed system.
6.5 How would you A/B test a prompt change in production?
What they're testing: Experiment design with offline gates and online metrics.
6.6 The model ignores one of your instructions. How do you debug it?
What they're testing: Systematic debugging instead of adding capital letters.
6.7 How do you get a model to say "I don't know" instead of guessing?
What they're testing: Designing an abstain path and measuring it.
6.8 How do you manage prompts across environments, versions and teams?
What they're testing: Operational maturity: prompts as versioned, reviewed configuration.
6.9 How would you classify thousands of support tickets with an LLM reliably and cheaply?
What they're testing: Applying prompting, structured output and evaluation to a batch task.
6.10 When is fine-tuning a better choice than prompting, and when is it a mistake?
What they're testing: Choosing between prompting, retrieval and fine-tuning based on the problem.
7. LLM system design
7.1 How do you structure your answer in an LLM system design interview?
What they're testing: A repeatable framework that covers the AI-specific concerns.
7.2 Design a customer-support assistant that answers from the help center and can escalate to humans.
What they're testing: RAG plus escalation, evaluation and safe handoff.
7.3 Design enterprise search over internal documents (wiki, tickets, chat, drive) with an answer box.
What they're testing: Connectors, permissions, freshness and ranking at scale.
7.4 Design a system that extracts structured data (vendor, amounts, dates, line items) from invoices.
What they're testing: Document AI pipeline with validation and human review.
7.5 Design a code-review assistant that comments on pull requests.
What they're testing: Precision over recall, context gathering and developer trust.
7.6 Design an internal LLM gateway that all product teams call instead of calling model providers directly.
What they're testing: Platform design: routing, quotas, observability, safety and vendor flexibility.
7.7 Design a meeting summariser that produces notes and action items from recordings.
What they're testing: Multi-stage pipeline with long inputs, privacy and quality checks.
7.8 Where do you put caching in an LLM application, and what can go wrong?
What they're testing: Layers of caching and their correctness risks.
7.9 Your model provider has an outage. How should your system behave?
What they're testing: Resilience planning for a critical external dependency.
7.10 Design the evaluation and release process for a model-powered feature used by millions of people.
What they're testing: Release engineering for probabilistic systems at scale.
8. Behavioral questions for AI roles
8.1 Tell me about an AI project you built. What would you do differently?
What they're testing: Depth of ownership and honest reflection, not the project's novelty.
8.2 Tell me about a time you decided not to use an LLM for something.
What they're testing: Judgement: picking the simplest reliable tool rather than the fashionable one.
8.3 Describe a time a model's output caused a problem for users or the business. How did you handle it?
What they're testing: Incident handling: mitigation first, then root cause and prevention.
8.4 Tell me about a time you had to explain an AI system's limitations to a non-technical stakeholder.
What they're testing: Communication of uncertainty and setting expectations without jargon.
8.5 Tell me about a time an experiment or prototype failed. What did you learn?
What they're testing: Comfort with negative results and learning quickly.
8.6 Tell me about a disagreement with a teammate about a technical approach to an AI feature.
What they're testing: Resolving disagreement with evidence and preserving the relationship.
8.7 How do you keep up with a field that changes this quickly?
What they're testing: A sustainable learning process with filters, not a list of newsletters.
8.8 Tell me about a time you had to ship an AI feature under a tight deadline. What did you cut, and what didn't you cut?
What they're testing: Prioritisation and refusing to cut the things that make AI features safe.
8.9 Tell me about a time you changed how a team or organisation builds with LLMs.
What they're testing: Influence beyond your own code: standards, tooling and adoption.
8.10 Why do you want to work on AI engineering here?
What they're testing: Specific motivation tied to the company's product and problems.
9. Fine-tuning and training data
9.1 How do you decide between prompting, retrieval and fine-tuning for a new feature?
What they're testing: Knowing what each technique changes and picking the cheapest one that solves the actual problem.
9.2 Explain how LoRA works and why it's cheaper than full fine-tuning.
What they're testing: Understanding parameter-efficient fine-tuning at the level of the weight update.
9.3 Estimate the GPU memory needed to fine-tune a 7-billion-parameter model fully versus with QLoRA.
What they're testing: Back-of-envelope memory accounting for weights, gradients and optimizer state.
9.4 How would you build the training dataset for a supervised fine-tune?
What they're testing: Treating data quality, coverage and formatting as the main lever.
9.5 What's the difference between supervised fine-tuning and preference tuning such as RLHF or DPO, and when would you use each?
What they're testing: Knowing what signal each method learns from and the practical trade-offs.
9.6 After fine-tuning, your target metric went up but users report the model got worse at other things. What happened, and how do you prevent it?
What they're testing: Recognising regression and forgetting, and building evaluation that catches it.
9.7 How do you tell whether a fine-tuning run is overfitting, and what do you change?
What they're testing: Reading training signals and connecting them to data and hyperparameters.
9.8 Your team wants to generate training data with a larger model. What are the risks, and how do you manage them?
What they're testing: Using synthetic data while controlling for quality, diversity and terms of use.
9.9 How would you use distillation to cut inference cost for a high-volume task?
What they're testing: Connecting a training technique to a cost and quality business case.
9.10 What governance would you put around fine-tuning on customer data?
What they're testing: Privacy, consent, data lineage and the ability to remove data, at an organisational level.
10. Safety, security and guardrails
10.1 What is prompt injection, and how is it different from a jailbreak?
What they're testing: Clear definitions and why indirect injection matters for real applications.
10.2 Design defences for an agent that reads users' email and can send messages on their behalf.
What they're testing: Layered mitigations that bound impact, not a single filter.
10.3 Why should you treat model output as untrusted input, and where does that matter in code?
What they're testing: Applying classic injection defences to the output side of an LLM.
10.4 How do you keep personal data and secrets out of prompts, logs and model providers?
What they're testing: Data-flow thinking across the whole request path, not just the model call.
10.5 What are guardrails, and how do you evaluate whether they work?
What they're testing: Treating guardrails as classifiers with measurable precision and recall.
10.6 How would you run a red-teaming exercise before launching an LLM feature?
What they're testing: Planning adversarial testing with scope, coverage and a path from findings to fixes.
10.7 A user gets the chatbot to reveal its system prompt. How serious is that?
What they're testing: Calibrating risk and knowing that prompts aren't a security boundary.
10.8 How do you protect an LLM endpoint from abuse and runaway cost?
What they're testing: Rate limiting, quotas and cost controls specific to token-priced APIs.
10.9 How do you enforce document-level permissions in a RAG system?
What they're testing: Making retrieval respect access control so the model never sees what the user can't.
10.10 Leadership asks whether your AI feature is 'safe to launch'. How do you answer?
What they're testing: Turning safety into evidence, residual risk and an operating plan.
11. Multimodal: documents, images and voice
11.1 How does a vision-language model 'see' an image, and what does that imply for cost and accuracy?
What they're testing: A working mental model of image inputs as tokens.
11.2 Design a pipeline that extracts structured data from invoices that arrive as PDFs, scans and phone photos.
What they're testing: Combining classic document processing with LLMs and validation.
11.3 Compare a cascaded voice assistant (speech-to-text, LLM, text-to-speech) with an end-to-end speech model.
What they're testing: Trade-offs in latency, control and quality for voice products.
11.4 Your voice agent feels slow. How do you find and cut latency?
What they're testing: Measuring a latency budget and applying streaming and turn-taking techniques.
11.5 How would you build search across a product catalogue's images and text?
What they're testing: Shared embedding spaces and hybrid retrieval for multimodal search.
11.6 How do you build RAG over documents full of tables, charts and diagrams?
What they're testing: Handling layout-heavy documents beyond plain text chunking.
11.7 A user uploads a screenshot of an error and asks for help. What can go wrong?
What they're testing: Practical failure modes of image inputs in a support or coding assistant.
11.8 How would you evaluate a speech-to-text component for a customer support product?
What they're testing: Choosing metrics that reflect the downstream task, not just generic accuracy.
11.9 How would you control the cost of a feature that sends many images to a vision model?
What they're testing: Cost levers specific to multimodal inputs.
11.10 What extra risks come with generating images or audio, and how would you manage them?
What they're testing: Awareness of misuse, rights and provenance for generative media.
12. Coding rounds, take-homes and AI-assisted engineering
12.1 In a live coding round, implement a function that calls an LLM API and returns parsed JSON. What would you make sure to handle?
What they're testing: Production instincts around a simple model call: errors, retries, validation.
12.2 Implement streaming of a model response to a web client. What are the tricky parts?
What they're testing: Handling streams end to end: transport, partial data, cancellation.
12.3 You have a take-home: build a small RAG app over a folder of documents in a few hours. What do you prioritise?
What they're testing: Scoping, evaluation and communication in a time-boxed project.
12.4 The interviewer lets you use an AI coding assistant. How do you use it well in front of them?
What they're testing: Judgement and verification when working with AI tools.
12.5 Review this pull request: an LLM feature that builds a prompt by string concatenation, calls the API with no timeout and inserts the output into HTML. What do you flag?
What they're testing: Code review for LLM-specific and classic risks together.
12.6 How do you test code whose core behaviour comes from a non-deterministic model?
What they're testing: Layering deterministic tests and evals sensibly.
12.7 Implement a simple tool-calling loop for an agent. Walk me through the control flow.
What they're testing: Understanding the agent loop mechanics and its failure modes.
12.8 How do you prepare for the coding portion of an AI engineering loop?
What they're testing: A realistic preparation plan, often asked in screening calls.
12.9 Your team ships a lot of AI-generated code. What engineering practices keep quality up?
What they're testing: Team-level judgement about AI-assisted development.
12.10 How would you design the coding interview for AI engineers at your company?
What they're testing: Hiring judgement: what signal each format gives and how to keep it fair.
Ready to practise the answers?
You have seen all 120 questions. The AI Engineer Interview Kit is the same list with a worked answer for each, the likely follow-ups, and a 14-day plan that tells you which ones to practise out loud each day. Instant PDF download, 14-day refund.
New · $49AI Engineer Interview KitQuestions, worked answers and a 2-week prep plan for AI/LLM engineering interviewsGet the kit · $49Still deciding? Free sample: 12 questions with worked answers (PDF).