Skip to main content
Challenge

Build an LEI Verification Guardrail using Pydantic AI and GPT-5 Pro

Unassigned Legal Entity Identifier portfolios lead to unmonitored counterparty risk across corporate banking networks. Build a Pydantic AI agent leveraging GPT-5 Pro to audit orphan LEI records, extract corporate hierarchy from filings, and enforce strict Pydantic schema validation. Achieve automated counterparty attribution with greater than 90% coverage and verifiable audit trails.

CybersecurityHosted 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 application powered by GPT-5 Pro to automate orphan LEI verification and legal structure parsing.

Delivery guide

How work is evaluated

Evaluation

Evaluates the Pydantic AI agent's accuracy in identifying orphan LEIs and validating owner hierarchies.

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_schema_validation

Ensures response instantiates model without validation errors

Binary check

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

Dimension 2

attribution_accuracy

Percentage of correct parent LEI assignments • target: 0.92 • 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 Pydantic AI agent with dependency injection for dynamic LEI lookup

  • Leverage GPT-5 Pro high-reasoning capabilities for complex ownership document parsing

  • Enforce strict type-safe structured output validation on corporate risk profiles

  • Generate compliance alert tickets for unowned or expired corporate LEIs

Resources and assets

Reference links and supporting material

Dataset notes

Dataset of 250 unstructured corporate governance filings with corresponding LEI metadata.

Challenge setup

Evaluates the Pydantic AI agent's accuracy in identifying orphan LEIs and validating owner hierarchies.

Challenge input

JSON object with target_lei, filing_text, registration_date

Pydantic AI

Provides type safety and dynamic context injection for AI agents.

GPT-5 Pro

Delivers context understanding for complex legal document processing.

Evaluated output

JSON matching Pydantic schema with parent_lei, status, audit_pass

Evaluation checks
  • Ensures response instantiates model without validation errors
  • Percentage of correct parent LEI assignments • target: 0.92 • range: 0-1
Configured evaluation evidence
  • Benchmark: Corporate KYC Information Extraction Benchmark
  • Attribution Accuracy target: 0.92
  • 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
  • GPT-5 Pro · Optional
Policy Serving
  • GPT-5 · Optional
Orchestration
  • Pydantic AI · Required

Evaluation contract

  • pydantic_schema_validation · Weight 1
  • attribution_accuracy · Weight 1

Metrics

  • attribution_accuracy · Target 0.92

Benchmarks

  • Corporate KYC Information Extraction Benchmark
  • security

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON object with target_lei, filing_text, registration_date

    Output: JSON matching Pydantic schema with parent_lei, status, audit_pass

    Execution harness: Python

Evaluation tools

  • Pydantic AI · Agent Framework
  • GPT-5 Pro · High-Reasoning LLM

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Build an LEI Verification Guardrail using Pydantic AI and GPT-5 Pro