Skip to main content
Challenge

Pydantic AI Type-Safe Reinsurance Broker Matching Engine

Willis Re's acquisition of BMS Re US highlights expansion in specialized treaty broking. Build a type-safe Python agent using Pydantic AI to match cedent primary insurers with optimal reinsurance treaties while guaranteeing strict runtime schema compliance for financial structures.

Machine LearningHosted by Vera
Challenge brief

What you are building

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

Build a type-safe reinsurance treaty matching engine using Pydantic AI to validate financial transaction schemas.

Delivery guide

How work is evaluated

Evaluation

Validates schema adherence and quantitative accuracy of treaty matching agent.

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

pydantic_validation

Ensures response successfully parses into Pydantic model without error

Binary check

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

Dimension 2

schema_match_rate

Percentage of agent executions passing schema validation on first try • target: 0.98 • 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 Reinsurance Treaty terms (attachment points, exhaustion limits, ceding commissions)

  • Build Pydantic AI Agents with type-guaranteed output validation

  • Implement dynamic tool dependency injection for live market pricing context

  • Benchmark agent routing and validation failure handling

Resources and assets

Reference links and supporting material

Dataset notes

Property & Casualty cedent submissions and reinsurance treaty placement terms dataset.

Challenge setup

Validates schema adherence and quantitative accuracy of treaty matching agent.

Challenge input

JSON describing cedent risk portfolio and risk retention tolerance.

Pydantic AI

Type-safe agent logic with schema enforcement

Evaluated output

JSON object strictly conforming to TreatyRecommendation Pydantic schema.

Evaluation checks
  • Ensures response successfully parses into Pydantic model without error
  • Percentage of agent executions passing schema validation on first try • target: 0.98 • range: 0-1
Configured evaluation evidence
  • Benchmark: TypeSafeBrokerBench
  • Schema Match Rate target: 98%
  • 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
  • LMDeploy · Optional
Orchestration
  • Pydantic AI · Required

Evaluation contract

  • pydantic_validation · Weight 1
  • schema_match_rate · Weight 1

Metrics

  • schema_match_rate · Target 0.98

Benchmarks

  • TypeSafeBrokerBench
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON describing cedent risk portfolio and risk retention tolerance.

    Output: JSON object strictly conforming to TreatyRecommendation Pydantic schema.

    Execution harness: Python

Evaluation tools

  • Pydantic AI · Agent Framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Pydantic AI Type-Safe Reinsurance Broker Matching Engine