Skip to content

Guidance4 min read

Legal tech and contract review: privilege, poisoning and the clause nobody checked

A contract review platform holds privileged material from clients who may be on opposite sides of the same deal. Isolation is not a feature there; it is the product.

Sameer

Founding Engineer

Legal books stacked beside a reading lamp
Photo: chuttersnap (CC0, via Wikimedia Commons)

Legal technology carries an obligation most software does not: the documents are privileged, the duty of confidentiality is professional rather than merely contractual, and two clients on the same platform may be adverse to each other in the same matter. Cross-matter leakage is not a data breach to be disclosed and moved past — it is a conflict event with consequences for the lawyers involved.

Isolation has to be per matter, not per account

  • Firms run ethical walls between teams on the same deal. If the platform’s AI retrieves across the firm’s whole corpus, the assistant walks straight through the wall that the document management system was configured to enforce.
  • A single vector namespace per firm is insufficient where matters are walled. We test retrieval from inside one matter for content seeded in another.
  • Clause libraries and "learn from your past contracts" features are the common failure: precedent extracted from one client’s negotiated agreement surfacing in advice to another, with the commercial terms intact.
  • Model fine-tuning or evaluation on client documents without clear authority is both a confidentiality problem and, under DPDP, a purpose-limitation one.

Counterparty documents are hostile input

In a review workflow, the document under review usually comes from the other side. That makes it the ideal injection vector, and the objective is not data theft but a changed summary.

  • Instructions in the text layer directing the summariser to describe an unfavourable indemnity as market standard, or to omit a clause entirely.
  • Formatting tricks that hide a clause from extraction while leaving it legally present in the executed document — the most consequential variant, because the signed agreement contains a term the review never reported.
  • Definition-substitution attacks: a benign-looking defined term redefined deep in a schedule, where chunked retrieval is unlikely to bring both halves into the same context window.

We test all three and report whether the generated summary materially misstated the document. On a contract platform that is the finding that matters most, because it is the one that produces negligence exposure rather than a breach notification.

What we test, in order

  1. Matter-level isolation in retrieval, with seeded canaries across an ethical wall.
  2. Clause library and precedent features for leakage of commercial terms between clients.
  3. Counterparty document injection against summarisation, risk flagging and clause extraction.
  4. Omission testing: can a clause be made invisible to extraction while remaining in the document.
  5. Export and sharing paths — links, downloads, email integrations — for scope and expiry.
  6. Provider egress: which documents leave, to whom, under what contract, excluded from training, retained how long.
  7. Deletion on matter closure, including embeddings, caches and evaluation sets, within a period the firm can state to a client.
  8. Audit trail sufficient to show which documents the assistant read in a given matter.

Controls that hold up

  • Per-matter collections with retrieval scoped to the matters the user is cleared for, synced live from the document management system’s access model.
  • Precedent and clause-library features opt-in per client, with extraction that strips party names, figures and distinctive drafting before anything is shared across matters — and a clear statement of what "anonymised" means in that pipeline.
  • Extraction that reports structural anomalies rather than silently skipping them: hidden text, suspicious formatting, clauses present in the document but excluded from the model’s view.
  • Summaries that cite the clause they summarise, with the source text one click away, so a reviewer verifies rather than trusts.
  • Provider agreements with training exclusion, defined retention and a named sub-processor list the firm can give a client.
  • Deletion on closure that propagates to vectors and caches, with evidence.

What clients are asking firms, and firms are asking vendors

In-house teams now ask their external counsel which AI tools touched their documents, whether the documents trained anything, where they were processed, and who at the vendor can read them. Firms pass those questions to vendors, and the vendors that answer them in writing win the work. Under DPDP the firm is a Data Fiduciary for personal data in those documents and the platform a Processor, which makes the contract, the sub-processor list and the deletion guarantee the three artefacts to get right first.

Where to start

Put a canary clause in a document in one walled matter, then ask the assistant about it from inside another matter in the same firm. The answer tells you whether your ethical walls survived the move to retrieval.

Questions we get asked

Can client documents be used to improve the product?
Only with clear, specific authority from the client, and with a pipeline that can prove what was extracted. "Anonymised learning" across matters is where confidentiality problems hide, because negotiated commercial terms remain identifying even with names removed.
How do we stop a summary from misstating a contract?
Cite and show. Every assertion in a summary should link to the clause it came from, extraction anomalies should be surfaced rather than dropped, and the workflow should assume the counterparty document is adversarial.
Is on-premise or self-hosted inference necessary for legal AI?
Not necessarily, but you need a defensible written position: where inference happens, what is retained, training exclusion, who at the provider can access it, and deletion. Many firms accept a hosted provider with those terms; what they do not accept is not knowing.
  • legal tech AI security
  • contract review AI penetration testing
  • LLM security for law firms
  • privilege and confidentiality AI
  • document AI security