>_
ARSLAN VUZMAL LONEAI & Systems Engineer
Back to Selected Work Archive
Data & Machine LearningSTATUS: Open Source 1 0

LedgerQuarry Document Parser

Multimodal vision and OCR financial document extraction pipeline

LedgerQuarry replaces brittle coordinate-based template OCR with flexible multimodal vision models. It accepts scanned receipts, PDFs, and invoices of any layout, extracting structured financial line items, dates, and amounts into validated accounting schemas with per-field confidence metrics.

01 // THE BUSINESS PROBLEM & SITUATION

Operational Context

Finance and accounting departments waste hundreds of hours manually entering vendor invoice line items into ERP software.

CLIENT / ENVIRONMENT: Created for finance teams processing diverse, unstructured supplier invoices and receipts.
02 // SYSTEM ARCHITECTURE & SOLUTION

What Was Built

Constructed an automated processing pipeline utilizing Vision AI models coupled with strict schema validation to extract structured financial data.

LEDGERQUARRY // MULTIMODAL_OCRDocument Extraction Pipeline
UPLOAD
PDF / Receipt
VISION AI
Multimodal Model
VALIDATE
Zod Schema
ERP SYNC
Typed JSON
SYSTEMS_ARCHITECTURE_EXPLODER // LAYERED_STACKFULL-STACK SYSTEM DECOUPLING
Frontend Layer
Next.js 16 App Router, React 19, Tailwind CSS, TypeScript
API & Middleware
FastAPI, Pydantic Schema Validation, Rate Limiters
Orchestration
LangGraph Multi-Agent Supervisor & State Machines
Model Providers
OpenAI GPT-4o, Anthropic Claude 3.5, Vision AI
Data Stores
PostgreSQL (Prisma), Qdrant Vector Store, Redis Caching
Observability
LangSmith traces, Pydantic audit logs, Error retries
03 // ENGINEERING CONTRIBUTION & FEATURES

Exact Contribution

  • Built secure document upload and processing API with Express/Node.js
  • Engineered structured vision prompts for zero-shot invoice parsing
  • Implemented per-field confidence scoring and automated anomaly detection
  • Created ERP export formatters (QuickBooks, Xero, CSV)

Key Capabilities Built

Multi-Page PDF & Image Document Parsing
Granular Line-Item and Tax Breakdown Extraction
Per-Field Confidence Scoring & Validation
Automated Currency & Date Normalization
ERP Integration Webhooks
DATA_PROVENANCE_TIMELINE // AUDIT_TRACETRACE_ID: #TR-992041
14:22:01.002Source Ingestion
Received webhook payloadOK
14:22:01.045Schema Validation
Pydantic structured field checkOK
14:22:01.210LangGraph Reasoning
Evaluated criteria rulesOK
14:22:01.350Human Audit Check
Confidence threshold evaluationPASSED
14:22:01.480Database Commit
Created audit record in PostgreSQLCOMMITTED
*Illustrative system trace — demonstration data, not a client result.
04 // EXECUTION PIPELINE

Step-by-Step Workflow

STEP 01User or automated webhook uploads invoice document.
STEP 02Vision model analyzes visual structure and text hierarchy.
STEP 03Schema validator inspects extracted line items, subtotals, and vendor data.
STEP 04Confidence scoring flags low-certainty fields for human review.
STEP 05Validated structured JSON dispatches to accounting software endpoint.
05 // ENGINEERING LESSONS & OUTCOMES

Technical Challenges Overcome

  • Parsing low-contrast mobile receipt photos with glare and folds.
  • Resolving multi-currency line items and varying international tax conventions.

Measurable Outcomes

Achieved 95%+ extraction accuracy across varied vendor invoice formats in test sets.
Eliminated reliance on rigid coordinate-based OCR templates.

Lessons & Engineering Rules

  • "Multimodal LLMs provide vastly superior generalization over traditional coordinate OCR for diverse document layouts."
  • "Mathematical cross-validation (verifying line items sum to the subtotal) catches extraction hallucinations automatically."
NEXT RELATED CASE STUDY

Orchestrion Multi-Agent Studio

View Study
PROJECT METADATA
ARSLAN'S ROLEMachine Learning Engineer
YEAR & STATUS2024 // Open Source
CATEGORYData & Machine Learning
TECHNOLOGY STACK
JavaScriptNode.jsVision AIExpressOCRPydantic/Zod
GITHUB METRICS
Stars: 1
Forks: 0
Verified GitHub Update: 8/15/2026

Need a similar solution?

If your business faces similar data, automation, or software bottlenecks, let's discuss your requirements.

Start a Conversation