Learn by Directing AI
Unit 1

Max's Problem

Step 1: Set up the project

Open a terminal, navigate to your dev directory, and start Claude Code.

cd ~/dev
claude

Paste this setup prompt:

Create the folder ~/dev/ml/p8. Download the project materials from https://learnbydirectingai.dev/materials/ml/p8/materials.zip and extract them into that folder. Read CLAUDE.md -- it's the project governance file.

Claude downloads the materials, extracts them, and reads the governance file. Once it finishes, you have a project workspace with transaction data, product metadata, customer profiles, and a DVC configuration template.

Step 2: Read Max's message

Max reached out on Slack. He sends several rapid-fire messages -- that is his style.

Stoffwechsel is an online marketplace for sustainable fashion in Berlin. About 2,000 products from 85 brands. The catalog rotates constantly with seasonal collections, new designers, and products going out of stock.

His recommendation system shows "other people bought this." It has not changed in three years. The recommendations are always stale. His merchandising team wants to know what drives the recommendations. And he wants to know if they actually work -- not just clicks, but purchases people keep.

He has data. Three years of transactions, product metadata, customer profiles. He is ready to share everything.

Step 3: Talk to Max

Open a chat with Max. His initial messages give you the headline -- stale recommendations, merchandising team wants transparency, needs to know if recs work. But the details are missing. Those details will shape the entire project.

Ask about his data. How is it structured? How does the product catalog change over time? What happens when a seasonal item comes back next year? What about fulfillment -- are all products shipped the same way? Are there any availability restrictions?

Max is enthusiastic and talks fast. When you ask the right questions, he reveals critical information. The product IDs get recycled across seasons -- the same dress comes back with different materials but keeps the same ID. About 15% of products are made to order with longer lead times. Some brands have exclusivity windows for email subscribers. These are not edge cases. They will determine how you build the feature pipeline.

Step 4: Profile the data

Before designing anything, understand what you have. Ask Claude to profile the three datasets: materials/transactions.csv, materials/products.csv, and materials/customers.csv.

Look at the transaction data first. 15,000 records spanning three years. Purchases, browsing, wishlists, returns. Check the event type distribution. Look at the temporal pattern -- when do people buy?

Then the product metadata. 800 rows. But look carefully at the product IDs. Some appear more than once. Sort by product_id and compare the rows. The same ID shows up with different seasons, different materials, different prices. This is the product ID recycling Max mentioned. If you build features using product_id as a unique key, those features will conflate different products.

Then the customer profiles. 2,000 customers across Europe, mostly Germany. Sustainability preferences, purchase history, category affinity. This feeds the recommendation model.

Step 5: Plan the work

Use plan mode in Claude Code. Ask Claude to plan the full project decomposition: what needs to be built, in what order, and why each piece depends on the ones before it.

AI will produce a complete-looking plan from the brief. It will cover features, modeling, evaluation, monitoring. It may look thorough. Read it critically. Does it account for the recycled product IDs? Does it separate feature computation from model training? Does it plan for the fact that recommendation quality cannot be measured immediately -- purchases take days to confirm, returns take weeks?

Completeness does not mean correctness. The plan should identify at least four phases with dependency reasoning: feature pipeline first (because the model depends on features), then evaluation design (because you define "good" before building), then monitoring (because monitoring checks what the system produces), then verification and delivery.

✓ Check

Check: The plan identifies at least four work phases with dependency reasoning, and the data profiling reveals the product ID recycling issue.