Legal Redaction Tool

On-device redaction for contracts and case files

Lawyers and compliance teams redact contracts and case files without uploading them anywhere.

Working build Studio product · 2026 · macOS (Apple Silicon)

CONTRACT.PDFORIGINALCONTRACT.PDFREDACTEDNAMEID NO.PHONEACCOUNTON-DEVICE · NOTHING UPLOADED

The problem

Legal teams want AI help with document review, but client files cannot leave the firm. Pattern-matching tools miss context, such as a party referred to only as "the buyer", and cloud LLMs are not allowed.

What we built

  • A Tauri desktop app with a Rust backend for file handling, PDF text extraction, OCR with progress updates, and caching.
  • A Rust rule engine for Chinese legal documents: names, parties, ID numbers, bank cards, phone numbers, email addresses, contract numbers and titles.
  • A local Qwen3-4B model on Apple Silicon (MLX) that catches context-dependent details the rules miss.
  • A side-by-side editor (original, redacted, compare) with per-paragraph navigation, labels, manual replacements and wildcard rules.
  • A local SQLite library for files, custom entities, ignore lists and OCR results.

Decisions that mattered

01

The model cannot invent text

Every model suggestion must match the source text exactly and belong to an allowed entity type, or it is discarded.

02

No network path for documents

If the local model is missing or fails validation, the app falls back to its Rust rules. It never sends a document out.

03

Long documents in overlapping chunks

Text is processed in segments of up to 14,000 characters with a 1,000-character overlap, then results are merged.

Have an AI idea, or an AI feature that isn’t working?

Tell us what you are trying to do. You will get a straight answer within one business day, including when AI is not the right tool.

Book a 30-minute call hello@kby-studio.com

The intro call is free and comes with no obligation.