Document splitting

Also known as: page separation

On this page 7

Document splitting is the step in a document processing pipeline that divides a continuous stream of pages, such as a scanned batch or a merged PDF, into separate logical documents by detecting where one document ends and the next begins. In Document AI, it is also called page separation, and it usually runs right after capture and before classification and data extraction.

Splitting matters because downstream models assume they receive one coherent document. A batch that mixes an invoice, a delivery note and a contract will produce wrong field values and wrong classifications if it is processed as a single file, so accurate boundaries are a precondition for reliable intelligent document processing.

How document splitting finds page boundaries

At its core, document splitting is a sequence labeling problem. For every page, the system decides whether the page starts a new document or continues the previous one. Some systems frame it as a binary decision for each pair of adjacent pages, while others assign each page a tag such as first, middle or last.

Modern splitters combine several kinds of evidence. Visual features capture layouts, logos and letterheads; textual features come from OCR, such as a page number reading 1 of 3 or a new invoice number; and sequence context compares each page with its neighbors so that a sudden change in layout or sender becomes a strong boundary signal.

The table below summarizes the signals that splitting models typically use and how reliable each one is.

SignalWhat it capturesReliability
Page numberingPatterns such as 1 of 4 or page 1High when present, often missing
Header and letterheadLogos, sender blocks, title zonesHigh for business correspondence
Document identifiersInvoice, order or case numbersHigh, depends on OCR quality
Layout changeShift in structure or templateMedium, can mislead within one file
Blank or separator pagesEmpty sheets or barcode sheetsVery high when used consistently
Semantic continuitySentences that run across pagesMedium, needs language models
Signals used to detect document boundaries

Approaches to page separation

Page separation has evolved from physical separator sheets toward fully automatic, model-based methods. Many organizations still run hybrid setups in which rules handle predictable batches and machine learning handles the rest.

ApproachHow it worksBest suited forLimitation
Separator sheetsBarcode or patch code pages between documentsControlled mailroom scanningManual preparation, labor cost
Fixed page countSplit every n pagesUniform forms of known lengthBreaks on any variation
Rule-based detectionKeywords, regular expressions, zonesFew known document typesBrittle with new layouts
Classification-basedClassify each page, split on class changeMixed batches of distinct typesMisses two same-type documents in a row
Pairwise boundary modelCompare adjacent pages with neural networksHeterogeneous incoming mailNeeds labeled boundary data
LLM-based splittingMultimodal model reasons over page sequenceComplex, low-volume casesHigher cost and latency
Main approaches to document splitting

Classification and splitting are closely linked. Many pipelines perform joint classification and splitting, because knowing that a page is the first page of an invoice already implies a boundary. However, two consecutive invoices share the same class, so a robust splitter must also detect boundaries within one document type.

Where document splitting fits in a Document AI pipeline

Document splitting sits between document capture and the extraction stage. A typical pipeline receives scans or files, cleans the images with deskewing and binarization, runs OCR and layout analysis, then splits and classifies pages before extraction models read key fields, tables and line items.

  1. Capture pages from scanners, email attachments or uploads.
  2. Preprocess images and run OCR and layout analysis.
  3. Split the page stream into logical documents.
  4. Classify each document and route it to the right extraction model.
  5. Extract fields, validate them and send low-confidence cases to human review.

Because errors propagate, a single wrong boundary affects two documents: one becomes incomplete and the other receives foreign pages. For this reason, production systems often attach an extraction confidence score to each split and route uncertain boundaries to a reviewer instead of passing them silently downstream.

Measuring splitting quality

Splitting quality is measured at two levels. Boundary-level metrics check whether each predicted break matches a true break, while document-level metrics check whether entire documents were reconstructed with exactly the right pages.

MetricWhat it measuresWhy it matters
Boundary precisionShare of predicted breaks that are correctAvoids fragmenting documents
Boundary recallShare of true breaks that are foundAvoids merging documents
Boundary F1 scoreBalance of precision and recallSingle summary for comparison
Exact document matchDocuments with exactly the right pagesReflects real downstream impact
Straight-through rateBatches needing no human correctionDrives operational cost
Common evaluation measures

Exact document match is stricter than boundary F1, because one missed break ruins two documents. Teams should therefore report both metrics on realistic batches, including long documents and runs of similar forms.

Limitations and common mistakes

Document splitting fails most often on ambiguous transitions, such as attachments that follow a cover letter, multi-page tables without headers, or two letters from the same sender printed on identical letterhead.

  • Relying only on page classification, which merges consecutive documents of the same type.
  • Ignoring poor scan quality, because OCR errors hide page numbers and identifiers.
  • Training on clean benchmark data, which rarely reflects real mailroom batches.
  • Dropping blank pages blindly, although they may mark intentional boundaries.
  • Skipping human review for low-confidence splits, which lets errors reach business systems.

In plain words

Imagine someone drops a thick stack of paper on your desk. It holds letters, bills and forms, all mixed together. Before you can file anything, you must find where each document starts and ends.

Document splitting does this job automatically. It looks at each page and asks one question. Is this the start of something new? Once the stack is divided correctly, every document can be read and filed properly.

A real-world example

A logistics company receives about 8,000 scanned pages per day from drivers and partners. Each scan batch can mix delivery notes, customs declarations, invoices and damage reports, and drivers rarely insert separator sheets.

The company introduces a model-based splitter that compares each page with its neighbors using layout, OCR text and identifiers such as shipment numbers. Boundaries with a confidence below a set threshold go to a review screen where an operator confirms or corrects the split with a single click.

After three months, boundary F1 reaches about 0.97 on live batches, and the share of batches processed without any human correction rises from roughly 40 percent to over 80 percent. Downstream extraction errors fall as well, because the invoice model no longer receives customs pages mixed into its input.