Skip to main content
Challenge

Build a Real-Time Fast Rail Fraud Detector with Pydantic AI

Instant payment rails like FedNow and RTP leave zero window for manual fraud review. Build a type-safe real-time transaction scoring agent using Pydantic AI that enforces structured data schemas and executes sub-50ms anomaly evaluation.

CybersecurityHosted by Vera
Challenge brief

What you are building

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

Develop a high-performance type-safe Python agent using Pydantic AI to validate and evaluate instant payments against fraud patterns.

Delivery guide

How work is evaluated

Evaluation

Evaluates prediction precision, type validation strictness, and execution speed.

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

test_block_high_risk

Verify high-risk rapid transaction on new device is BLOCKED

Binary check

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

Dimension 2

precision

Precision on fraud detection test cases • target: 0.97 • range: 0.9-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

  • Implement type-safe payment inspection tools using Pydantic AI agent dependencies.

  • Enforce rigorous validation schemas on instant settlement transaction payloads.

  • Maintain sub-50ms inference latency for real-time BLOCK/ALLOW decisions.

Resources and assets

Reference links and supporting material

Dataset notes

Synthetic instant payment transaction telemetry containing velocity indicators.

Challenge setup

Evaluates prediction precision, type validation strictness, and execution speed.

Challenge input

JSON fast payment payload with velocity and device traits

Pydantic AI

Framework requirement

Evaluated output

JSON validated model with action (ALLOW|BLOCK|FLAG), risk_score, and reasons

Evaluation checks
  • Verify high-risk rapid transaction on new device is BLOCKED
  • Precision on fraud detection test cases • target: 0.97 • range: 0.9-1
Configured evaluation evidence
  • Benchmark: Instant Fraud Detection Benchmark v1
  • Precision target: 0.97
  • 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
Orchestration
  • Pydantic AI · Required

Evaluation contract

  • test_block_high_risk · Weight 1
  • precision · Weight 1

Metrics

  • precision · Target 0.97

Benchmarks

  • Instant Fraud Detection Benchmark v1
  • security

Reference cases

  • 1 public reference case

Workflow tasks

  1. Task 1

    Input: JSON fast payment payload with velocity and device traits

    Output: JSON validated model with action (ALLOW|BLOCK|FLAG), risk_score, and reasons

    Execution harness: Python

Evaluation tools

  • Pydantic AI · agent_framework

Recipe freeze marker

No recipe freeze time is recorded.

Frequently Asked Questions about Build a Real-Time Fast Rail Fraud Detector with Pydantic AI