Skip to main content
Challenge

Type-Safe Senior Living Site Selection and Care Demand Agent with Pydantic AI

Senior living healthcare operators misallocate capital when site selection models fail to cross-validate local aging demographics and medical proximity. Build a type-safe agent using Pydantic AI to validate census projections and healthcare travel times. Ensure 100% structured type validation and accurate target demographic scoring.

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 Pydantic AI agent pipeline with Pydantic validation models to score target expansion locations for senior housing developments.

Delivery guide

How work is evaluated

Evaluation

Evaluates schema compliance and suitability score accuracy for senior housing site selection.

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_type_check

Verifies all required Pydantic model fields are present and correctly typed

Binary check

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

Dimension 2

suitability_precision

Precision of suitability score evaluation • target: 0.95 • 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 a type-safe agent using Pydantic AI (`pydantic_ai.Agent`) with structured output validation

  • Ingest zip-code level population demographics (age 75+ growth rate, median income)

  • Calculate healthcare access metrics (distance to nearest Grade-1 trauma hospital)

  • Output structured Pydantic models containing suitability score and bed capacity recommendations

Resources and assets

Reference links and supporting material

Dataset notes

Zip-code demographic data incorporating age 75+ cohort projections, median income, and healthcare facility distance.

Challenge setup

Evaluates schema compliance and suitability score accuracy for senior housing site selection.

Challenge input

JSON containing zip_code, senior_pop_75_plus, growth_rate_5yr, median_household_income, hospital_distance_miles

Pydantic AI

Type-safe Python agent framework with native Pydantic validation.

Evaluated output

JSON containing suitability_score, recommended_unit_count, care_type_priority

Evaluation checks
  • Verifies all required Pydantic model fields are present and correctly typed
  • Precision of suitability score evaluation • target: 0.95 • range: 0-1
Configured evaluation evidence
  • Benchmark: Type-Safe Site Selection Benchmark
  • Suitability Precision target: 0.95
  • 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
  • LiveKit · Optional
  • Ludwig · Optional
Orchestration
  • Pydantic AI · Required

Evaluation contract

  • schema_type_check · Weight 1
  • suitability_precision · Weight 1

Metrics

  • suitability_precision · Target 0.95

Benchmarks

  • Type-Safe Site Selection Benchmark
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON containing zip_code, senior_pop_75_plus, growth_rate_5yr, median_household_income, hospital_distance_miles

    Output: JSON containing suitability_score, recommended_unit_count, care_type_priority

    Execution harness: Python

Evaluation tools

  • Pydantic AI · agent_framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Type-Safe Senior Living Site Selection and Care Demand Agent with Pydantic AI