Skip to main content
Challenge

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.

CybersecurityHosted by Vera
Challenge brief

What you are building

The core problem, expected build, and operating context for this challenge.

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.

Delivery guide

How work is evaluated

Evaluation

Evaluates structured KYC JSON field accuracy extracted from test document images.

Datasets

Challenge datasets

Public datasets, plus the private datasets you have access to.

Evaluation rubric

How submissions are scored

These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.

Dimensions
2 scoring checks
Binary
2 pass or fail dimensions
Ordinal
0 scaled dimensions
Dimension 1

Strict Zod Validation

Extracted JSON must fully conform to required Zod schema without extra fields.

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Dimension 2

extraction_accuracy

Exact match rate on identity attributes • target: 0.99 • range: 0.95-1

Binary check

This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.

Learning goals

What you should walk away with

  • 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 and assets

Reference links and supporting material

Dataset notes

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 }

Evaluation checks
  • 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
Configured evaluation evidence
  • Benchmark: DocExtract-Bench
  • Extraction Accuracy target: 0.99
  • 1 public reference case
Configured runtime
  • JavaScript execution harness
  • javascript 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

Action Space
  • Vercel AI SDK · Required
  • Windsurf · Optional
Observation
  • Windsurf · Optional
Orchestration
  • 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

  1. 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.

Frequently Asked Questions about Automated Document KYC Extraction Pipeline with Vercel AI SDK