Skip to main content
Challenge

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.

Business OperationsHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

Build a type-safe dark store inventory demand forecasting agent using Pydantic AI with structured data validation.

Delivery guide

How work is evaluated

Evaluation

Evaluates stock replenishment logic and output JSON validation against Pydantic models.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

critical_stockout_prevention_test

Ensures critical stock level triggers an immediate reorder recommendation.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

type_compliance

Strict compliance with output Pydantic schema. • target: 1 • range: 0-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • 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 and assets

Reference links and supporting material

Dataset notes

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.

Evaluation checks
  • Ensures critical stock level triggers an immediate reorder recommendation.
  • Strict compliance with output Pydantic schema. • target: 1 • range: 0-1
Configured evaluation evidence
  • Benchmark: Supply Chain Operations Benchmark
  • Type Compliance target: 1
  • 1 public reference case
Configured runtime
  • Python execution harness
  • Python sandbox (unavailable on Versalist)

Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.

View technical recipe

Configured tools

Action Space
  • Pydantic AI · Required
  • Zed · Optional
  • BoTorch · Optional
Orchestration
  • 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

  1. 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.

Frequently Asked Questions about Design a Quick-Commerce Dark Store Demand Forecasting Engine using Pydantic AI