practice
Write the code. Pass the tests.
Every problem runs real Python in your browser and checks it against test cases, some of them hidden until you submit. Pick a track and work down it. Each one goes from easy to hard.
243 problems in 12 tracks
start here
Build an Agent, in 12 stages
You write the program behind every AI agent, one piece at a time, and each stage starts from the code of the stage before. The model is scripted, so your tests are exact. Stage 1 is right here: make the four visible cases pass, then submit to run the hidden ones.
- 01Parse a Tool Call From Model Output
- 02Validate Tool Arguments Against a Schema
- 03Dispatch Tool Calls Without Crashing the Agent
- 04The Agent Loop
- 05Recover From Malformed and Failing Tool Calls
- 06Guardrails: Loop Detection and Token Budgets
- 07Trim Context Without Orphaning Tool Results
- 08Parallel Tool Calls With IDs
- 09Long-Term Memory Recall
- 10Plan-and-Execute With Dependencies
- 11Evaluate Your Agent
- 12Capstone: A Production Agent Loop
All tracks
- 01Build an AgentWrite a tool-using agent from scratch, one piece per problem: parsing, dispatch, the loop, guardrails, memory, planning, evals.Intermediate
12 problems - 02Specify, Verify, DebugThe work left when an agent writes the code: turn requests into tests, debug production failures, measure LLM output, and decide what ships.Intermediate
12 problems - 03Python for AIThe everyday Python behind data and model code: dicts, nesting, text, caches and small parsers.Beginner
19 problems - 04NumPy & Data WranglingScaling, encoding, splitting and reshaping data the way training pipelines actually need it.Beginner
18 problems - 05Math for MLVectors, matrices, probability and optimisation, each implemented by hand so the formulas stop being abstract.Beginner
18 problems - 06Classical ML from ScratchRegression, trees, k-means, naive Bayes, SVMs and the metrics that tell you whether any of it worked.Intermediate
21 problems - 07Neural Networks by HandForward passes, backprop, optimisers, convolutions and recurrent cells, the pieces inside every framework.Intermediate
24 problems - 08Inside an LLMAttention, masks, positional encodings, sampling, the KV cache and the tricks that make inference fast.Intermediate
22 problems - 09RAG & RetrievalChunking, vector search, hybrid ranking, re-ranking and the checks that catch an ungrounded answer.Intermediate
21 problems - 10Agents in ProductionWhat surrounds the loop: MCP plumbing, caching, fallbacks, security checks, graphs and observability.Advanced
24 problems - 11ML Systems & MLOpsTraining schedules, drift, rollouts, experiments and the arithmetic of serving models.Advanced
14 problems - 12Coding Interview PatternsThe classic patterns interviews still test: hashing, two pointers, windows, stacks, trees, graphs and DP.Intermediate
38 problems