InterviewKata
AI engineering · Revise in 10 minutes

Cheat sheet: AI engineering

Every module on one page: its memory hook and the points worth saying out loud. Print it (Ctrl/⌘ P) and re-read it before a practice session; open the page behind any card when something doesn't come back to you. Built automatically from the pages, so it always matches them.

Level 1 · How AI works

01

Tokens and prediction

“A very well-read autocomplete”

It predicts the next token, adds it, and predicts again. Brilliant at plausible, not a database of truth.

Avoid
  • Trusting specific facts without a source
  • Counting words instead of tokens
  • Judging from one run
02

The context window

“The desk, not the library”

The model works only from what's on its desk right now. The desk is a fixed size, clutter makes it worse, and it's cleared between sessions.

Avoid
  • One endless session
  • Pasting whole files and full logs
  • Connecting every MCP server "just in case"
03

Training and hallucination

“Closed book guesses, open book cites”

From memory alone, a model fills gaps with plausible guesses. Give it the source and ask it to cite, and you can check every claim.

Avoid
  • Asking for citations and not opening them
  • Asking "are you sure?"
  • Using a model for recent facts without search
04

Reasoning, tiers and cost

“Three dials on the bill: tier, effort, tokens”

Every quality, speed and cost decision is one of three dials. Start low and raise one dial at a time, only when the result isn't good enough.

Avoid
  • Maximum effort on everything
  • Forgetting thinking tokens in estimates
  • Comparing vendors' price lists directly

Level 2 · Working with AI

05

Prompting and context

“Brief it like a brilliant new hire”

Assume skill, not context. Give the goal, the context, the constraints with reasons, an example, the format and what "done" means.

Avoid
  • No definition of done
  • Rules without reasons
  • Shouting
06

Tools and function calling

“The model writes the order; your code cooks”

The model only ever produces a precise request. Your code decides whether to run it, runs it, and brings back the result.

Avoid
  • Authorisation in the prompt instead of the tool
  • Vague names and descriptions
  • Dumping huge results
07

Agents: the loop

“Act, look, decide: a loop on a leash”

An agent repeats three moves until the goal is met. The leash (a definition of done, budgets, permissions and you) decides how far it may run.

Avoid
  • Full autonomy on your own machine
  • No definition of done
  • Using an agent for a fixed process
08

The agentic coding workflow

“Map, plan, slice, prove”

Understand before changing, agree before building, change in small steps, and never merge without evidence.

Avoid
  • Merging on the agent's word
  • Skipping the spec
  • Giant diffs

Level 3 · Configure your tools

09

Instructions and memory

“Leave a note on the desk”

The agent forgets everything overnight. AGENTS.md is the short note that's on the desk every morning: commands, layout, rules with reasons, and the traps you've hit.

Avoid
  • Secrets in instruction or memory files
  • Instructions that grow forever
  • Rules without reasons
10

MCP

“USB-C for AI tools”

One standard plug. Build or install a server once, and it works in every tool that speaks MCP. Like any device you plug in, check what it can do before trusting it.

Avoid
  • Production write access
  • Secrets written into config files
  • Connecting everything
11

Agent Skills

“Recipe cards in a drawer”

Every skill's title is visible; the full recipe comes out only when that dish is ordered. Write the title so the right card gets pulled, and the recipe so it ends with a taste test.

Avoid
  • Running unreviewed skills
  • Vague descriptions
  • A wall of prose
12

Subagents, hooks, plugins

“Specialists think, guards enforce, kits share”

Subagents take on focused work in their own context. Hooks enforce rules no prompt can bend. Plugins hand the whole setup to your team in one install.

Avoid
  • Installing plugins without reading them
  • Loose hook patterns
  • Subagents with too many tools
13

Automation and CI

“Every robot gets its own key card”

Headless agents run with no one watching, so each job gets only the doors it needs, and a person keeps the key to main.

Avoid
  • Write tokens on jobs that read untrusted text
  • Letting automation merge or deploy
  • No budget or timeout

Level 4 · Build AI features

14

Model APIs and structured output

“Ask for a form, not a letter”

When your code needs data, give the model a schema to fill in, then check the form before you file it.

Avoid
  • API keys in client-side code or repositories
  • Ignoring the stop reason
  • Trusting structured output for business rules
15

Embeddings and RAG

“Index, fetch, cite”

Prepare the library once, fetch the few right pages for each question, and make every answer point to its page.

Avoid
  • Retrieving what the user isn't allowed to see
  • Embeddings only
  • Chunks without context
16

Building agents and MCP servers

“Brain, hands, loop, leash”

Every agent is a model that thinks, tools that act, a loop that repeats, and limits that keep it safe. Leave out the leash and it isn't ready to ship.

Avoid
  • No turn or cost limit
  • Permissions in the prompt
  • Too many thin tools

Level 5 · Production

17

Evals

“Read, name, check”

Read real outputs. Name the failures you see. Check for each one, pass or fail, on every change.

Avoid
  • Trusting an unchecked judge
  • Starting with metrics instead of reading
  • 1–5 scores
18

Security

“Secrets, strangers, exits: never all three”

Private data, untrusted content, and a way out. Any agent with all three can be turned against you, so every task drops at least one.

Avoid
  • Security by prompt
  • Skip-all-approvals mode on your own laptop
  • Installing MCP servers, plugins and skills without reading them
19

Cost, latency, observability

“Trace it, price it, trim it”

Record every call. Put a price on every feature and customer. Then pull the levers that the data points to.

Avoid
  • No spend limits
  • Breaking the cache by accident
  • Averages only
20

Choosing tools, staying current

“Own tasks, own scores, primary sources”

Judge tools on your own work, with criteria you set in advance, and learn about changes from the people who ship them.

Avoid
  • Choosing by leaderboard
  • Unfair trials
  • Learning from hype channels

Level 6 · Lead the team

21

Leading your team's AI adoption

“One phase ahead, setup in the repo, outcomes over usage”

Learn it before you teach it, commit what the team shares, and judge the rollout by the work it produces.

Avoid
  • Mandating a tool before anyone has used it
  • Measuring usage
  • Private setups

Case studies

C01

A repository set up for agents

Lessons
  • Write the reason, and the failure, with the rule
  • Scripts enforce what prose can't
  • Load long know-how only when needed
  • Hooks don't care who commits