Document chunk boundaries

Give ingestion owners a structural regression set

Parser upgrades can change the meaning of retrieved passages without changing the source files. Hand over examples that show which document relationships must survive.

In this article

Select documents by failure shape

Build the regression set around structures the ingestion service must handle. Include a table spanning pages, nested headings, a repeated page header, a scanned page and a document with an appendix. Add examples from actual support findings after checking that the material can be retained.

Do not choose only the cleanest documents. A fixture of well-formed Markdown cannot tell an operator whether a PDF extraction upgrade still handles the reports the business uploads. At the same time, avoid a huge archive with no expected results. A small, explained set is easier to maintain.

For each document, state which relationship matters. The second-page row must retain its unit. The appendix must have its own heading path. The footer must not become part of every paragraph. These statements give the receiving team something concrete to verify.

Keep source, extraction and passages together

Retain the original file, parser configuration, extracted structure and representative emitted passages. Record the source and chunking versions used. This makes it possible to determine whether a later difference came from the input, the parser or the splitting rules.

Where exact text can legitimately vary, define a semantic check rather than a byte-for-byte snapshot. A parser may improve whitespace without changing meaning. Conversely, an apparently small column-assignment change can be important even when most of the text is identical.

Include a way to view the source beside the derived record. Operators should not have to reconstruct a complicated development environment merely to confirm that a heading was attached to the wrong paragraph.

Assign decisions as well as execution

The ingestion owner can run a comparison, but a domain owner may need to decide whether a changed interpretation is acceptable. Name both roles and the escalation path when a document cannot be processed reliably.

Document how failed sources are held, retried or excluded from answering. A queue of unparseable files needs an owner and a visible age, not only a log message. Explain what the application tells users while their document is unavailable.

Set expectations for parser and model upgrades. A new version should be compared against the structural fixture before broad reprocessing. Record any deliberate change to the expected output rather than updating snapshots until the test turns green.

Demonstrate a routine change during handover

Ask the receiving team to process a modified fixture that introduces a new heading or moves a table across a page break. Have them inspect the difference, decide whether it is acceptable and publish the resulting version through the normal path.

This exercise exposes missing permissions, undocumented scripts and assumptions that exist only in the original developer's memory. Correct those while the delivery team is available.

Finish with the location of the fixture, the command that runs it, the evidence it produces and the person who reviews failures. Those details make the handover useful when an upgrade arrives months later and the visible application still appears unchanged.

Primary sources

Microsoft Learn: document layout analysisMicrosoft Learn: layout-based chunking workflow

References checked 11 September 2026.