Configuring a Splitter

Splitter Configuration

“Splitters” break down multi-page documents into separate, organized sections. These can be configured via either the UI or the API.

Example API Usecases

Webhooks

You can consume splitter outputs via webhooks, track updates to your splitter, and more. See Webhook Events for details.

Configurable Fields

You can view full details of the SplitConfig in our API reference.

When working with the SplitConfig, you can configure several key aspects, such as:

  • Split Classifications - Define the possible sub-documents inside the document you wish to split
  • Split Rules - Custom instructions that guide how the splitter divides documents
  • Base Processor - Specify which splitting model to use (required)
  • Advanced options - Configure split methods, page ranges, Excel sheet splitting, and other specialized settings
  • Parse Config - Configure how documents are parsed before splitting

Splitter Configuration Example

1const splitConfig = {
2 baseProcessor: "splitting_performance",
3 splitClassifications: [
4 {
5 id: "purchase_contract",
6 type: "PURCHASE_CONTRACT",
7 description: "Purchase contract section",
8 },
9 {
10 id: "addendum",
11 type: "ADDENDUM",
12 description: "Addendum section",
13 },
14 ],
15 splitRules: "- If ...", // Optional custom rules
16 advancedOptions: {
17 splitMethod: "high_precision",
18 splitIdentifierRules: "Use contract number as identifier"
19 },
20 parseConfig: {
21 target: "markdown",
22 chunkingStrategy: { type: "page" }
23 }
24};