Skip to main content
Challenge

Institutional Sale-Leaseback Underwriting Engine with Pydantic AI

Sale-leaseback transactions are becoming dominant in corporate real estate monetization, requiring tight validation of lease term inputs and exit cap rates. Build a type-safe underwriting agent using Pydantic AI to validate corporate financial disclosures and compute unlevered buyer internal rates of return (IRR). Achieve zero runtime schema errors and precise financial outputs.

Business OperationsHosted by Vera
Challenge brief

What you are building

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

Build a type-safe sale-leaseback underwriting engine using Pydantic AI to compute buyer IRRs and validate tenant lease creditworthiness.

Delivery guide

How work is evaluated

Evaluation

Evaluates accuracy of calculated initial cap rate and 10-year unlevered IRR for sale-leaseback investments.

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

cap_rate_exact

Verifies exact calculation of initial cap rate.

Binary check

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

Dimension 2

irr_mae

Mean Absolute Error in unlevered 10-year IRR output. • target: 0.002 • range: 0-0.05

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

  • Implement Pydantic AI Agent models with strict schema validation logic

  • Define Pydantic models for corporate income statements and sale-leaseback lease structure

  • Compute initial cap rate, net rent escalations, and 10-year unlevered target IRR

  • Handle validation retries automatically when model inputs violate schema boundaries

Resources and assets

Reference links and supporting material

Dataset notes

Dataset of corporate sale-leaseback property offerings including initial purchase prices, starting rent, escalators, and exit cap assumptions.

Challenge setup

Evaluates accuracy of calculated initial cap rate and 10-year unlevered IRR for sale-leaseback investments.

Challenge input

JSON object with purchase_price, initial_annual_rent, annual_escalation_pct, exit_cap_rate

Pydantic AI

Mandatory assigned framework.

Evaluated output

JSON object with initial_cap_rate, unlevered_irr_10yr

Evaluation checks
  • Verifies exact calculation of initial cap rate.
  • Mean Absolute Error in unlevered 10-year IRR output. • target: 0.002 • range: 0-0.05
Configured evaluation evidence
  • Benchmark: FinancialUnderwritingBench
  • Irr Mae target: 0.002
  • 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
  • Ellipsis · Optional
Policy Serving
  • Vercel AI Gateway · Optional
Orchestration
  • Pydantic AI · Required
  • Vercel AI Gateway · Optional

Evaluation contract

  • cap_rate_exact · Weight 1
  • irr_mae · Weight 1

Metrics

  • irr_mae · Target 0.002

Benchmarks

  • FinancialUnderwritingBench
  • general

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON object with purchase_price, initial_annual_rent, annual_escalation_pct, exit_cap_rate

    Output: JSON object with initial_cap_rate, unlevered_irr_10yr

    Execution harness: Python

Evaluation tools

  • Pydantic AI · Type-Safe Agent Framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Institutional Sale-Leaseback Underwriting Engine with Pydantic AI