Challenge

Build Type-Safe UPI Fraud Triage Agent with Pydantic AI

High-volume instant payment systems require ultra-reliable and strictly typed risk assessment to block fraudulent transfers. Build a type-safe fraud triage pipeline using Pydantic AI with dependency injection to evaluate merchant risk parameters with 0% runtime schema errors.

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 UPI transaction risk triage agent using Pydantic AI validation models and dependency injection.

Delivery guide

How work is evaluated

Evaluation

Evaluates type safety compliance and fraud triage accuracy on live UPI payment streams.

Datasets

Shared data for this challenge

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

Loading datasets...
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

Validates that response passes Pydantic model instantiation without ValidationError

Binary check

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

Dimension 2

fraud_detection_f1

F1-score on identifying synthetic fraud transaction signals • target: 0.94 • 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 structured, type-safe AI agent workflows using Pydantic AI

  • Utilize Pydantic AI dependency injection for dynamic risk model loading

  • Enforce strict schema validation on UPI transaction fraud outputs

Resources and assets

Reference links and supporting material

Dataset notes

Synthetic stream of UPI transaction vectors with annotated device and merchant risk scores.

How this agent runs

Evaluates type safety compliance and fraud triage accuracy on live UPI payment streams.

Challenge input

JSON containing transaction_amount_inr, velocity_1h, merchant_category_code, device_fingerprint_match

Pydantic AI

Provides type-safe LLM outputs and dependency injection

Evaluated output

JSON matching FraudResult schema: risk_level, block_transaction, trigger_otp

Checks for
  • Validates that response passes Pydantic model instantiation without ValidationError
  • F1-score on identifying synthetic fraud transaction signals • target: 0.94 • range: 0-1
Proof of success
  • Benchmark: UPI-Fraud-Bench
  • Fraud Detection F1 target: 0.94
  • 1 public reference case
Runtime evidence
  • Python execution harness
  • Python sandbox (unavailable on Versalist)
View technical recipe

Configured tools

Action Space
  • Pydantic AI · Required
  • Arize AI · Optional
  • Bland AI · Optional
Orchestration
  • Pydantic AI · Required

Evaluation contract

  • pydantic_schema_validation · Weight 1
  • fraud_detection_f1 · Weight 1

Recipe state

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

Frequently Asked Questions about Build Type-Safe UPI Fraud Triage Agent with Pydantic AI