Contract ComparisonDocument IntelligenceHuman Review Workflow
Legal Document Comparison Web App
An internal document comparison workflow focused on review support.
AI Application Engineer2026/02 - 2026/03PixArt
Contract Comparison · Review Architecture
On-Prem ConfidentialOCR + Consistency CheckDual-Pane Review
- 01
Contract Pair
Original DOCX & Signed Scan
- 02
Parse & OCR
Noise, Stamps & Layout
- 03
Text Validation
Structure & Completeness
- Diff Engine04
LLM Compare
Clause-Level Diff Detection
- 05
Dual-Pane UI
Side-by-Side Context View
- 06
Legal Sign-Off
Human-in-the-Loop Decision
Keeps sensitive contracts strictly on-prem while pairing AI comparison with text checks and dual-pane human review.
Before
Legal users needed a faster way to compare sensitive contracts without sending documents to external tools.
After
Structured the process into document extraction, prompt-engineered clause alignment and comparison support, supporting consistency checks, and human review through a dual-pane interface.
Context & Background
- The legal team needed a faster way to review signed or scanned contracts against source documents.
- The goal was not to showcase OCR or LLMs, but to reduce slow and error-prone manual comparison work.
Constraints
- Documents were sensitive and were handled inside the company environment.
- Scanned files were structurally unstable, and legal review needed human-in-the-loop support instead of relying only on model output.
Problem Solved
- Sensitive legal documents were not suitable for external review tools.
- Manual comparison of originals and signed scans was slow and easy to miss details in.
- Reviewers needed a workflow that supported careful human review rather than a raw AI summary.
My Role
- The review problem was broken into parsing, prompt-engineered clause/paragraph extraction, comparison support, consistency checks, and human review steps.
- The workflow was packaged as an internal web app instead of a loose backend process.
System Design
- Combined document parsing, prompt-engineered comparison support, supporting consistency checks, and a side-by-side review interface.
- Added checks around reconstructed text so reviewers could inspect differences with clearer context.
Implementation Highlights
- Built an internal web app around the review workflow, not just a comparison API.
- Applied prompt engineering for noisy legal paragraph/clause extraction and structured comparison alignment alongside consistency checks.
- Designed a synchronized dual-pane interface for efficient human review.
Outcome & Impact
- Reduced manual review effort for sensitive contract comparison.
- Created a review support workflow that balanced AI assistance with human control.
Tech Stack
PythonFastAPIvLLMPrompt EngineeringDocument ParsingHuman Review Workflow