Hallucination Is a Pipeline Design Problem

The most famous AI failure in legal practice came down to a verification step that did not exist. In Mata v. Avianca, Judge P. Kevin Castel's June 22, 2023 opinion imposed a $5,000 penalty, jointly and severally, on two lawyers and their firm for submitting nonexistent cases generated by ChatGPT. He wrote that "there is nothing inherently improper about using a reliable artificial intelligence tool for assistance," and that "existing rules impose a gatekeeping role on attorneys to ensure the accuracy of their filings." The opinion also records that no respondent sought to withdraw the filing after the defendant questioned the citations, and that the lawyers continued to stand by the fake opinions after the court's own orders called their existence into question. The model produced fiction, and the process around it had no step that would have caught it.

I read that as a design observation. A language model that sometimes asserts things the record does not support is a known property of the component. Whether that property reaches a court filing, or a production set, depends on what sits between the model's output and the person who relies on it.

Document review is a friendlier place to see this than legal research, because the ground truth is sitting right there. Every claim the model makes about a document can be checked against the document. DISCO's product page for its Auto Review feature is vendor material and should be read as such, and it describes the pattern plainly. The legal team supplies tag descriptions that, in the page's words, define "the criteria for document relevance, similar to a traditional review protocol." The model suggests which tags apply and gives "explanations for every tagging decision," which the page says lets teams "move directly to quality control (QC) much faster." The page does not say whether an explanation points to specific passages in the document, and it does not mention an audit trail.

That gap is where the engineering lives. An explanation written in free text is another model output, and it can hallucinate just as the coding call can. A reviewer who trusts a fluent rationale has re-created the Avianca situation at smaller scale. The design question is whether the pipeline forces the rationale to point at something checkable.

A pipeline that takes the problem seriously treats every model output as a proposal with a schema. A coding decision carries the tag, a confidence signal, and the exact spans of text it relied on, expressed as offsets into the stored document. A deterministic step then confirms that those spans exist in the document and that they say what the rationale claims they say, at least to the level of string presence. Outputs that fail the check never reach a reviewer as a finished call. They route to a human queue marked as unsupported. The added machinery is a validator, a document store with stable offsets, and a decision to treat an unverifiable rationale as a defect.

The second layer is statistical. Some errors are plausible misreadings of a tag description that a span check will pass. Sampling catches those: a stream of model decisions gets pulled for human re-review at a rate set in advance, and the disagreement rate becomes a tracked number with a threshold that triggers a halt. A pipeline without this loop has no way to notice drift when a prompt is edited or a model version changes underneath it.

The business consequence arrives through cost and exposure at the same time. Review has long been the expensive part of discovery. A 2012 RAND study of what litigants spend producing electronic discovery, as relayed by HaystackID, found review took about 73 percent of total expenditure, against 19 percent for processing and 8 percent for collection. That is old data from a different technology era, and it still explains why vendors aim at review first. A tool that cuts reviewer hours attacks the largest line item. If the verification layer is thin, the savings convert into a different liability. A production built on unchecked model calls is exactly the kind of record that a challenger will want to examine, and the next two posts in this series look at what that examination tends to ask for.

Courts have started to address this directly, and an early ruling did not create a separate standard. In Schulte v. LinkedIn (N.D. Cal., order signed June 30, 2026), Magistrate Judge Laurel Beeler allowed LinkedIn to use Relativity aiR for responsiveness review. Law firm commentary from Arnold & Porter, DLA Piper, and WilmerHale describes the court as treating generative AI review under principles traditionally applied to technology-assisted review. The court denied the plaintiffs' request for elusion estimates and reviewer counts, because the plaintiffs had not shown a specific deficiency in the production. The account here follows that commentary. A single magistrate ruling binds no other court, and the governing ESI protocol in that case required disclosure of TAR use, so the outcome depends on those facts.

That matches the Avianca logic: judges looked at the gatekeeping around the tool and left the tool's inner workings to the engineers. "The AI hallucinates" describes a component. What matters to a litigant is whether the system around it was built to catch what the component gets wrong, and whether it can show that it did.


Sources: Mata v. Avianca, Inc., No. 22-cv-1461 (PKC), Opinion and Order on Sanctions, ECF 54 (S.D.N.Y. June 22, 2023); DISCO, Auto Review product page (csdisco.com/offerings/auto-review), vendor material; Nicholas M. Pace and Laura Zakaras, "Where the Money Goes: Understanding Litigant Expenditures for Producing Electronic Discovery," RAND Institute for Civil Justice (2012), via HaystackID's summary; Arnold & Porter eData Edge (July 21, 2026), DLA Piper (July 2026), WilmerHale (July 20, 2026), and eDiscovery Today (July 27, 2026), on Schulte v. LinkedIn Corp., No. 22-cv-00237 (N.D. Cal. June 30, 2026). This series offers observations about software design and is not legal advice.