MQT · Mohd Quamar Tyagi
Home

Case study · Product & AI

ParseFlow AI

AI review and compliance workflow for unstructured business documents

ParseFlow review workspace: source document text with provenance highlighting beside editable extracted fields

The problem

Invoices, purchase orders, receipts and vendor quotes arrive as unstructured documents. Reviewing them manually is slow, and letting a model decide compliance silently is unacceptable: every automated decision needs evidence a human can audit.

What I built

Document pipeline

OCR/text → classification → schema-constrained extraction with per-field {value, confidence, provenance} → built-in cross-field validation → duplicate detection → routing.

Compliance rule engine

Rules (field_required, numeric_threshold, allowed_value, date_relationship, total_arithmetic) live in versioned rule sets; exactly one version is active per organization and only approved rules execute. Violations surface with the offending field evidence.

AI rule proposals

Paste a policy and the generator drafts structured rules with verbatim source excerpts. Proposals stay inert until a human approves them and a set version is activated — model output can never silently change compliance behavior.

Human review console

Source text with provenance highlighting beside editable fields; corrections preserve original_value, validations re-run at approval time, and an immutable audit feed records every decision per document and org-wide.

Multi-tenancy + RBAC

Org-scoped rows and queries with a capability matrix enforced server-side and mirrored in the UI.

Engineering decisions

Deterministic by default

A heuristic provider needs no API keys and runs the full pipeline offline; a strict-schema LLM provider (Gemini) is a drop-in. Review and CI never depend on a model's mood.

Human-in-the-loop over automation

Per-org review policy sets an auto-approve confidence floor, warning blocking, and high-value human review. The model proposes; policy and humans dispose.

Provenance as a first-class field

Every extracted value carries a char-accurate pointer into the source text, so a reviewer can verify a field in one glance instead of trusting the extraction.

Hand-rolled SigV4 object storage

Documents persist to S3-compatible storage (MinIO locally, Backblaze B2 in production) through a hand-rolled SigV4 signer — no SDK dependency at the storage boundary.

Testing & CI

A 36-document synthetic eval corpus gates extraction quality, with Vitest unit and integration suites covering security properties including prompt-injection handling and cross-tenant isolation. Deployed as Next.js on Vercel, Fastify on Render, Aiven PostgreSQL, Backblaze B2.

Screenshots

Review workspace

Review workspace

Source text with provenance highlighting beside editable extracted fields and confidence bars

Rule violations

Rule violations

Compliance violations surface with the offending field evidence

Next.js / Fastify / PostgreSQL / Backblaze B2 / Gemini