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.
Challenge datasets
Public datasets, plus the private datasets you have access to.
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.
Challenge setup
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)
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
- Pydantic AI · Required
- Arize AI · Optional
- Bland AI · Optional
- Pydantic AI · Required
Evaluation contract
- pydantic_schema_validation · Weight 1
- fraud_detection_f1 · Weight 1
Metrics
- fraud_detection_f1 · Target 0.94
Benchmarks
- UPI-Fraud-Bench
- security
Reference cases
- 1 public reference case
Workflow tasks
- Task 1
Input: JSON containing transaction_amount_inr, velocity_1h, merchant_category_code, device_fingerprint_match
Output: JSON matching FraudResult schema: risk_level, block_transaction, trigger_otp
Execution harness: Python
Evaluation tools
- Pydantic AI · Agent Framework
Recipe freeze marker
No recipe freeze time is recorded.