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.
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.
How work is evaluated
Evaluates type safety compliance and fraud triage accuracy on live UPI payment streams.
Shared data for this challenge
Review public datasets and any private uploads tied to your build.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
pydantic_schema_validation
Validates that response passes Pydantic model instantiation without ValidationError
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
fraud_detection_f1
F1-score on identifying synthetic fraud transaction signals • target: 0.94 • range: 0-1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
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
Reference links and supporting material
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
- Validates that response passes Pydantic model instantiation without ValidationError
- F1-score on identifying synthetic fraud transaction signals • target: 0.94 • range: 0-1
- Benchmark: UPI-Fraud-Bench
- Fraud Detection F1 target: 0.94
- 1 public reference case
- Python execution harness
- Python sandbox (unavailable on Versalist)
View technical recipe
Configured tools
- Pydantic AI · Required
- Arize AI · Optional
- Bland AI · Optional
- 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.