AI Engineering, Explained by Magic. Rahul Parwal
{{ starLayer }} {{ sparkleLayer }}
spells learned  {{ learned }} / 7
{{ soundLabel }}
{{ ico.hat }}{{ housePicker }}
← back
{{ hintText }}
{{ ico.wand }}
AI Engineering,
Explained by Magic
Seven spells, one map. From your first wand to thinking like a system designer. No Muggle prerequisites.
Rahul Parwal
platform 9¾ · the crossing
Most of us were raised by Muggles
Harry spent eleven years with the Dursleys before he knew magic was real. Most engineers meet AI the same way.
{{ ico.gear }}
The Muggle World
software engineering
Machines are literal. add(2, 3) is 5, forever.
Same input, same output. A test passes or it fails.
Dependable. Predictable. Entirely without magic.
{{ ico.bolt }}
The Wizarding World
ai engineering
Magic responds to you. Wording and context shape the result.
The same spell never lands the same way twice.
Non-deterministic. That one fact reshapes everything you build.
This map is how a Muggle-born learns magic properly.
{{ ico.wand }}
node 1 · the {{ g.llm }}
The Wand Chooses the Wizard
Everything you build stands on one thing: the large language model, or LLM.
Start here, before any framework or tool. No PhD required.
Harry never chose the holly-and-phoenix wand. It chose him. Which wand fits the task sets what your system can do, what it costs, and how fast it runs.
{{ ico.wandshop }}
At Ollivanders
Every wand a different core. Every model a different training.
in the real world
{{ ico.flame }}
Dragon heartstring
code & duels
{{ bm.claude }}{{ bm.mistralai }}
{{ ico.feather }}
Phoenix feather
deep reasoning
{{ bm.deepseek }}GPTOpenAI
{{ ico.horn }}
Unicorn hair
long context
{{ bm.googlegemini }}
{{ ico.sprig }}
Willow, ten inches
small, fast, cheap
{{ bm.meta }}{{ bm.qwen }}{{ bm.ollama }}
{{ ico.elderwand }}
The Elder Wand
mighty, slow, costly
whatever tops the board this month
{{ ico.wandshop }}
the fitting · try before you buy
Every Ollivanders Wand, Tried
a client's brief
40,000 support tickets. Answers back in under a second. Nothing may leave their own servers.
{{ fitCards }} {{ fitAnswer }}
node 2 · making it useful
A Wand Alone Is Not a Wizard
Every AI product is one LLM wrapped in three things.
{{ ico.owl }}
tools
Owls & the Floo Network
The wand only knows what it learned at school. Tools are its owls: they fly out and come back with answers.
{{ owlFlight }}
{{ ico.modelcontextprotocol }}
{{ g.mcp }} is the Floo Network.
{{ ico.bookopen }}
knowledge
The Hogwarts Library
Your world is invisible to the model. {{ g.rag }} is an open-book exam, against a library you stock.
Retrieval: Madam Pince fetches the book. Generation: you answer with it open.
What you don't shelve matters too.
real world pgvector Qdrant Pinecone
{{ ico.pensieve }}
memory
The Pensieve
Every new chat is a fresh Obliviate. Short-term is the conversation. Long-term is the vials you keep.
Semantic: facts about a person. Episodic: specific events.
real world summary buffer user profile
{{ ico.wand }}+{{ ico.owl }}+{{ ico.bookopen }}+{{ ico.pensieve }}=
an AI Agent. What must it do, know, and remember?
{{ ico.scroll }}
node 3 · proving it works
Evals Are Your O.W.L. Exams
Ask it once and it looks fine. Ask it again and you get something else. So you set a paper, and you mark it.
{{ ico.quill }}
The Lockhart Problem
confident · charming · wrong
"Can I claim a bereavement refund after I've flown?"
one question, asked twice
run one
"Yes - just apply within 90 days of travel."
invented. no such rule.
run two
"No - it has to be arranged before you fly."
the actual policy.
Air Canada's chatbot gave the left-hand answer to a real passenger, who booked on it, sued, and won.
ordinary wizarding level
Mark Sheet · Refund Answers
{{ ico.checklist }}
the rubric · what every answer must do
Quotes the policy it is answering from 20 / 20
Says "I don't know" instead of guessing 20 / 20
Never invents a rule that does not exist 0 / 20
P
Poor · 40 / 60
Two out of three were fine. The paper still fails - and now you know the exact line to fix.
grades
O
Outstanding
E
Exceeds
A
Acceptable
P
Poor
D
Dreadful
T
Troll
{{ ico.hat }}
Who marks 60 answers a day?
Snape does, without mercy. LLM-as-judge: one model grades another's answers against your rubric.
{{ ico.star }}
Writing the rubric is the craft
What must it always do? What must it never do? The rest is bookkeeping.
real world {{ ico.claude }}{{ ico.googlegemini }}{{ ico.deepseek }} the judge is just another model
{{ ico.users }}
node 4 · scaling up
When One Wizard Isn't Enough
Multi-agent systems are Dumbledore's Army. Powerful, and summoned far too often.
{{ ico.sword }}Specialisation
One wizard juggling every skill gets sloppy.
Split it like the trio: Hermione researches, Ron drafts, Harry stress-tests.
real world {{ ico.langchain }} LangGraph CrewAI AutoGen
{{ ico.broom }}Parallelisation
Some work needn't happen one step at a time.
Five searches? Send five of the Army at once. Faster, and sharper.
{{ fanOut }}
real world fan-out map-reduce async batch
{{ ico.warning }} The trap: summoning an army the moment one agent struggles.
one wizard
{{ ico.wand }}
1 way to fail
the whole army
summoned on reflex
{{ ico.users }} {{ ico.users }} {{ ico.users }} {{ ico.users }} {{ ico.users }}
5 agents · 4 handoffs 9 ways to fail
The Room of Requirement only appeared when they truly needed it. Apply the same test before you summon a second agent - often the fix is a better prompt, or a better eval.
{{ ico.snake }}
node 5 · defence against the dark arts
He Who Must Not Be Named
Ship it and two things go wrong: the spell misfires, or someone bends it.
{{ ico.pensieve }}
The Mirror of Erised
when the spell misfires
{{ ico.quill }}Erisedhallucination · fluent, invented
{{ ico.flame }}Amortentiasycophancy · agrees because you pushed
{{ ico.compass }}Confunduscontext drift · long threads lose instructions
{{ ico.hat }}Pure-blood prejudicebias · the data's blind spots
Nobody attacked you. Lockhart wandered back in.
{{ ico.skull }}
The Dark Lord's Playbook
when someone bends it
{{ ico.swirl }}Imperiusprompt injection · hidden instructions take over
{{ ico.mask }}Polyjuicejailbreaks · rules talked around
{{ ico.eye }}Legilimencydata theft · secrets coaxed out
real world OWASP LLM Top 10
{{ ico.shield }}
Protego · The Guardrails
what you build instead
A guardrail is a rule the model cannot talk past.
{{ ico.funnel }}Validate in, filter out
{{ ico.bookopen }}Ground and cite · no source, no claim
{{ ico.key }}Least privilege · only the wands it needs
{{ ico.users }}Human in the loop · spends, sends, refunds, deletes
{{ ico.checklist }}Audit every tool call
The model is never the last line of defence.
{{ ico.map }}
node 6 · life after launch
The Classroom Is Not the Battlefield
An AI product is built once, then improved every day in production.
McDonald's AI drive-thru aced the lab. Real life brought accents, traffic noise, three orders from one car.
Monitoring is your Marauder's Map. "I solemnly swear I am watching production." Every footstep, live.
The AI Ops Cycle
{{ ico.compass }} Design
{{ ico.gear }} Build
{{ ico.scroll }} Evaluate
{{ ico.rocket }} Ship
{{ ico.eye }} Monitor
{{ ico.cycle }} Feed signals back. Repeat.
The Marauder's Map
real world LangSmith Langfuse OpenTelemetry
mischief managed
no monitoring
? ? ?? ? ?? ? ?? ? ?? ? ?
{{ trailGhost }}
answer ✓ and nothing else
i solemnly swear
traced, every footstep
{{ ico.quill }}prompt {{ ico.bookopen }}retrieval {{ ico.wand }}model {{ ico.owl }}tool call {{ ico.scroll }}answer
{{ trailLive }}
answer ✓ wrong tool · 3 retries · 4.2 s
{{ ico.book }}
node 7 · thinking
"Books! And Cleverness!
There Are More Important Things."
- Hermione Granger
Anyone can spin up an agent in thirty minutes. The skill that compounds is system design, a grand name for thinking.
{{ ico.wand }}Which wand?
{{ ico.owl }}Which owls, books, vials?
{{ ico.scroll }}What does good mean here?
{{ ico.sword }}Do you truly need an army?
That judgment separates wizards from wand-owners.
mischief managed
The Whole Map, Assembled
{{ ico.wand }}1 · The Wand LLM
2 · The Kit {{ ico.owl }}Tools {{ ico.bookopen }}RAG {{ ico.pensieve }}Memory
{{ ico.scroll }}3 · O.W.L.s Evals
{{ ico.bolt }}The AI Agent
{{ ico.users }}4 · The Army Multi-agent
{{ ico.snake }}5 · Defence Syndromes · Attacks · Guardrails
{{ ico.map }}6 · Marauder's Map Production
{{ ico.book }}7 · Thinking System Design
the same map, in muggle tools {{ bm.claude }}{{ bm.googlegemini }}{{ bm.meta }}{{ bm.mistralai }}{{ bm.deepseek }}{{ bm.qwen }}{{ bm.ollama }}{{ bm.modelcontextprotocol }}{{ bm.langchain }} the names churn. the map doesn't.
Stop memorising roadmaps. Learn the map once, and you'll know how to build with whatever drops next.
Rahul Parwal