Skip to content

Extracting Warranty Disclaimers From a Contract's Boilerplate Section

10 min read · updated August 11, 2026

THE PRODUCT IS PROVIDED “AS IS” is not shouting. It is a drafting convention responding to a statutory requirement that the disclaimer be conspicuous, which makes the capital letters part of the content — and the first thing every text pipeline discards.

Why the formatting is data

Contract extraction almost always runs over a normalised text stream: PDF to text, or a layout model to markdown, then clause segmentation, then a model call. Every stage in that chain is designed to throw away presentation, because for most clauses presentation carries nothing. A liability cap set in bold means the same as one set in roman.

Warranty disclaimers are the exception, and they are the exception by statute rather than by convention. For sales of goods in US jurisdictions that have adopted Article 2 of the Uniform Commercial Code, a disclaimer of certain implied warranties has to be conspicuous to be effective, and conspicuousness is defined by reference to how the text looks. So a pipeline that flattens case and drops font metadata has destroyed the evidence for the question its user is going to ask next, and no amount of prompt engineering downstream recovers it.

The practical consequence is architectural rather than linguistic. The decision to preserve formatting has to be made at the PDF or layout stage — the same stage where text extraction from PDFs decides everything else it keeps — not at the model call, because by then the information is already gone.

What the UCC actually requires

Article 2 of the UCC, published by the Uniform Law Commission and the American Law Institute and adopted with variations by US states, deals with exclusion of implied warranties in §2-316, as hosted by Cornell’s Legal Information Institute. The section distinguishes the two main implied warranties: an exclusion of the implied warranty of merchantability must mention merchantability and, if in writing, must be conspicuous; an exclusion of the implied warranty of fitness for a particular purpose must be in writing and conspicuous. The section also recognises that expressions like “as is” or “with all faults” can call the buyer’s attention to the exclusion.

“Conspicuous” is not left to taste. It is a defined term in Article 1 — §1-201(b)(10) — framed around whether a reasonable person against whom the term operates ought to have noticed it, and the definition gives examples: a heading in capitals of a size equal to or greater than the surrounding text, and body language in larger type, contrasting type, font or colour, or set off by symbols. Whether a particular clause meets the standard is decided by a court, not by a validator; the point for extraction is that the test refers to observable typographic properties, so those properties are worth carrying.

The UCC is adopted state by state and states amend it. Treat the above as the reason to capture formatting, and take the operative text of any particular jurisdiction from that state’s own code. Nothing here is legal advice about whether a given disclaimer works.

What to capture from the layout layer

Most PDF text libraries expose per-span font information even when the convenience API returns a bare string. Preserve, per clause span:

  • The raw text with case intact. Obvious, and routinely lost to a .lower() in a normalisation step written for keyword matching.
  • Font size for each run, plus the median font size of the document body, since the test is relative rather than absolute.
  • Font name and weight. Bold is usually visible in the font name (a -Bold suffix or a distinct PostScript name) rather than in a flag.
  • Colour, on the rare occasions it differs.
  • Whether the span is preceded by a heading, and whether that heading is itself capitalised — “DISCLAIMER OF WARRANTIES” over roman body text is one of the two shapes the definition explicitly contemplates.
  • Small caps, which look like capitals and are not capitals. Some fonts implement them as a distinct font, others by scaling; either way the extracted characters may be lowercase while the rendered text is not. If your pipeline decides case from characters alone, this case is silently wrong in the direction that matters.

A scanned contract has none of this, only pixels, and an OCR layer gives you back characters plus a bounding box. Height of the bounding box is a usable proxy for type size and case is usually recoverable, but weight is not, and OCR error rates on long all-capital passages are typically worse than on mixed case because the shape cues that disambiguate letters are reduced. That is a real limitation to record rather than paper over.

Computing a conspicuousness signal

You are not deciding a legal question; you are giving a reviewer the facts in one field instead of making them open the PDF. Three cheap derived numbers do most of the work:

caps_ratio  = uppercase_alpha_chars / total_alpha_chars
size_ratio  = median_span_font_size / document_body_font_size
bold_ratio  = bold_chars / total_chars

formatting_flag = caps_ratio > 0.9
               or size_ratio > 1.0
               or bold_ratio > 0.9
               or heading_is_capitalised

The thresholds are arbitrary defaults you should tune to your corpus, and the flag is a routing signal, not a conclusion — it belongs in threshold-based review routing rather than in the extracted record. The useful output is the underlying numbers stored alongside it, so a reviewer sees “caps ratio 0.14, no capitalised heading” and knows in one glance that a disclaimer was set in ordinary body text. That is a finding. “Conspicuous: false” on its own is an assertion your system is not entitled to make.

Extract the substantive fields too, since the formatting is only half of it: which warranties are disclaimed (merchantability, fitness for a particular purpose, non-infringement, title, quiet enjoyment), whether the clause uses “as is” or “with all faults”, which express warranties are given elsewhere and survive, and any consumer carve-out (“some jurisdictions do not allow the exclusion of implied warranties, so the above may not apply to you”) whose presence tells you the drafter expected consumer buyers.

Where it goes wrong

  • Markdown conversion. A layout model that returns markdown may render an all-caps block faithfully, or may sentence- case it as a formatting improvement. Test that specifically before trusting the chain; it is the kind of helpfulness that is invisible in a diff of extracted fields.
  • The disclaimer spans a page break, so the first half is capitalised and the second half, measured alone, is not. Compute the ratios over the reassembled clause.
  • Whole-document capitals. Some templates set every boilerplate clause in capitals, at which point capitalisation distinguishes nothing — which is itself worth flagging, because the statutory test is relative to the surrounding text.
  • Disclaimer by cross-reference. “Except as set out in Section 8, all warranties are excluded” puts the operative exclusion in one clause and the surviving warranties in another; extracting either alone reverses the meaning.
  • The clause is in a linked online terms page rather than the signed document, in which case the formatting question is about HTML and CSS and the same principle applies to a different layer.