Automated Document KYC Extraction Pipeline with Vercel AI SDK
Manual processing of unstructured customer onboarding documents slows down digital bank verification workflows. Build an automated KYC document extraction and risk verification engine using Vercel AI SDK and Windsurf, processing identity documents with 99% structured field extraction accuracy.
What you are building
Develop a high-throughput TypeScript backend using Vercel AI SDK generateObject and Windsurf development workflows to parse unstructured passport and utility bill documents into validated JSON schemas.
How work is evaluated
Evaluates structured KYC JSON field accuracy extracted from test document images.
Datasets
Public datasets, plus the private datasets you have access to.
How submissions are scored
Strict Zod Validation
Extracted JSON must fully conform to required Zod schema without extra fields.
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
extraction_accuracy
Exact match rate on identity attributes • target: 0.99 • range: 0.95-1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
Learning goals
Implement structured JSON output generation using Vercel AI SDK and Zod schemas
Integrate Windsurf IDE automation rules for rapid schema refactoring and testing
Build multi-modal OCR parsing pipelines for identity documents and proof of address
Resources
Dataset of 1,000 synthetic OCR document texts simulating passports, driver licenses, and utility bills.
Challenge setup
Evaluates structured KYC JSON field accuracy extracted from test document images.
Challenge input
Base64 encoded identity document image or OCR string
AI SDK
Assigned agentic framework for TypeScript/JavaScript.
Windsurf
Assigned AI engineering tooling.
Evaluated output
JSON matching Zod schema: { passportNumber, fullName, expiryDate, mrzValid }
- Extracted JSON must fully conform to required Zod schema without extra fields.
- Exact match rate on identity attributes • target: 0.99 • range: 0.95-1
- Benchmark: DocExtract-Bench
- Extraction Accuracy target: 0.99
- 1 public reference case
- JavaScript execution harness
- javascript sandbox (unavailable on Versalist)
Shows the first task, up to three tools, and up to three evidence items.
View technical recipe
Configured tools
- Vercel AI SDK · Required
- Windsurf · Optional
- Windsurf · Optional
- Vercel AI SDK · Required
Evaluation contract
- Strict Zod Validation · Weight 1
- extraction_accuracy · Weight 1
Metrics
- extraction_accuracy · Target 0.99
Benchmarks
- DocExtract-Bench
- general
Reference cases
- 1 public reference case
Workflow tasks
- Task 1
Input: Base64 encoded identity document image or OCR string
Output: JSON matching Zod schema: { passportNumber, fullName, expiryDate, mrzValid }
Execution harness: JavaScript
Evaluation tools
- AI SDK · Agent & Prompt Orchestration
- Windsurf · AI Developer Environment
Recipe freeze marker
No recipe freeze time is recorded.