chatkausik

Agentic Document Extraction — Data skill for Claude Code

Data community

Agentic Document Extraction (ADE) pipeline built from scratch on Claude.

How to install Agentic Document Extraction

This entry records only its repository, not the path inside it, so there is no exact command to give. Open chatkausik/Agentic-Document-Extraction and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agentic Document Extraction does

Agentic Document Extraction (ADE) pipeline built from scratch on Claude. Upload a PDF, describe in natural language what you want to pull out, and watch the system draft a JSON schema, extract the fields, evaluate against a golden answer set, and iteratively refine the schema until it reaches ≥95% accuracy.

Alternatives in Data

  • SQL Queries — Generate SQL queries from natural language across major dialects 7.8k ★
  • Wookstar Claude Plugins — An opinionated Claude Code Plugin Pack 83 ★
  • Human — The AI Software Factory 62 ★

README

Claude Document Extractor

A landing.ai-style Agentic Document Extraction (ADE) pipeline built from scratch on Claude. Upload a PDF, describe in natural language what you want to pull out, and watch the system draft a JSON schema, extract the fields, evaluate against a golden answer set, and iteratively refine the schema until it reaches ≥95% accuracy.

Inspired by [landing-ai/ade-sample-projects](https://github.com/landing-ai/ade-sample-projects/tree/main/Events/Data_Science_Dojo_2026), but replaces LandingAI's hosted APIs with **Claude** (Anthropic API) end-to-end.

Architecture

PDF ──▶ Parse (Claude native PDF) ──▶ Markdown
          │
          ▼
   Build Schema (NL goal + sample doc ──▶ JSON Schema draft-07)
          │
          ▼
   Extract (tool-use forces schema-valid JSON)
          │
          ▼
   Evaluate (vs data/golden_eval/golden.csv — numeric ±0.5%, strings normalized)
          │
          ▼
   <95%? ──▶ Refine (Claude proposes schema diff) ──▶ bump version ──▶ loop
  • Backend: FastAPI (/parse, /build-schema, /extract, /evaluate, /run-pipeline with SSE)
  • Frontend: Streamlit — Upload | Schema | Extract | Evaluate & Refine
  • Models: claude-opus-4-6 (primary), claude-sonnet-4-6 (fast ops)

Quick start

# 1. deps
make install

# 2. credentials
cp .env.example .env
# edit .env → set ANTHROPIC_API_KEY

# 3. sample PDFs + golden CSV
make samples

# 4. start backend & UI (two terminals)
make api
make ui

# 5. open http://localhost:8501

Then in the UI:

  1. Upload & Parse — drag in the 3 sample CBC reports
  2. Define Schema — prompt: "extract patient name, collection date, and all CBC metrics with values and units"
  3. Extract — runs against all docs in parallel
  4. Evaluate & Refine — view per-field accuracy; click Run refinement loop

Project layout

app/
  api/        FastAPI app + routes
  core/       parse, schema_builder, extract, evaluate, refine, pipeline
  models/     Py