I work on HumanPen, a document-level AI humanizer, so treat this as a builder writing about their own problem, not a neutral survey. Most of the engineering below applies to anything that rewrites prose inside real office files, whatever the rewrite is for.

The naive pipeline is three steps: extract the text, send it to a model, paste the result back. Fine for a blog post. It falls apart the moment the input is a paper with citations, tables, cross-references and a table of contents.

Why the round trip is lossy

A .docx is a zip of XML parts: the body in word/document.xml, footnotes, headers, numbering, styles and embedded objects each in their own part, wired together by a relationship graph and integer ids.

Inside the body a sentence is almost never one node. Word splits a paragraph into runs whenever any property changes. Italicise one species name, insert a citation from Zotero, and one sentence becomes five runs, two of them inside a field.