Case05 / 05 · Contract Review
ClientNDA · fully local perimeter
DomainLegal · on-prem · local LLM

Automated contract review — so the lawyer sees right away what to look at.

The client (NDA) is a large company with a high contract throughput and a high cost of error in wording. The perimeter is fully local: on-prem, local models, no external APIs.

on-prem local LLM contract review evals rules engine agentic pipeline
§ a Context What's at stake

Hundreds of contracts a year. Every missed clause — potential losses in the hundreds of thousands.

Before us, lawyers manually compared each contract to a reference — slow, expensive, easy to miss. Some risks are «known» to the team but not captured in a verifiable form — they live in senior lawyers' heads.

At high throughput, some contracts go through without a full review → real losses on missed clauses.

The task — automated review with clear remarks for the lawyer and auditable rules.

  • a.Comparison against templates and corporate policies.
  • b.Beyond a score — specific places with quotes.
  • c.Auditability: every remark linked to a rule.
  • d.Fully local perimeter — no external APIs.
§ b What we did Under the hood

Three ingestion branches → unified context → comparison against templates + reasoning.

Three data sources. The contracts themselves (PDF/DOCX), approval correspondence (email threads), and systems of record (EDMS, ERP, etc.). Each has its own extractor that normalizes the input into a single representation.

Unified contract context. Parties, subject, price, warranties, liability, terms, applicable law — assembled from all three branches into one normalized representation.

Comparison against templates: what must be present, what must not, what must be in a specific wording.

Remark card for the lawyer: quote → explanation → link to rule / template → severity.

Revision versioning. Comparing revisions across rounds of edits: what changed and by whom.

Extensible rules catalog. The client's team extends rules and templates without our involvement. The catalog becomes an auditable corporate artifact.

Under the hood — our own two-phase process with fixed acceptance criteria and explicit exit points at every stage. Details in § Process.

§ c Result What came out
Result
Hours → minutes on standard contract classes. The lawyer sees 3–7 key remarks instead of «read 30 pages». The rules catalog is now an auditable artifact. Fewer missed critical clauses — expected savings per cycle.

Screenshots aren't published — the client did not approve sharing UI details.

§ d Solution architecture What's inside

Architecture: three sources, one unified context, all local.

A contract doesn't live in a single file. You also need its text, the approval correspondence, and the data from systems of record. Three ingestion branches normalize everything into a unified context, then a linear pipeline: comparison against templates → remark cards → lawyer UI. Everything inside an on-prem perimeter, no external APIs.

ON-PREM PERIMETER · LOCAL MODELS · NO EXTERNAL APIs SOURCES contract document PDF · DOCX approval correspondence email threads systems of record EDMS · ERP · … EXTRACTORS contract extractor parties · price · liability · terms · applicable law LLM thread extractor approvals · counter-proposals · redlines · timestamps LLM structured ingestor deterministic fields · refs · counterparty data unified contract context single normalized representation across all three sources comparator vs. templates · corporate policies · rules LLM remark cards quote → explanation → rule → severity LLM lawyer UI · 3-7 prioritized remarks SHARED SERVICES rules catalog templates · DEC log · severity policy extended by client team SIDE MODULES revision diff across rounds of edits eval suite regression tests across releases ─── red arrows = data flow – – – dashed = service usage ▮ LLM = step uses local LLM (on-prem)

Other cases.

Similar problem?
Get in touch.

Send a brief description of what you have. From there — in correspondence: we get the context, scope the boundaries, and agree on a PoC in days–weeks.