ContractLens — AI review for Australian property contracts
Benchmarked against a practicing lawyer's real review report: turns a 348-page contract into a one-page verifiable risk report — a 10-stage pipeline, 7 AI analysts in parallel, about $1 a contract.
What shipped
4 real contracts (104–348 pages) run end-to-end
Real benchmark
~30 findings overlapping the lawyer's report, plus 2 ACN inconsistencies confirmed by line-by-line check
vs. lawyer review
$1 / 4.6 minutes measured on a 132-page contract (91 findings, each with a verbatim citation)
Cost and runtime
Problem
Australian VIC property contracts routinely run a hundred or two hundred pages (often including scanned documents) — practically impossible for a buyer to read in full, and a lawyer's review is expensive yet still misses details. And the legal domain is brutally demanding of AI: every conclusion has to be verifiable, and it must never cross the line into giving legal advice.
Approach
A 10-stage pipeline: PDF / scan upload (PyMuPDF + Tesseract OCR) → a rule engine segments the document into 26 section types (Particulars / Special Conditions / Section 32 / Title & Plan / OC certificates / Council·Water / Lease and more) → 7 specialist AI analysts review in parallel (orchestrated with LangGraph, with tiered Claude Opus / Sonnet / Haiku calls to control cost) → cross-validation against a General Conditions baseline → a one-page report. The anti-hallucination trio: mandatory verbatim citations + tiered rapidfuzz validation (85 / 75 / 60 thresholds) + targeted retries scoped only to failed items; statute lookup runs on FAISS RAG with legal-domain embeddings (voyage-law-2) rather than general-purpose vectors; the output then passes two compliance gates (regex + AI semantic review) to intercept "AI lawyer"-style overreach.
AI's role in this project
A full practice in multi-agent + anti-hallucination engineering: parallel-analyst orchestration, strict citation validation, compliance gates — calibrated against a practicing lawyer's real review report.
Why I built it
Australian VIC property contracts routinely run a hundred or two hundred pages, often as scanned documents. Buyers can't read them all; a lawyer's review is expensive and still misses things. This project is benchmarked against a practicing lawyer's real review report, with one goal: turn "a contract" into "a one-page report where every conclusion is verifiable."
Key design
A 10-stage pipeline. PDF / scan upload (PyMuPDF + Tesseract OCR) → a rule engine segments the document into 26 section types (Particulars / Special Conditions / Section 32 / Title & Plan / OC certificates / Council·Water / Lease and more) → 7 specialist AI analysts review in parallel (orchestrated with LangGraph) → cross-validation against a General Conditions baseline → a one-page report. Tiered model calls (Opus / Sonnet / Haiku) keep the cost down: the 132-page contract measured end to end at $1 / 4.6 minutes.
Anti-hallucination is the product's lifeline. The trio: mandatory verbatim citations, tiered rapidfuzz validation (85 / 75 / 60 thresholds — better to fail a citation than to let a fake one through) that the citation really exists, and targeted retries scoped only to failed items; statute lookup doesn't use general-purpose vectors but FAISS RAG with legal-domain embeddings (voyage-law-2) — similarity in legal text is not the same problem as similarity in everyday prose. The output then passes two compliance gates (regex + AI semantic review) to intercept out-of-bounds "legal advice."
Calibrated against a real lawyer's report. 4 real contracts (104–348 pages, including one mixed-title bundle of 5 addresses) run end-to-end; reviewed line by line against a practicing lawyer's report: ~30 findings overlap and hit the lawyer's report, plus 2 ACN (company registration number) inconsistencies that a line-by-line check against the contract text confirmed and that had not been itemized in the lawyer's report — not "AI beats the lawyer," but a second, tireless pair of eyes doing cross-checks to catch what slips through.
"Needs review" flags get reviewed too. The system raised 86 "needs human review" flags in total; walking back through them afterwards, 85% were useful prompts — a number that matters more than accuracy here, because it decides whether a lawyer keeps reading the flags or starts ignoring all of them.
In one line
The legal domain pushes "AI output must be verifiable" to the limit — every conclusion has to trace back to the source text, which makes it the toughest training ground there is for anti-hallucination engineering.