Skip to main content
Loading navigation

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

What you are building

Develop a type-safe Pydantic AI agent pipeline with Pydantic validation models to score target expansion locations for senior housing developments.

How work is evaluated

Evaluation

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

Datasets

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

How submissions are scored

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

  • 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

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)

Shows the first task, up to three tools, and up to three evidence 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