Skip to content
Lucerna Law

Getting started with legal AI

AI Detectors for Lawyers: Can You Tell Text Is AI-Written?

By Published 8 min read

AI detectors, for lawyers, are tools that estimate whether a piece of text was written by an AI model. Their record is weak: OpenAI withdrew its own detector for low accuracy, and researchers found detectors flag non-native English writing as AI. A suspect filing is better tested by checking its citations and quotations than by a detector score.

What is an AI detector?

An AI detector is a classifier: a model trained to label text as likely human-written or likely AI-written. It looks for statistical patterns typical of machine output and returns a score or a label. It does not find a hidden record of where the text came from, because text from a model that applies no watermark carries none.

OpenAI's description of its own detector shows how such tools are built. Its page announcing a new AI classifier for indicating AI-written text, dated January 31, 2023, says the classifier was "a language model fine-tuned on a dataset of pairs of human-written text and AI-written text on the same topic." The detector learned what the two kinds of text in its training set tended to look like, and guessed from that.

That design sets the limits. A detector can only recognize the patterns it was trained on. Text from a newer model, text in another language, or text a person has edited may not look like its examples. And because a person can write plainly and predictably, human text can look like machine text.

There is a second approach, which marks the text when it is generated rather than guessing afterwards. That is watermarking, covered below. For text with no watermark, a classifier's guess is all there is.

How accurate are AI text detectors?

The most candid published figures come from a model maker about its own tool. OpenAI reported that its classifier identified 26% of AI-written text in a test set and wrongly labelled human text as AI-written 9% of the time. On July 20, 2023, it withdrew the classifier, citing its low rate of accuracy.

The figures appear on the same OpenAI page. In evaluations on a "challenge set" of English texts, the classifier "correctly identifies 26% of AI-written text (true positives) as 'likely AI-written,' while incorrectly labeling human-written text as AI-written 9% of the time (false positives)." A note added at the top reads: "As of July 20, 2023, the AI classifier is no longer available due to its low rate of accuracy."

The page's list of limitations reads like a warning to anyone who would rely on such a tool:

  • Short text. The classifier was "very unreliable on short texts (below 1,000 characters)."
  • Confident errors. "Sometimes human-written text will be incorrectly but confidently labeled as AI-written."
  • Other languages and code. It "performs significantly worse in other languages and it is unreliable on code."
  • Editing. "AI-written text can be edited to evade the classifier."
  • Unfamiliar text. For inputs unlike its training data, "the classifier is sometimes extremely confident in a wrong prediction."

The page also said the tool "should not be used as a primary decision-making tool." Other detectors exist. Any accuracy figure a detector's maker publishes is a result on some test set, and the questions in the post on legal AI benchmarks apply to it.

A detector score is a guess about a document's origin, not evidence of it.

Do AI detectors flag non-native English writers?

One study found they do. Researchers tested several widely used detectors on writing by native and non-native English writers and found the detectors consistently labelled the non-native writing as AI-generated while identifying the native writing correctly. They cautioned against using detectors in evaluative settings.

The paper is GPT detectors are biased against non-native English writers, by Weixin Liang and colleagues, first posted April 6, 2023. Its abstract says the detectors "consistently misclassify non-native English writing samples as AI-generated, whereas native writing samples are accurately identified." It also reports that "simple prompting strategies can not only mitigate this bias but also effectively bypass GPT detectors."

Both findings matter to lawyers. The first means a detector can produce a false accusation that falls hardest on one group of writers, which is a fairness problem before it is a technical one. The second means a person who wants to avoid detection can do so easily, so a clean score proves little.

The authors draw the conclusion themselves. Their results, they write, "caution against their use in evaluative or educational settings, particularly when they may inadvertently penalize or exclude non-native English speakers." A firm evaluating writing samples, or a court weighing an accusation that a document was machine-written, is an evaluative setting.

Watermarks and content credentials for AI-generated content

A watermark is a pattern a model builds into its output, which a matching detector can later look for. It works only for content from a model that applied the watermark. Content credentials are a separate standard that attaches a record of a file's origin and edits. Neither labels text from a model that uses neither.

Google DeepMind's SynthID Text documentation describes a working text watermark. It says "Watermark detection is probabilistic," and that its detector can return one of "three possible detection states": watermarked, not watermarked, or uncertain. The page lists limits in plain terms:

  • Watermark application "is less effective on factual responses, as there is less opportunity to augment generation without decreasing accuracy."
  • "Detector confidence scores can be greatly reduced when an AI-generated text is thoroughly rewritten, or translated to another language."
  • SynthID Text "is not designed to directly stop motivated adversaries from causing harm."

For digital content more broadly, the Coalition for Content Provenance and Authenticity (C2PA) provides an open technical standard called Content Credentials, which it describes as a way "to establish the origin and edits of digital content." It compares the credentials to "a nutrition label for digital content." Where a tool writes those credentials into a file, a reader can see a recorded history. Where it does not, or the credentials are stripped, the file says nothing either way.

The practical point for a lawyer: an absent watermark or missing credentials does not show content is human-made. These tools can confirm a positive in some cases. They cannot confirm a negative.

Suspecting an opposing filing or report was written by AI

When a lawyer suspects an opposing brief, an expert report or a declaration was drafted with AI, the useful questions are the ones that apply to any filing: do the cited authorities exist, do quotations match their sources, and do the factual statements have support. A detector score answers none of them.

Federal Rule of Civil Procedure 11 frames those questions without regard to the drafting tool. Under Rule 11(b), by presenting a paper an attorney certifies, after "an inquiry reasonable under the circumstances," that its legal contentions are "warranted by existing law" or a nonfrivolous argument for changing it, and that its factual contentions "have evidentiary support" or are identified as likely to have it.

A filing with an invented case breaks those duties whether a person or a model invented it. The post on AI hallucination sanctions describes decisions in which courts sanctioned filings that cited cases that did not exist.

The checks that answer the question, in order:

  1. Look up every authority. Confirm each case, statute and rule exists at the cited place.
  2. Compare every quotation. Read the quoted words in the source and confirm they appear as quoted.
  3. Test the propositions. Confirm each authority says what the filing says it says.
  4. Check the record cites. Confirm cited exhibits and transcript pages say what the filing claims.

The post on how to verify AI citations sets out these checks in detail. If they find a problem, the problem is the error, and it can be shown to the court without any claim about how the document was written.

When a document's AI origin is itself the dispute

Sometimes the origin is the issue: a party claims a message, a photo or a recording was generated by AI, or that an opponent's evidence was. Then the question becomes authentication, and a detector's output would itself be evidence about a process, with all the questions that raises.

Under Federal Rule of Evidence 901(a), the proponent of evidence "must produce evidence sufficient to support a finding that the item is what the proponent claims it is." One of the rule's listed examples is "Evidence describing a process or system and showing that it produces an accurate result." The only detector figures cited here are OpenAI's for its own withdrawn classifier, and on those figures that showing would be hard to make.

The other evidence of origin is usually better: metadata, device records, the account and service a file came from, witnesses to its creation, and content credentials where they exist. The post on explainable AI for lawyers notes how the evidence rules frame questions about how a system reached its output. How any court treats a given tool is for that court.

Should a law firm run AI detectors on its own staff's work?

A firm can run a detector, but the published record suggests its output should not decide anything about a person. OpenAI said its own tool should not be a primary decision-making tool, and the bias study cautioned against detectors in evaluative settings. A clear policy on when AI may be used, with review of the work product, does more.

The firm's real concerns are confidentiality, accuracy and supervision: whether client information went into a tool it should not have, whether the work was checked, and whether a supervising lawyer knew. A detector speaks to none of them. A policy that names approved tools, says what may be entered into each and requires verification of output speaks to all three. The post on a law firm AI policy covers what such a policy contains.

For hiring, the same caution applies to writing samples. A detector flag on a candidate's sample may reflect the writer's background rather than the writer's tools, as the study above found for non-native English writers.

Lucerna Law's ethics section sets out the product's controls beside the duty each bears on, and leaves whether they meet a firm's duties to the firm. A firm's own rules on AI use are what make any of that work.

A detector's output is a confidence score attached to a label. The post on AI confidence scores explains what any such score does and does not tell you.