← Mastery

Interview questions

58 questions in six levels. Answer aloud before revealing the outline; the outline lists what a strong answer covers, not a script.

Level 1: Explain concepts

  • If a model only predicts the next token, how can it answer multi-step questions?

    Topic
  • Why might the same prompt cost different amounts in two languages?

    Topic
  • Attention vs MLP: what does each do that the other cannot?

    Topic

Level 2: Trace tensors

  • What is the parameter count of Qwen3-8B's embedding table, and why is it separate from the LM head?

    Topic
  • Why can a linear probe at layer 20 find information that was computed at layer 5?

    Topic
  • Is RMSNorm(x + c) equal to RMSNorm(x)? Is RMSNorm(3x)?

    Topic
  • Why are Qwen3's K and V projections a quarter the size of Q?

    Topic
  • Walk through attention for one token in one Qwen3 block, with shapes.

    Topic
  • What is the gradient of cross-entropy with respect to the logits, and why is it convenient?

    Topic
  • What exactly happens to one token inside one Qwen transformer block?

    Topic

Level 3: Compare architectures

  • Why does GQA reduce KV-cache memory, and what does it not reduce?

    Topic
  • Why does RoPE encode relative position even though each vector is rotated by its absolute position?

    Topic
  • Why is attention quadratic in sequence length, and what does a KV cache change?

    Topic
  • Why do pre-norm transformers train more stably than post-norm ones at depth?

    Topic
  • Why does deduplication matter for both quality and privacy?

    Topic
  • You have a fixed compute budget. How do you choose model size and token count?

    Topic
  • Estimate the training memory for an 8B model with AdamW in mixed precision.

    Topic
  • PPO vs DPO: what is the practical difference?

    Topic
  • Why is B initialised to zero in LoRA?

    Topic
  • Why do MoE models have high memory needs but modest per-token compute?

    Topic
  • Why is decoding usually memory-bandwidth-bound?

    Topic
  • How would you reduce hallucinations in a support bot?

    Topic
  • Your agent has a fetch_url tool. How do you stop SSRF?

    Topic
  • What is the difference between model extraction and training-data extraction?

    Topic
  • Compare dense and MoE models for serving cost.

    Topic

Level 4: Debug systems

  • What does the logit lens tell you, and what can it not tell you?

    Topic
  • Why should a red-team report give an attack success rate rather than a single transcript?

    Topic
  • A new model beats yours on a public benchmark. What do you check before switching?

    Topic
  • How does GRPO differ from PPO as used in RLHF?

    Topic
  • Why did paged attention increase serving throughput?

    Topic
  • Why does INT4 weight quantization speed up decoding more than prefill?

    Topic
  • What does a successful linear probe tell you, and what does it not tell you?

    Topic
  • Why are individual neurons often hard to interpret?

    Topic
  • Why can't a system prompt alone prevent prompt injection?

    Topic
  • Why would an LLM API restrict top-k log-probabilities?

    Topic
  • What does the MCP specification guarantee about security?

    Topic
  • Debug: generation got 4x slower after switching a model from GQA to MHA at long context. Why?

    Topic

Level 5: Threat-model an AI application

  • What is the difference between data poisoning and memory (context) poisoning?

    Topic
  • What can go wrong when an agent connects to a third-party MCP server?

    Topic
  • How would you test whether a direction found by a probe is used by the model?

    Topic
  • Map the CIA triad onto a customer-support chatbot with retrieval.

    Topic
  • Threat-model an agent with email access.

    Topic
  • Give one model-level, one application-level and one infrastructure-level risk for a deployed RAG assistant.

    Topic
  • What is the difference between data poisoning and context poisoning?

    Topic
  • How would you red-team an agent with email access?

    Topic
  • How do you decide the severity of a prompt-injection finding?

    Topic
  • How could indirect prompt injection reach a tool-enabled agent?

    Topic
  • Threat-model a coding agent with shell access.

    Topic

Level 6: Design defenses

  • How would you secure a RAG system containing private documents?

    Topic
  • What controls would you put between an LLM and a destructive tool?

    Topic
  • How would you evaluate a jailbreak guardrail?

    Topic
  • How would you secure a RAG system containing private documents?

    Topic
  • An LLM generates SQL for analytics. How do you make that safe?

    Topic
  • Design limits for a public agent endpoint.

    Topic
  • How do you safely add a third-party model and an MCP server to a product?

    Topic
  • Design a safe long-term memory feature.

    Topic
  • Why can't a guardrail model alone secure an agent?

    Topic
  • Design defenses for an agent that can read customer records and issue refunds.

    Topic