Implement Contactless Payment Fraud & Injection Defense with Pydantic AI & Lakera
Retail contactless payment streams are vulnerable to adversarial payload manipulation and prompt injection. Build a Pydantic AI risk agent integrated with Lakera AI security guardrails to scan transaction metadata and intercept adversarial prompts with under 10ms latency overhead.
What you are building
The core problem, expected build, and operating context for this challenge.
Integrate Lakera AI firewall checks into a Pydantic AI agent workflow to protect contactless payment transaction processing from prompt injection.
How work is evaluated
Evaluates threat detection recall against adversarial payment transaction payloads and measures system latency.
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.
zero_injection_leakage
Must block 100% of injected override prompts.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
latency_ms
Average security scan processing overhead in milliseconds. • target: 8 • range: 0-20
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
What you should walk away with
Implement real-time prompt injection filtering using Lakera Guard
Develop type-safe agent payment verification pipelines using Pydantic AI
Detect fraud anomalies in QR code and NFC payload structures
Benchmark security decision throughput under high request rates
Reference links and supporting material
Dataset of 2,000 contactless POS transaction strings including legitimate purchase notes and injected override attempts.
Challenge setup
Evaluates threat detection recall against adversarial payment transaction payloads and measures system latency.
Challenge input
JSON payload containing POS authorization details and encrypted/raw text tags
Pydantic AI
Provides type-safe structured workflow capabilities.
Lakera AI
Scans and blocks prompt injection threats in real time.
Evaluated output
JSON payload containing security flag, threat level, and decision
- Must block 100% of injected override prompts.
- Average security scan processing overhead in milliseconds. • target: 8 • range: 0-20
- Benchmark: Lakera Security Injection Suite
- Latency Ms target: 8
- 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
- Lakera · Optional
- Pydantic AI · Required
Evaluation contract
- zero_injection_leakage · Weight 1
- latency_ms · Weight 1
Metrics
- latency_ms · Target 8
Benchmarks
- Lakera Security Injection Suite
- security
Reference cases
- 1 public reference case
Workflow tasks
- Task 1
Input: JSON payload containing POS authorization details and encrypted/raw text tags
Output: JSON payload containing security flag, threat level, and decision
Execution harness: Python
Evaluation tools
- Pydantic AI · Agent System
- Lakera AI · Security Guardrail
Recipe freeze marker
No recipe freeze time is recorded.