Case study · Applied AI

AI OCR Document Intelligence Engine

Filing season meant dense bilingual PDFs and desks retyping the register by hand. The hard problem wasn’t reading text — it was turning extraction into matter updates people could trust.

Product
Document intelligence engine inside NepalIPMS
Problem
Dense bilingual bulletins retyped by hand
My role
Pipeline design, OCR/extraction, human review loop
Outcome
Structured fields with HITL before register merge
Document intelligence workflow inside NepalIPMS

What to notice Intake is a staged pipeline — extract, classify, review — not a single “magic OCR” button.

Product surface hosting OCR intake
ScreenshotHost product surface
Intake workflow context
ContextBulletin → matter fields
Interactive OCR architecture
ArchitectureOCR pipeline →
HITL
Human review before register merge

Behind the build

Why OCR is not enough for document intelligence

  • A problem appeared. Dense bilingual bulletins; manual re-typing.
  • A system was designed. Extract → classify → review → merge.
  • A tradeoff was made. More stages for safer matter updates.
  • A product shipped. Prototype → production inside NepalIPMS.

Timeline

From manual bulletin reading to extraction.

Pain
IP desks manually scanned government bulletins and re-entered marks, applicants, and classes into spreadsheets or matter notes.
Prototype
OCR + field extraction experiments on real bulletin PDFs with noisy layouts and mixed typography.
Integrate
Wired extraction into NepalIPMS matter intake — upload lands structured fields on the file.
Harden
Human review loops for low-confidence fields; storage of source PDFs alongside extracted records.

Challenge

Documents that were never designed for machines.

Legal bulletins are operational documents first: inconsistent layout, dense tables, stamps, and language quirks. Generic OCR that returns a wall of text does not help a practitioner open a matter.

The engine had to optimize for structured fields a lawyer actually uses — and fail gracefully when confidence is low, rather than silently inventing a Nice class.

Solution

Structured fields, not a wall of text.

The engine ingests bulletin PDFs, runs OCR tuned for legal layouts, and maps extracted text to practitioner fields — mark, applicant, Nice class, opposition signals — with confidence scoring and a human review step before data becomes operational truth.

It runs inside NepalIPMS on the Cloudflare stack, keeping extraction close to matter intake rather than as a detached tool.

User Story

From bulletin retyping to structured intake.

Before

Practitioners manually scanned government bulletins and re-entered marks, applicants, and Nice classes into spreadsheets or matter notes. A dense PDF table could consume twenty minutes of paralegal time per entry — with transcription errors on application numbers.

After

Upload a bulletin PDF and extracted fields land on the matter record — mark, applicant, class, opposition signals — with confidence scoring and a human review step before data becomes operational truth. Source PDFs stay attached for audit.

Decision Log

Fields over raw text.

Field-level extraction over OCR text dumps

Decision: Map bulletin regions to practitioner fields — not return a searchable wall of OCR text.

Reason: Lawyers open matters, not documents; unstructured text still required manual parsing identical to the original problem.

Tradeoff: More layout-specific tuning per bulletin format; much higher desk value per upload.

Confidence scoring with mandatory human review below threshold

Decision: Flag low-confidence fields for correction before they write to the matter record.

Reason: A silently wrong Nice class is worse than no extraction — register mistakes propagate to deadline engines.

Tradeoff: Not fully “one-click” automation; trustworthy data on the file.

Embedded in matter intake, not a standalone tool

Decision: Wire extraction into NepalIPMS upload flow on the Cloudflare stack instead of shipping a separate document portal.

Reason: Standalone OCR tools die in tab sprawl; upload must land on the file practitioners already work in.

Tradeoff: Tighter coupling to parent product; higher daily usage on production desks.

Failed Attempts

Automation limits we hit early.

Auto-accepting extractions below confidence threshold. A early build silently wrote low-confidence Nice classes to matter records. Practitioners lost trust until we added explicit review gates — headline OCR accuracy on clean samples meant nothing on stamped bulletin layouts.

Generic invoice-tuned OCR models. Off-the-shelf models trained on clean invoices failed on dense bulletin tables, mixed typography, and stamp overlays. We needed layout-aware recognition tuned for legal register documents, not receipt scanning.

Architecture

Upload → extract → review → matter.

  • IngestPDF upload to object storage with matter association and audit trail.
  • OCRText and region recognition tuned for bulletin layouts rather than clean invoices.
  • ExtractField mapping for mark, applicant, class, and opposition-relevant signals.
  • ReviewConfidence-aware UI so humans correct edge cases before data becomes operational truth.
  • EdgeRuns alongside the NepalIPMS Cloudflare stack — close to the product, not a detached notebook.

Key features

Built for legal bulletin reality.

  • PDF ingestUpload to R2 with matter association and full audit trail of source documents.
  • Layout-aware OCRRecognition tuned for dense bulletin tables, stamps, and mixed typography — not clean invoices.
  • Field extractionStructured mapping to mark, applicant, Nice class, and opposition-relevant signals.
  • Confidence scoringLow-confidence fields flagged for review instead of silently accepted.
  • Human review UIPractitioners correct edge cases before extracted data lands on the matter record.

Technologies

Stack

OCRDocument AIPDF pipelinesCloudflare R2WorkersHuman-in-the-loop review

Impact

What extraction changes on the desk.

Speed

Bulletin intake stops being a retyping marathon.

Accuracy

Structured fields land on the matter with a review step for uncertain extractions.

Scale

Firms can process more register noise without growing headcount linearly.

Lessons learned

Fail gracefully, not silently.

Generic OCR that returns unstructured text does not help a practitioner open a matter. Field-level confidence and human review loops matter more than headline accuracy percentages on clean test documents.

Embedding extraction inside the product workflow — upload lands on the file — beat building a standalone document tool nobody returns to.

← Hire an Expert Next: TopRank Nepal →