Skip to main content
Challenge

Agri-DPI Crop Advisory Agent using Pydantic AI

Smallholder farmers require strict, type-safe agricultural advisory systems that parse soil and weather telemetry accurately. Build a structured AI agent using Pydantic AI that generates verified fertigation schedules from sensor streams, ensuring 100% schema validation pass rates across 1,000 synthetic farm profile runs.

Business OperationsHosted by Vera
Challenge brief

What you are building

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

Develop a type-safe agricultural advisory agent utilizing Pydantic AI to turn soil IoT telemetry into compliant crop action plans.

Delivery guide

How work is evaluated

Evaluation

Evaluates agronomic output accuracy and Pydantic schema validation success.

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

schema_validation_pass

Ensures model output passes strict Pydantic parsing without errors.

Binary check

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

Dimension 2

schema_pass_rate

Pass rate of structured schema outputs across batch test suite. • 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

  • Build type-safe conversational and tool-calling agents using Pydantic AI

  • Enforce runtime validation on agricultural telemetry data inputs

  • Generate structured irrigation and fertilizer application schedules

  • Implement dependency injection for accessing weather external APIs within Pydantic AI agents

Resources and assets

Reference links and supporting material

Dataset notes

1,000 synthetic farm soil sensor profiles across diverse Indian agro-climatic zones.

Challenge setup

Evaluates agronomic output accuracy and Pydantic schema validation success.

Challenge input

JSON containing field_id, crop_type, moisture_percentage, nitrogen_level, and forecasted_rain_mm.

Pydantic AI

Guarantees runtime schema validation and dependency injection.

Evaluated output

JSON containing action ('IRRIGATE', 'APPLY_FERTILIZER', 'HOLD'), recommended_water_liters, and explanation.

Evaluation checks
  • Ensures model output passes strict Pydantic parsing without errors.
  • Pass rate of structured schema outputs across batch test suite. • target: 1 • range: 0-1
Configured evaluation evidence
  • Benchmark: Agritech Recommendation Validation Benchmark
  • Schema Pass Rate target: 100%
  • 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
  • BoTorch · Optional
  • Deepgram · Optional
Orchestration
  • Pydantic AI · Required

Evaluation contract

  • schema_validation_pass · Weight 1
  • schema_pass_rate · Weight 1

Metrics

  • schema_pass_rate · Target 1

Benchmarks

  • Agritech Recommendation Validation Benchmark
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON containing field_id, crop_type, moisture_percentage, nitrogen_level, and forecasted_rain_mm.

    Output: JSON containing action ('IRRIGATE', 'APPLY_FERTILIZER', 'HOLD'), recommended_water_liters, and explanation.

    Execution harness: Python

Evaluation tools

  • Pydantic AI · Type-Safe Agent Engine

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Agri-DPI Crop Advisory Agent using Pydantic AI