AI Engineering from Scratch
Interviews
Questions and measured incidents for AI engineering interviews. Try each question first, then open the answer. Every answer links to the lesson that teaches it, and every number comes from a run that you can read in the repository.
- questions
- 42
- scenario
- 1
- cards
- 23
- role views
- 7
Foundations
The math, the networks and the transformer that every later answer builds on.
- FoundationsComing soon
Math and classical ML
Linear algebra, probability, optimization, and the classical models that still win on tabular data.
L1 0L2 0L3 0L4 00 of 15 planned - FoundationsComing soon
Deep learning
Backpropagation, losses, optimizers, initialization and how to debug a network that does not learn.
L1 0L2 0L3 0L4 00 of 15 planned - FoundationsComing soon
Transformers
Attention, positions, the transformer block, the KV cache and the cost of long context.
L1 0L2 0L3 0L4 00 of 15 planned - FoundationsComing soon
Tokenization, sampling and decoding
How text becomes tokens, how a model picks the next token, and how speculation makes decoding faster.
L1 0L2 0L3 0L4 00 of 15 planned
Models
How a model is tuned after training, served to users, and fit into GPU memory.
- ModelsComing soon
Post-training
Supervised tuning, preference tuning, LoRA and reinforcement learning on a trained model.
L1 0L2 0L3 0L4 00 of 15 planned - Models32 items
Inference and serving systems
Batching, the KV cache, prefix caching, schedulers and how to measure a serving engine.
L1 2L2 16L3 11L4 332 of 30 planned - Models10 items
GPU memory, quantization and hardware
Where GPU memory goes, how quantization frees it, and how work splits across GPUs.
L1 1L2 3L3 5L4 110 of 15 planned
Applications
Retrieval, prompts, structured output, evaluation and models that see and hear.
- ApplicationsComing soon
RAG
Chunking, hybrid retrieval, reranking and how to measure a retrieval pipeline.
L1 0L2 0L3 0L4 00 of 15 planned - ApplicationsComing soon
Prompting and structured output
Prompt design, context engineering, schemas, constrained decoding and function calls.
L1 0L2 0L3 0L4 00 of 15 planned - ApplicationsComing soon
Evaluation
Metrics, eval harnesses, judges, calibration and how to trust a score.
L1 0L2 0L3 0L4 00 of 15 planned - ApplicationsComing soon
Multimodal
How vision and language models join images and text, and how they are trained.
L1 0L2 0L3 0L4 00 of 15 planned
Agents
Agent loops, protocols, teams of agents, sandboxes and evidence from binaries.
- AgentsComing soon
Agents
The agent loop, tools, scope contracts, verification gates and why agents fail.
L1 0L2 0L3 0L4 00 of 15 planned - AgentsComing soon
Protocols: MCP, A2A and skills
How agents call tools and other agents, and how those calls stay safe.
L1 0L2 0L3 0L4 00 of 15 planned - AgentsComing soon
Multi-agent systems
Supervisors, handoffs, shared memory, consensus and the failure modes of agent teams.
L1 0L2 0L3 0L4 00 of 15 planned - AgentsComing soon
Sandboxes
Isolation for agents that run code or drive a computer, and the policy around it.
L1 0L2 0L3 0L4 00 of 15 planned - AgentsComing soon
Evidence and reverse engineering
Reading binaries, recovering intent, and stating confidence with the evidence for it.
L1 0L2 0L3 0L4 00 of 15 planned
Production
Operating a model service: releases, observability, cost, capacity and safety.
- ProductionComing soon
Production and MLOps
Observability, progressive delivery, A/B tests, chaos tests and on-call for model services.
L1 0L2 0L3 0L4 00 of 15 planned - ProductionComing soon
Cost and capacity
Caching, routing, batch APIs, cold starts and the cost of each request.
L1 0L2 0L3 0L4 00 of 15 planned - ProductionComing soon
Safety
Reward hacking, prompt injection, jailbreaks, refusals and safety gates.
L1 0L2 0L3 0L4 00 of 15 planned
Rounds
Whole interview rounds: system design, incidents, coding and behavioral questions.
- RoundsComing soon
System design
Design a model service end to end: requirements, data, model, serving, evaluation and cost.
L1 0L2 0L3 0L4 00 of 15 planned - Rounds1 item
Incidents and scenarios
Measured incidents from our manuals. Read the evidence one listing at a time and find the cause.
L1 0L2 0L3 1L4 01 of 30 planned - RoundsComing soon
Coding
Write the code that the lessons build. Each item links to a practice task with checks.
L1 0L2 0L3 0L4 00 of 15 planned - RoundsComing soon
Behavioral
Framing work, planning from evidence, delegation and turning feedback into a system.
L1 0L2 0L3 0L4 00 of 15 planned
All items
Each item has a prompt, a short answer, a full answer, follow-ups and the wrong answers that interviewers hear most.
- The two phases of one request
- Why 255 tokens per second is a slogan
- Cached tokens at zero with a stable template
- Choose tensor, pipeline or data parallelism
- How many users fit in the KV pool
- How speculative decoding keeps the output the same
- One token budget instead of two phases
- Read the GPU clock before the throughput
- Read three scheduler log lines
- Sleep, wake and weight updates for an RL loop
- Temperature zero gave two different answers
- The knee that the prefix cache hid
- Two clients, two numbers, one server
- What an FP8 KV cache buys and costs
- What many LoRA adapters cost one server
- Why one ID at the top of a prompt kills the cache
- Why the KV cache is a pool of 16-token blocks
- Why the shared part of the prompt goes first
- A larger token budget at low load
- Acceptance by draft position, tokens per pass
- An admission cap decides who waits
- Pick a concurrency cap when throughput keeps rising
- Pick the EAGLE3 draft depth for your concurrency
- Should the prefill chunk be smaller
- Speculation won the benchmark and lost in production
- Two data-parallel copies, less output than one card
- What determinism costs a live server
- When an FP8 checkpoint pays
- When prefill-decode disaggregation pays
- A split-server benchmark that counted empty answers
- Design a chat service on a fleet of L4 cards
- Same throughput, two choices at a full pool
- The model is 35 GB now, so it fits
- Count the KV bytes per token from the config
- Pick a 4-bit format for a 14B model on 24 GB
- Why an 8B model fails to start on a 24 GB card
- Pick the memory fraction on unified memory
- Split the model or copy it across two cards
- The FP8 KV scales that never loaded
- The pool was 95 percent empty and the server died
- Why FP8 grew the pool 4.77 times and not 2
- Eight copies of the same KV cache
- More load gave a faster first token
No item matches these filters.
How to use the bank
- Read the prompt and answer it aloud or on paper before you open anything.
- Open the short answer, then the full answer. Compare the reasoning, not only the result.
- Answer the follow-ups one at a time. They rise in level.
- Read the wrong answers. Each one is a mistake that sounds right.
- In a scenario, read the evidence one listing at a time and commit to a cause before you open the resolution.
To practise with a coding agent, clone the repository: the files are in interviews/.