Pydantic AI & Dify Anti-Money Laundering Sharing Agent
Build a Pydantic AI multi-party information sharing pipeline integrated into Dify to analyze cross-bank COSMIC platform ML/TF alerts with structured Pydantic validation. Achieve a 90%+ true-positive detection rate while enforcing zero data-leakage constraints.
What you are building
The core problem, expected build, and operating context for this challenge.
Construct a type-safe agent using Pydantic AI and Dify workflows to evaluate inter-bank COSMIC platform ML/TF intelligence securely.
How work is evaluated
Evaluates Pydantic AI models on structured validation accuracy, privacy leakage checks, and risk calculation accuracy.
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
Ensures the response strictly adheres to the output schema without missing keys
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
detection_precision
Precision of high risk ML/TF detection • target: 0.9 • 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
Leverage Pydantic AI for strongly typed agent inputs, outputs, and validation rules
Integrate agent logic with Dify workflow orchestration engine
Process financial transaction logs while adhering to Singapore's COSMIC data privacy guidelines
Implement risk-based scoring for Money Laundering / Terrorism Financing (ML/TF)
Reference links and supporting material
Anonymized COSMIC platform simulation dataset containing structured transaction graphs and ML/TF risk labels.
Challenge setup
Evaluates Pydantic AI models on structured validation accuracy, privacy leakage checks, and risk calculation accuracy.
Challenge input
JSON containing obfuscated transaction logs and counterparty metadata
Pydantic AI
Provides type-safe structured outputs and validation for compliance
Dify
Visual workflow builder and agent orchestration tool
Evaluated output
JSON matching Pydantic output model with risk_level, confidence, and flags
- Ensures the response strictly adheres to the output schema without missing keys
- Precision of high risk ML/TF detection • target: 0.9 • range: 0-1
- Benchmark: AMLBench
- Detection Precision target: 0.9
- 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
- Dify · Required
- Pydantic AI · Optional
- Aim · Optional
- Pydantic AI · Optional
Evaluation contract
- Pydantic Schema Validation · Weight 1
- detection_precision · Weight 1
Metrics
- detection_precision · Target 0.9
Benchmarks
- AMLBench
- security
Reference cases
- 1 public reference case
Workflow tasks
- Task 1
Input: JSON containing obfuscated transaction logs and counterparty metadata
Output: JSON matching Pydantic output model with risk_level, confidence, and flags
Execution harness: Python
Evaluation tools
- Pydantic AI · Agent Framework
- Dify · Agent Systems
Recipe freeze marker
No recipe freeze time is recorded.