Overview
The document splitting feature in Extract API is designed for scenarios where multiple documents of the same type are combined into a single file (e.g., a single PDF file containing five different invoices). If you have a document with multiple documents of different types, you can use Document Classify to split the document into multiple documents.
How it works
The separation logic is primarily schema-driven. The model analyzes the document to identify how many times the structure defined in your schema appears.
For instance, consider a single file containing five invoices from the same company, each with a unique invoice number:
- Broad Schema: If your schema only defines generic fields like
issuing_company, the model may interpret the entire file as a single document and return one extraction result. - Specific Schema: If your schema defines specific identifiers like
issuing_companyandinvoice_number, the model detects five distinct sets of information and splits the output into five separate extraction results.
Minimum Unit
The minimum unit for document splitting is a page. The model splits documents at page boundaries and cannot split content within a single page (e.g., two receipts scanned onto a single page cannot be separated).
Document split in Information Extract vs Document Classify
Document splitting is available in both Information Extract and Document Classify, but they operate on different principles and serve different use cases.
| Feature | Information Extract | Document Classify |
|---|---|---|
| Minimum Unit | Page (cannot split content within a single page) | |
| Target Document Type | Homogeneous (Same type) (e.g., A file containing 5 Invoices) | Heterogeneous (Different types) (e.g., An Application, ID card, and Bank Statement in one file) |
| Separation Criteria | Schema Separates based on how often the schema structure appears in the document. | Class Description & Split Criteria Separates based on predefined document classes and split rules. |
Usage
To enable this feature, simply use the split option in your request.
Each responses of splitted schema will be returned as a separate item in the choices list.
Request For client setup, check simple extraction for more details.
Response
Location coordinates
Return the page coordinates of each extracted field with the location and location_granularity options, then parse and visualize them on the source document.
Confidence
Learn how to obtain confidence for extracted information to assess reliability and implement Human-in-the-Loop workflows.