Design a Quick-Commerce Dark Store Demand Forecasting Engine using Pydantic AI
Baby-focused quick-commerce startup Peeko secured $7M to double its dark store network. Rapid 10-minute delivery models require precise hyper-local inventory management. In this challenge, you will implement a type-safe dark store replenishment engine using Pydantic AI. The system will validate streaming stock telemetry, predict localized product demand based on historic order velocity and regional demographics, and generate type-checked reorder schedules to prevent stockouts without over-allocating dark store shelf space.
What you are building
Build a type-safe dark store inventory demand forecasting agent using Pydantic AI with structured data validation.
How work is evaluated
Evaluates stock replenishment logic and output JSON validation against Pydantic models.
Datasets
Public datasets, plus the private datasets you have access to.
How submissions are scored
critical_stockout_prevention_test
Ensures critical stock level triggers an immediate reorder recommendation.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
type_compliance
Strict compliance with output Pydantic schema. • target: 1 • range: 0-1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
Learning goals
Define strict Pydantic schemas for quick-commerce inventory and sales telemetry.
Build Pydantic AI agents with dependency injection for dynamic store configuration.
Calculate 10-minute fulfillment window demand projections based on hourly velocity.
Output validated reorder triggers mapped directly to supplier ERP endpoints.
Resources
Hourly sales velocity data for high-turnover baby product SKUs across micro-fulfillment centers.
Challenge setup
Evaluates stock replenishment logic and output JSON validation against Pydantic models.
Challenge input
JSON object with dark_store_id, current_stock, sales_velocity_ph, lead_time_hours.
Pydantic AI
Required framework for building validated agent workflows.
Evaluated output
JSON object with reorder_recommended, recommended_units, urgency_level.
- Ensures critical stock level triggers an immediate reorder recommendation.
- Strict compliance with output Pydantic schema. • target: 1 • range: 0-1
- Benchmark: Supply Chain Operations Benchmark
- Type Compliance target: 1
- 1 public reference case
- Python execution harness
- Python sandbox (unavailable on Versalist)
Shows the first task, up to three tools, and up to three evidence items.
View technical recipe
Configured tools
- Pydantic AI · Required
- Zed · Optional
- BoTorch · Optional
- Pydantic AI · Required
Evaluation contract
- critical_stockout_prevention_test · Weight 1
- type_compliance · Weight 1
Metrics
- type_compliance · Target 1
Benchmarks
- Supply Chain Operations Benchmark
- general
Reference cases
- 1 public reference case
Workflow tasks
- Task 1
Input: JSON object with dark_store_id, current_stock, sales_velocity_ph, lead_time_hours.
Output: JSON object with reorder_recommended, recommended_units, urgency_level.
Execution harness: Python
Evaluation tools
- Pydantic AI · Type-Safe Agent Framework
Recipe freeze marker
No recipe freeze time is recorded.