The Brief
Valentina Reyes exports specialty coffee from twelve farms in Huila, Colombia. Direct relationships with roasters in Europe, Japan, and the US. Every six months she commits to contracts based on gut feeling and last year's harvest numbers. Last year she was short by 20-30% on an order to Copenhagen and had to buy from another exporter at a premium.
She has two years of daily sensor data from all twelve farms -- temperature, rainfall, soil moisture, humidity -- plus harvest records. She wants predictions per farm for the upcoming harvest, accurate enough to commit contracts against.
Your Role
You're building a yield prediction model from Valentina's sensor data. The data has temporal structure -- daily readings across seasons, with weather patterns during flowering and cherry development driving yield. The model needs to predict yield per farm using sensor patterns, not just repeat last year's numbers.
You direct Claude Code through the data pipeline and model training. This time you'll make more decisions on your own: which features to construct, how to evaluate the model, how to handle data that doesn't fit the pattern. An evaluation design template gives you structure, but you fill it with judgment.
What's New
Last time you built infrastructure around an existing model -- input validation, health checks, versioning, experiment tracking. The data and training were familiar territory from P1-P2.
This time the terrain shifts back to data and training, but harder. The data has temporal ordering that creates a trap: if the model accidentally sees future information during training, the metrics look excellent and the predictions are worthless. You'll also make the jump from scikit-learn's one-line .fit() to a PyTorch training loop where you control every step -- forward pass, loss computation, gradient updates. AI generates code for both that looks correct. The errors are invisible without understanding what the code should do.
Tools
- Python / pandas -- data processing and feature engineering
- scikit-learn -- preprocessing and Pipelines (familiar, new depth)
- PyTorch -- neural network training (new)
- Jupyter notebooks -- exploration and training
- MLflow -- experiment tracking (familiar, deepened)
- Claude Code -- AI direction
- Git / GitHub -- version control
Materials
You receive:
- Valentina's email describing the prediction problem and her contract timeline
- Two datasets: daily sensor readings from twelve farms and harvest records per farm per season
- An evaluation design template (you fill it with your metric choices and rationale)
- A ticket breakdown covering the data pipeline, model training, and delivery
- A project governance file (CLAUDE.md)