Confidential documents do not have to leave the machine to get a frontier-grade review. Lavern runs a local triage first, redacts the sensitive bits with a reversible mapping, sends only the redacted text to a frontier model, then de-anonymises the response back into the original context.
analyzeLocally() runs
against Ollama on-device. Pulls out clauses, risks, and tentative
severities. No network calls.anonymize() replaces
entities with stable placeholders ([PARTY_1],
[AMOUNT_3], …) and records a mapping table.source:
local, frontier, or both.
src/claw/anonymize.ts. All-regex, no LLM calls, no
network. Six entity classes, each with stable numbered placeholders:
party | Companies, individuals, named counterparties |
amount | Monetary figures with currency markers |
date | Calendar dates across common formats |
address | Postal addresses |
email | Email addresses |
phone | Phone numbers |
The mapping table is returned alongside the redacted text. The same entity gets the same placeholder across the document, so the model can still reason about “[PARTY_1] indemnifies [PARTY_2]”.
{ localUsd, frontierUsd, totalUsd } — and reported with
the finding set.
A single HybridAnalysisResult: merged findings, raw local
result for reference, the count of clauses escalated, cost breakdown,
and the originating source on every finding. Reversible. Auditable.
Source-tagged.