How KontractHub reads a contract in 15 seconds — the vision pipeline explained
KontractHub Team ·
When you upload a contract to KontractHub, the browser tab that says 'analyzing…' for 15 seconds is doing a lot of work. Here's what actually happens inside those 15 seconds — no marketing fluff, just the pipeline.
Step 1: PDF to images (~2 seconds)
The uploaded PDF gets rendered page-by-page as PNG images. Vision models read images, not text, so this step is mandatory. We render at a lower resolution first (Pass 1) to keep costs down — most fields resolve on the first pass without needing high-res.
Step 2: Every-page vision pass (~8 seconds)
Every page gets sent to Claude Sonnet 4.5 (via Amazon Bedrock) in parallel batches. Each batch of pages is asked the same question — 'what fields do you see on these pages, and what's your confidence?' — and the responses get merged into a single matrix.
This is where the magic happens. The vision model doesn't need to know it's looking at a MD_MAR listing agreement vs a VA_GCAAR purchase contract. It just reads what's on the page. Which means when a new state form gets added, we don't have to retrain anything — the AI already knows how to read it.
Step 3: Confidence matrix + targeted re-read (~3 seconds)
We aggregate the per-page reads into a field-by-field confidence matrix. Any field where multiple pages disagreed, or where confidence was low, gets FLAGGED. Those flagged pages get re-rendered at higher resolution and re-read — but only those pages, not the whole PDF. This is the 'every-page matrix' pattern, and it's why the total time stays under 15 seconds even on 40-page contracts.
Step 4: Summary + downstream triggers (~2 seconds)
The consolidated summary lands in S3 as a JSON document. The moment it lands, downstream systems fire: contingency dates get computed and added to your calendar, a Deal Health check runs to flag anything unusual, the Deadline Guardian schedules reminders for every date in the summary, and the Pending Actions queue populates with any drafts the Smart Agents want to send.
Why we don't use OCR
Every OCR pipeline we tested — Textract, Tesseract, Google Document AI — got confused by the exact things that matter most: handwritten dates on line 47, checkboxes that overlap the text, initials in the margin. Vision models don't care about layout in the same way. They just read what's on the page.
This is a bet — vision-model reading is currently more expensive than OCR by about 3x. But the accuracy delta on the contracts we deal with is enormous, and vision-model cost is dropping fast enough that the pricing gap will close within a year. We'd rather pay 3x more today for something that actually works than 1/3 the price for something that misses the ratification date because a scanner introduced a smudge.
What lives in the summary
- Buyer + seller names + contact info
- Property address + parcel ID
- Purchase price + earnest money deposit amount
- Ratification date + settlement date
- Every contingency with its deadline (inspection, financing, appraisal, HOA, etc.)
- Loan officer + title company + inspector references
- Special stipulations pulled verbatim
Every one of those fields gets a confidence score. If confidence is high (which it is 94% of the time on our current corpus), the field renders as green in your contract detail view. If confidence is low or the AI is uncertain, the field renders as yellow with a 'please verify' badge — and it never triggers a downstream automation until you confirm it.
That's the philosophy: AI does the reading, humans do the trusting. And when the AI is wrong, it fails visibly — never silently. Every wrong field you correct gets used to make the next contract more accurate.