Challenge

Trial Eligibility Engine for Anti-Inflammatory Drugs using Pydantic AI

Matching heart disease patients with anti-inflammatory clinical trials requires strict eligibility verification across EHR datasets. Developers will construct a Pydantic AI agent that parses OMOP CDM records, validates IL-6 pathway biomarker thresholds, and outputs validated trial eligibility decisions with full type enforcement.

Data ScienceHosted by Vera
Challenge brief

What you are building

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

Build a Pydantic AI agent to parse OMOP structured health records and evaluate clinical trial criteria for heart disease drugs.

Delivery guide

How work is evaluated

Evaluation

Evaluates Pydantic output validation compliance, inclusion decision precision, and criterion checks.

Datasets

Shared data for this challenge

Review public datasets and any private uploads tied to your build.

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

pydantic_schema_strict_test

Validates that the output strictly adheres to Pydantic schema without type errors.

Binary check

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

Dimension 2

eligibility_accuracy

Accuracy of trial eligibility determination against expert ground truth. • 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

  • Define strict Pydantic schemas for patient health profiles and trial criteria.

  • Implement a Pydantic AI agent with dependency injection for database lookups.

  • Parse OMOP Common Data Model patient tables to evaluate IL-6 biomarker levels.

  • Output type-safe trial inclusion/exclusion decision objects with justification logs.

Resources and assets

Reference links and supporting material

Dataset notes

Structured OMOP CDM database tables containing patient demographics, cardiovascular diagnoses, and inflammatory bio-markers.

How this agent runs

Evaluates Pydantic output validation compliance, inclusion decision precision, and criterion checks.

Challenge input

JSON containing OMOP patient clinical record.

Pydantic AI

Guarantees runtime validation and structural type safety for LLM responses.

Evaluated output

JSON strictly matching Pydantic schema for TrialEligibilityResult.

Checks for
  • Validates that the output strictly adheres to Pydantic schema without type errors.
  • Accuracy of trial eligibility determination against expert ground truth. • target: 0.95 • range: 0-1
Proof of success
  • Benchmark: Clinical Trial Matching Benchmark
  • Eligibility Accuracy target: 0.95
  • 1 public reference case
Runtime evidence
  • Python execution harness
  • Python sandbox (unavailable on Versalist)
View technical recipe

Configured tools

Action Space
  • Pydantic AI · Required
  • Upstage · Optional
  • Haize Labs · Optional
Orchestration
  • Pydantic AI · Required

Evaluation contract

  • pydantic_schema_strict_test · Weight 1
  • eligibility_accuracy · Weight 1

Recipe state

This is a preview. The configuration can change before the evaluation recipe is locked.

Frequently Asked Questions about Trial Eligibility Engine for Anti-Inflammatory Drugs using Pydantic AI