Why AI Changes Contract Numbering and Defined Terms

Published · 12 min read

A contract comes back from an AI drafting workflow with the right commercial terms, but Section 4.2 now points to a different clause. A definition is still in the definitions section, yet the body uses the term with different capitalization. The document looks plausible, so a quick read can miss both errors.

AI for legal firms can change contract numbering and defined terms in two ways: it can rewrite the text, and the workflow can alter the document structure while converting or saving it. Test both. Compare each changed clause with the original and the intended edit, then check the Word file's numbering, cross-references, defined terms and rendered output.

Why Word numbering changes during conversion

A Word contract isn't always a block of text with visible digits typed at the start of each paragraph. Word can store numbering instructions separately, linking each paragraph to a numbering instance and level. During conversion, the software has to interpret those connections to reproduce the labels. If it treats the document as plain text, numbering can disappear, restart or move to a different level.

This matters when a workflow converts a DOCX (a Word document file) to HTML or Markdown, sends extracted text to a model, then rebuilds a Word document from the result. The model may receive the clause wording and some visible labels, while the conversion code has to preserve or recreate the list structure. Correct wording doesn't prove that the clause number or its relationship to other clauses stayed correct.

Microsoft's Open XML documentation explains that numbered and bulleted lists need specific processing for accurate conversion to HTML because list labels affect the document's text but aren't present in paragraph markup as ordinary text. The documentation also describes Word numbering definitions and patterns, including numbering attached directly to paragraphs or through styles (Microsoft's WordprocessingML numbering documentation, published in March 2010).

Numbered items and bulleted lists are complex, and justifiably so.

That complexity affects more than formatting. If a nested clause loses its level, its number may appear to identify a different provision. Check the list structure and the final display, not just the words shown by an extraction tool.

What you see in Word What the workflow may need to preserve What to check
A clause number beside a paragraph The paragraph's connection to a numbering instance and level Does the number and nesting match the template?
A heading with an automatic number The heading style or numbering definition used to generate its label Does the heading still have the right number after edits?
A reference to a numbered clause The field and bookmark that connect the reference to its target Does the reference display and lead to the intended clause?
A defined term in the body The term's spelling, capitalization and relationship to its definition Is it defined, used consistently and still needed?

A numbering error can happen even when no one asks the AI to change numbering. Inserting a new provision, for example, can renumber later clauses. A conversion that flattens headings into plain text may lose the instructions Word uses to generate numbers. The model can then return plausible prose with labels that don't match the rebuilt document.

The practical question for your firm is whether its workflow preserves the structures in its templates. A contract with simple numbering may pass while a template with nested sections or style-based headings fails.

Cross-references depend on fields and bookmarks

A cross-reference is a Word field, an instruction that displays information about another item in the document. Word uses a hidden bookmark to track the referenced item. A bookmark marks part of the document, though readers normally can't see it. If an edit moves, splits or replaces the target, the reference may show stale or incorrect information until the field is updated, or it may lose its target.

Word uses a hidden bookmark to track an item that has a cross-reference.

That hidden connection is why the displayed reference isn't enough. The section number can look reasonable while the link points to the wrong heading. Open the cross-reference and confirm it identifies the intended clause, especially after insertions, deletions or heading edits.

Microsoft warns that inserting a new numbered item at the start of a referenced item can expand the bookmark, causing the cross-reference to display or link to more content than intended after fields are updated. To repair it, undo the edit, insert from the end of the preceding item instead, then select the document and update its fields. If you can't undo the edit, delete and recreate the affected cross-reference (Microsoft's guidance on creating cross-references).

A separate Word issue shows how splitting a heading can shift the target. When a user presses Enter at the beginning of a cross-referenced outline-numbered heading, the updated cross-reference can point to the new heading rather than the original. The hidden bookmark stays put when the heading is split (Microsoft's troubleshooting article, accessed in 2026).

Use those situations in your tests. Put a referenced heading at the start of a test clause, insert or split content around it, update fields, and confirm the reference still identifies the intended text. Don't accept a document just because Word displays a section number without an error message.

Microsoft instructs users to select the document and press Ctrl+A, then F9, to update fields. Fields in tables may need to be selected and updated separately. A field may not update if its referenced item no longer exists or its bookmark is broken (Microsoft's field-update instructions).

Sometimes a field is not updated because the item the field refers to no longer exists. The link or bookmark might also be broken.

Updating fields belongs in the acceptance check, but it isn't the whole check. An updated field can still point to the wrong heading if the bookmark now tracks the wrong text. Check both what the reference displays and where it takes the reader.

Defined terms fail in the wording, not just the layout

A defined term is a word or phrase that a contract assigns a specific meaning, often in a definitions section. A contract can keep its layout and still break that relationship: the workflow might alter capitalization, use a term that was never defined, leave a definition unused, duplicate a definition, or change a defined term without updating every clause that uses it.

These errors can be hard to spot when you read one clause at a time. "Effective Date" may be defined correctly in one section, but an AI edit could change its capitalization or substitute a similar phrase elsewhere. The paragraph can read smoothly while no longer using the contract's defined term consistently.

The 2026 ContractScrub paper describes a benchmark for final contract review built around lawyer-crafted contracts containing errors such as misuse of defined terms and incorrect internal references. Its error categories include undefined terms, unused terms, duplicated definitions, capitalization errors and incorrect section, article or paragraph references (ContractScrub, submitted to arXiv in August 2026).

The benchmark reports that only one tested model reached a macro-average recall of 0.75 on its curated dataset. Use specific error types to test your own documents rather than relying on a general claim that a model can review contracts.

For each template, record the defined terms before and after the workflow. Check whether each term has a definition, whether the definition is used, whether the spelling and capitalization stay consistent, and whether a removed or renamed term has been updated everywhere. Automated term searches can flag candidates, but a person still has to decide whether each use carries the intended legal meaning.

Compare each clause against the original

A clause-by-clause comparison records the original wording, the intended edit and the generated result for every clause the workflow should change. That lets you separate an acceptable drafting change from a structural or meaning error, instead of trusting a polished final document to show what happened.

A useful test can start with your own templates and a small set of examples that expose the failure modes you care about. Keep the source DOCX, the instruction or input describing the requested edit, the generated DOCX and a rendered or exported copy together so you can compare them.

  1. Choose representative clauses. Include simple and nested numbering, headings referenced elsewhere, definitions, and provisions likely to be inserted, deleted, moved, renamed or edited. Use real template patterns, with sensitive details removed where needed.
  2. Write down the expected change. State what the AI may alter, what must remain unchanged and which numbering or defined terms should still appear. A vague instruction such as "improve this section" makes it hard to spot a fault.
  3. Run the same workflow you plan to use. Test the full route from input to output, including conversion, text replacement, document assembly, saving and export. A model-only test leaves out the tools that turn its text back into a contract.
  4. Compare source, expected and generated clauses. Check whether the wording matches the requested change and whether anything else changed. Compare clause labels and headings as well as sentences.
  5. Update fields and verify targets. In Word, update fields and follow each tested cross-reference to its target. Check the displayed text, the destination and references inside tables.
  6. Check defined terms across the document. Find each tested definition and every use. Mark terms that are undefined, unused, duplicated, inconsistently capitalized or still present after removal or renaming.
  7. Inspect the saved and rendered files. Open the generated DOCX in Word and compare it with an exported or rendered copy. Confirm that numbering, nesting, cross-reference displays and clause text appear in both.
  8. Record failures and retest repairs. Note the clause, the input, the result and the correction. Rerun the same example after a workflow change to check whether the repair fixed the problem without creating another one.

Keep the comparison in a table with the test materials:

Clause or feature Original template Expected result Generated result Check
Inserted provision Existing clause and numbering New provision in the intended position What the workflow produced Number and later references still match
Cross-referenced heading Heading and reference target Same target after the edit Displayed reference and destination Field is current and points to the intended heading
Defined term Definition and uses Intended spelling and meaning preserved Definition and each use No missing, stray or inconsistent uses
Nested clause Existing levels and labels Intended hierarchy preserved Displayed labels and structure Numbering level and restart are correct

Treat each row as a test case, not a box to tick once and forget. If the workflow changes its conversion library, document assembly or editing instructions, rerun the relevant cases. A workflow can pass one template and fail another because the templates use different heading styles, numbering patterns or cross-reference structures.

A useful comparison shows the original evidence

A text-only comparison can hide why something doesn't match. When you test document conversion, show the reviewer the source evidence beside the generated text: the original clause or numbering and the changed clause, in the same review view. The reviewer shouldn't have to guess whether a number came from the source or was reconstructed during conversion.

We faced a similar decision while working on a document conversion system that turns scans and PDFs into editable Word files. Handwritten names on scanned documents were the hardest values for the system to read, and a translation for an immigration office needed every letter of a name right. We stopped automating that step rather than keep tuning automatic correction: four automatic fixes in a row made the copies worse, while a person comparing the name with the original image could check it by eye in seconds. The translator sees a crop of the original scan next to each handwritten value and checks it directly.

That doesn't mean every contract workflow needs a person to inspect every source character. For printed text, where automatic reading is reliable, showing a crop beside every value only slows the translator down. The useful point is narrower: when automation makes an error hard to judge from its output alone, keep the evidence next to the result so the reviewer can decide quickly.

For clauses, the evidence can include the source clause, its original heading and number, the expected change, and the generated version. For Word cross-references, show both the displayed reference and the target clause. For defined terms, show the definition and the clauses where the term is used. The reviewer can then spot changes in structure or meaning without treating the generated document as proof of its own accuracy.

A two-column view can help, but visual similarity doesn't prove the underlying file is correct. A clause can appear in the right place while its cross-reference field points elsewhere. The reviewer needs to see the displayed result and have a way to verify the destination.

What to do when the output looks right but fails

A document may look correct before fields are updated, then fail afterward. In one document assembly bug report, a DOCX initially appeared correct, but updating references changed a cross-reference to "Error! Reference source not found." The reporter traced the problem to malformed bookmark boundaries in the composed document (docassemble issue opened January 31, 2025).

The sequence is useful for testing: inspect the document before and after updating references, and include document assembly rather than testing only extracted text or model output.

results in the first reference (1.1) being replaced by Error! Reference source not found.

A failed reference after an update shows that the display alone didn't reveal the underlying problem. If your test produces that result, check whether the target was deleted, the bookmark was damaged or the composition step changed the document structure. Then rerun the same case after adjusting the workflow, and verify the updated field and destination.

Acceptance testing can miss problems when you compare only the wording, check only a PDF or rendered copy, or assume a clean-looking AI answer proves its references are sound. A text diff can show changed words but miss a broken Word field. A visual export can show numbering but may not show whether a clickable cross-reference leads to the correct clause. Check both.

Keep a small set of difficult cases rather than a pile of easy examples. Include an inserted and a deleted clause, a moved section, nested numbering, a heading with a cross-reference, and definitions that are introduced, removed or renamed. Compare the saved Word file with a rendered version, update fields, and check that each reference still resolves. Those cases test what can get lost between Word's structures and the text the model edits.

A drafting workflow is ready for review only when you can trace its result back to the source and check it against the intended change. If you can't verify a number, term or reference from the original clause and the final Word document, find the point where the workflow changed it before relying on the tidy formatting.

Want this done for your business?

An AI agent from $500, a document assistant from $800, fixed price and deadline. Or describe your task and get a plan with a price for each step

Questions people ask

Why does AI change the numbering in a Word contract?

Word can store list numbering separately from the paragraph text. A conversion that treats the file as plain text may misread that structure and reconstruct the labels incorrectly.

Can AI break defined terms and cross-references in a contract?

Yes. Rewriting can change a defined term's capitalization or use, while document edits or conversions can break bookmarks, fields or the numbering that a cross-reference relies on.

How do I test AI drafting on my firm's Word templates?

Use representative template clauses and controlled edits, then compare each source clause with its expected and generated versions. Check the saved Word file and an exported or rendered copy, including updated fields and defined-term use.

How can I check whether contract clause references still point to the right section?

Update the Word fields, then follow each reference to its target and confirm the displayed text and destination are correct. Microsoft also recommends checking fields in tables separately when needed.

Does converting a DOCX contract to HTML or Markdown damage numbering?

It can, if the converter does not interpret Word's numbering structure. Microsoft documents that Word list labels are not directly present as ordinary paragraph text, so accurate conversion needs specific list processing.

Sources

  1. Working with Numbered Lists in Open XML WordprocessingML
  2. Create a cross-reference
  3. Update fields
  4. Cross-reference links do not update to the correct heading number after you insert a new heading
  5. ContractScrub: A benchmark for final review of legal contracts
  6. using include_docx_template may corrupt cross references in the resulting Word document