Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.
ai.segment: Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.
Configuration
Configuration goes inside the step’s with: block.
string
required
Template expression resolving to ai.parse output, e.g. ”{{ steps.parse.output }}”
array<object>
required
The document-type taxonomy. The LLM tags each detected document with one of these names, or the reserved “unknown” type when none fit.
Show documentTypes properties
string
required
Type label returned in documents[].type (e.g. “timesheet”, “deal-memo”)
string
What this document type looks like, headings, layout, vocabulary, and the cues that mark its FIRST page. Fed to the LLM for both boundary detection and typing.
string
Optional natural-language rules appended to the system prompt.
string
Provider ID from eigenpal.config.yaml. Falls back to the tenant default LLM provider when omitted.
Documents the segmenter could not label (type “unknown”), escalate to a human.
Documents with low boundary/type confidence.
Per-type document counts.
Documents to escalate to a human operator, with the reason for each.
Show needsReview properties
Documents discovered in the batch, in page order. The full batch is covered.
Show documents properties
0-based position of this document in the batch
Chosen type name from the taxonomy, or “unknown”
[startIndex, endIndex] inclusive, 0-based page indices
LLM confidence at the boundary + type. Coarse enum (low | medium | high).
LLM justification for the boundary, useful for debugging
Structured start evidence, parse this instead of regexing over notes.
Show evidence properties
Verbatim heading/title text the LLM cited as the document start
Page where the start appears
Joined per-page content for this document, ready for downstream ai.extract
Raw per-page records covered by this document, in page order.
Show pages properties
Pages with direct LLM boundary evidence
Pages assigned by deterministic continuity fill
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"EigenPal Docs","colors":{"primary":"#2EB52E","light":"#5CD65C","dark":"#1E8E1E"},"logo":{"light":"https://mintcdn.com/eigenpal/hcNh17xOVYi-SRf0/logo/light.svg?fit=max\u0026auto=format\u0026n=hcNh17xOVYi-SRf0\u0026q=85\u0026s=fb237cefefd3e0cf02c7cc66f475fbd1","dark":"https://mintcdn.com/eigenpal/hcNh17xOVYi-SRf0/logo/dark.svg?fit=max\u0026auto=format\u0026n=hcNh17xOVYi-SRf0\u0026q=85\u0026s=476cffae2975f509c09ebbdd2512e8ce"},"favicon":"https://mintcdn.com/eigenpal/hcNh17xOVYi-SRf0/logo/icon.svg?fit=max\u0026auto=format\u0026n=hcNh17xOVYi-SRf0\u0026q=85\u0026s=e36fcb03fa038cb338c5837687682096","footer":{"socials":{"github":"https://github.com/eigenpal"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"eigenpal","hasAudioNarration":false,"actualSubdomain":"eigenpal","customDomains":["docs.eigenpal.com"],"gitSource":{"type":"github","owner":"eigenpal","repo":"eigenpal","deployBranch":"production","contentDirectory":"apps/docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af6ff4ee0e076832780d2a2","clientVersion":"0.0.4142","searchFilterCounts":[{"language":"default","tag":"API reference","count":103},{"language":"default","tag":"Documentation","count":78},{"language":"default","tag":"Workflow steps","count":39},{"language":"default","tag":"Evaluation","count":38},{"language":"default","tag":"SDKs","count":23},{"language":"default","tag":"Transform steps","count":16},{"language":"default","tag":"Guides \u0026 tutorials","count":15},{"language":"default","tag":"CLI reference","count":14},{"language":"default","tag":"CLI","count":14},{"language":"default","tag":"Automations","count":13}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"steps/ai/segment","slug":"/steps/ai/segment","pageMetadata":{"title":"Separate Documents","description":"Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.","href":"/steps/ai/segment"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,p:`p`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,ResponseField}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.code,{children:`ai.segment`}),`: Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.`]}),`\n`,_jsx(Heading,{level:`2`,id:`configuration`,children:`Configuration`}),`\n`,_jsxs(_components.p,{children:[`Configuration goes inside the step’s `,_jsx(_components.code,{children:`with:`}),` block.`]}),`\n`,_jsx(ParamField,{path:`input`,type:`string`,required:true,id:`param-input`,children:_jsx(_components.p,{children:`Template expression resolving to ai.parse output, e.g. ”{{ steps.parse.output }}”`})}),`\n`,_jsxs(ParamField,{path:`documentTypes`,type:`array\u003cobject>`,required:true,id:`param-document-types`,children:[_jsx(_components.p,{children:`The document-type taxonomy. The LLM tags each detected document with one of these names, or the reserved “unknown” type when none fit.`}),_jsxs(Expandable,{title:`documentTypes properties`,children:[_jsx(ParamField,{path:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`Type label returned in documents[].type (e.g. “timesheet”, “deal-memo”)`})}),_jsx(ParamField,{path:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`What this document type looks like, headings, layout, vocabulary, and the cues that mark its FIRST page. Fed to the LLM for both boundary detection and typing.`})})]})]}),`\n`,_jsx(ParamField,{path:`rules`,type:`string`,id:`param-rules`,children:_jsx(_components.p,{children:`Optional natural-language rules appended to the system prompt.`})}),`\n`,_jsx(ParamField,{path:`provider`,type:`string`,id:`param-provider`,children:_jsx(_components.p,{children:`Provider ID from eigenpal.config.yaml. Falls back to the tenant default LLM provider when omitted.`})}),`\n`,_jsx(ParamField,{path:`reasoningEffort`,type:`\"none\" | \"minimal\" | \"low\" | \"medium\" | \"high\" | \"xhigh\" | \"max\"`,id:`param-reasoning-effort`,children:_jsx(_components.p,{children:`Reasoning effort for models that support it. Omit to use the selected model’s default.`})}),`\n`,_jsx(ParamField,{path:`windowTokenBudget`,type:`integer`,id:`param-window-token-budget`,children:_jsx(_components.p,{children:`Override the per-window token ceiling. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET or 20000.`})}),`\n`,_jsx(Heading,{level:`2`,id:`output`,children:`Output`}),`\n`,_jsxs(ResponseField,{path:`summary`,type:`object`,required:true,children:[_jsx(_components.p,{children:`Batch-level escalation summary: labelled vs unlabelled counts + docs needing review.`}),_jsxs(Expandable,{title:`summary properties`,children:[_jsx(ResponseField,{path:`total`,type:`integer`,required:true,children:_jsx(_components.p,{children:`Total documents discovered.`})}),_jsx(ResponseField,{path:`labelled`,type:`integer`,required:true,children:_jsx(_components.p,{children:`Documents assigned a known taxonomy type.`})}),_jsx(ResponseField,{path:`unlabelled`,type:`integer`,required:true,children:_jsx(_components.p,{children:`Documents the segmenter could not label (type “unknown”), escalate to a human.`})}),_jsx(ResponseField,{path:`lowConfidence`,type:`integer`,required:true,children:_jsx(_components.p,{children:`Documents with low boundary/type confidence.`})}),_jsx(ResponseField,{path:`byType`,type:`record\u003cstring, integer>`,required:true,children:_jsx(_components.p,{children:`Per-type document counts.`})}),_jsxs(ResponseField,{path:`needsReview`,type:`array\u003cobject>`,required:true,children:[_jsx(_components.p,{children:`Documents to escalate to a human operator, with the reason for each.`}),_jsxs(Expandable,{title:`needsReview properties`,children:[_jsx(ResponseField,{path:`index`,type:`integer`,required:true}),_jsx(ResponseField,{path:`type`,type:`string`,required:true}),_jsx(ResponseField,{path:`page_range`,type:`array\u003cinteger>`,required:true}),_jsx(ResponseField,{path:`reason`,type:`\"unlabelled\" | \"low_confidence\"`,required:true}),_jsx(ResponseField,{path:`notes`,type:`string`,required:true})]})]})]})]}),`\n`,_jsxs(ResponseField,{path:`documents`,type:`array\u003cobject>`,required:true,children:[_jsx(_components.p,{children:`Documents discovered in the batch, in page order. The full batch is covered.`}),_jsxs(Expandable,{title:`documents properties`,children:[_jsx(ResponseField,{path:`index`,type:`integer`,required:true,children:_jsx(_components.p,{children:`0-based position of this document in the batch`})}),_jsx(ResponseField,{path:`type`,type:`string`,required:true,children:_jsx(_components.p,{children:`Chosen type name from the taxonomy, or “unknown”`})}),_jsx(ResponseField,{path:`page_range`,type:`array\u003cinteger>`,required:true,children:_jsx(_components.p,{children:`[startIndex, endIndex] inclusive, 0-based page indices`})}),_jsx(ResponseField,{path:`confidence`,type:`\"low\" | \"medium\" | \"high\"`,required:true,children:_jsx(_components.p,{children:`LLM confidence at the boundary + type. Coarse enum (low | medium | high).`})}),_jsx(ResponseField,{path:`notes`,type:`string`,required:true,children:_jsx(_components.p,{children:`LLM justification for the boundary, useful for debugging`})}),_jsxs(ResponseField,{path:`evidence`,type:`object`,children:[_jsxs(_components.p,{children:[`Structured start evidence, parse this instead of regexing over `,_jsx(_components.code,{children:`notes`}),`.`]}),_jsxs(Expandable,{title:`evidence properties`,children:[_jsx(ResponseField,{path:`start_heading_text`,type:`string | null`,children:_jsx(_components.p,{children:`Verbatim heading/title text the LLM cited as the document start`})}),_jsx(ResponseField,{path:`start_page`,type:`integer | null`,children:_jsx(_components.p,{children:`Page where the start appears`})})]})]}),_jsx(ResponseField,{path:`text`,type:`string`,required:true,children:_jsx(_components.p,{children:`Joined per-page content for this document, ready for downstream ai.extract`})}),_jsxs(ResponseField,{path:`pages`,type:`array\u003cobject>`,required:true,children:[_jsx(_components.p,{children:`Raw per-page records covered by this document, in page order.`}),_jsxs(Expandable,{title:`pages properties`,children:[_jsx(ResponseField,{path:`pageIndex`,type:`integer`,required:true}),_jsx(ResponseField,{path:`text`,type:`string`,required:true}),_jsx(ResponseField,{path:`pageName`,type:`string`}),_jsx(ResponseField,{path:`source`,type:`\"anchored\" | \"inferred\"`,required:true})]})]}),_jsx(ResponseField,{path:`pages_anchored`,type:`array\u003cinteger>`,required:true,children:_jsx(_components.p,{children:`Pages with direct LLM boundary evidence`})}),_jsx(ResponseField,{path:`pages_inferred`,type:`array\u003cinteger>`,required:true,children:_jsx(_components.p,{children:`Pages assigned by deterministic continuity fill`})})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Separate Documents","description":"Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.","href":"/steps/ai/segment"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Configuration","slug":"configuration","depth":2,"children":[]},{"title":"Output","slug":"output","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"eigenpal","siteName":"EigenPal Docs","title":"Separate Documents - EigenPal Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-07T09:43:26.638Z","originalFileLocation":"steps/ai/segment.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.\">\u003cmeta data-mint-head name=\"application-name\" content=\"EigenPal Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/eigenpal/627Y6R2CxKSM_fRe/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/eigenpal/627Y6R2CxKSM_fRe/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/eigenpal/627Y6R2CxKSM_fRe/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/eigenpal/627Y6R2CxKSM_fRe/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/eigenpal/627Y6R2CxKSM_fRe/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/eigenpal/627Y6R2CxKSM_fRe/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/eigenpal/627Y6R2CxKSM_fRe/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/eigenpal/627Y6R2CxKSM_fRe/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/eigenpal/627Y6R2CxKSM_fRe/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Separate Documents - EigenPal Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"EigenPal Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.eigenpal.com/steps/ai/segment\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://eigenpal.mintlify.site/_mintlify/api/og/v2?division=AI+steps\u0026amp;title=Separate+Documents\u0026amp;description=Separate+a+concatenated+batch+%28one+big+scan%29+into+typed+document+instances+using+an+LLM.+Consumes+ai.parse+output+and+a+type+taxonomy%3B+discovers+an+unknown+numb\u0026amp;theme=881aa40e5355688a2edc8fd9\u0026amp;signature=bce931a5120dbec7d8aed75ae4a1ccc0e0cede1826b49f2ffdc54a81928be534\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Separate Documents - EigenPal Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://eigenpal.mintlify.site/_mintlify/api/og/v2?division=AI+steps\u0026amp;title=Separate+Documents\u0026amp;description=Separate+a+concatenated+batch+%28one+big+scan%29+into+typed+document+instances+using+an+LLM.+Consumes+ai.parse+output+and+a+type+taxonomy%3B+discovers+an+unknown+numb\u0026amp;theme=881aa40e5355688a2edc8fd9\u0026amp;signature=bce931a5120dbec7d8aed75ae4a1ccc0e0cede1826b49f2ffdc54a81928be534\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/eigenpal/627Y6R2CxKSM_fRe/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"EigenPal Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2EB52E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.eigenpal.com/steps/ai/segment\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/steps/ai/segment.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.eigenpal.com/#organization\",\"name\":\"EigenPal Docs\",\"url\":\"https://docs.eigenpal.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/eigenpal/hcNh17xOVYi-SRf0/logo/light.svg?fit=max\u0026auto=format\u0026n=hcNh17xOVYi-SRf0\u0026q=85\u0026s=fb237cefefd3e0cf02c7cc66f475fbd1\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.eigenpal.com#website\",\"name\":\"EigenPal Docs\",\"url\":\"https://docs.eigenpal.com\",\"publisher\":{\"@id\":\"https://docs.eigenpal.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.eigenpal.com/steps/ai/segment#webpage\",\"url\":\"https://docs.eigenpal.com/steps/ai/segment\",\"name\":\"Separate Documents\",\"description\":\"Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.\",\"dateModified\":\"2026-09-07T09:43:26.638Z\",\"isPartOf\":{\"@id\":\"https://docs.eigenpal.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.eigenpal.com/steps/ai/segment#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.eigenpal.com/steps/ai/segment#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Workflow steps\",\"item\":\"https://docs.eigenpal.com/concepts/steps-overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI steps\",\"item\":\"https://docs.eigenpal.com/steps/ai/parse-v2\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Separate Documents\",\"item\":\"https://docs.eigenpal.com/steps/ai/segment\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.eigenpal.com/steps/ai/segment#article\",\"headline\":\"Separate Documents\",\"name\":\"Separate Documents\",\"description\":\"Separate a concatenated batch (one big scan) into typed document instances using an LLM. Consumes ai.parse output and a type taxonomy; discovers an unknown number of documents in any order and emits per-document page ranges + text + type, ready for type-specific ai.extract via control.parallel_map. The inverse of ai.split.\",\"url\":\"https://docs.eigenpal.com/steps/ai/segment\",\"mainEntityOfPage\":{\"@id\":\"https://docs.eigenpal.com/steps/ai/segment#webpage\"},\"dateModified\":\"2026-09-07T09:43:26.638Z\",\"publisher\":{\"@id\":\"https://docs.eigenpal.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.eigenpal.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"EigenPal Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"EigenPal Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/steps/ai/segment.md","siteName":"EigenPal Docs","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Get started","pages":[{"title":"EigenPal docs","href":""},{"title":"Choose your path","href":"/guides/choose-your-path"}]},{"group":"Concepts","pages":[{"title":"Why EigenPal","href":"/concepts/why"},{"title":"How it works","href":"/concepts/how-it-works"},{"title":"Design principles","href":"/concepts/principles"},{"group":"Automations","pages":[{"title":"Automations","href":"/concepts/automations"},{"title":"Workflows","href":"/concepts/workflows"},{"title":"Agents","href":"/concepts/agents"}]},{"title":"Evaluations","href":"/concepts/evals"},{"title":"Reviews","href":"/concepts/reviews"},{"title":"Variables and secrets","href":"/concepts/variables"},{"title":"Artifacts as files","href":"/concepts/artifacts"}]},{"group":"Workflow steps","pages":[{"title":"Workflow steps","href":"/concepts/steps-overview"},{"group":"AI steps","pages":[{"title":"Parse Document","href":"/steps/ai/parse-v2"},{"title":"Parse Document v1","href":"/steps/ai/parse"},{"title":"Extract Data","href":"/steps/ai/extract"},{"title":"Split Document","description":"Split a parsed document into named sections using an LLM. Consumes ai.parse output; emits per-section page ranges and text ready for downstream ai.extract via control.parallel_map.","href":"/steps/ai/split"},{"title":"Separate Documents","href":"/steps/ai/segment"},{"title":"Classify","description":"Classify a document or text into one of a fixed label set using an LLM. Output exposes the picked label (constrained to the configured names), a coarse confidence, and a short justification. Pair with control.fail to reject documents that match an undesired label.","href":"/steps/ai/classify"},{"title":"Label Pages","href":"/steps/ai/classify-pages"},{"title":"Inspect Pages (Vision)","href":"/steps/ai/vision"},{"title":"Search Files","href":"/steps/ai/search-files"},{"title":"Figure Crops","href":"/steps/ai/figure-crops"}]},{"group":"Transform steps","pages":[{"title":"Set Value","href":"/steps/transform/set"},{"title":"Remove Fields","href":"/steps/transform/remove"},{"title":"Combine Data","href":"/steps/transform/combine"},{"title":"Split Data","href":"/steps/transform/split"},{"title":"Merge Inputs","href":"/steps/transform/merge"},{"title":"Fill Template","href":"/steps/transform/template"},{"title":"Embed PDF Text","href":"/steps/transform/pdf-embed"},{"title":"Crop Regions","href":"/steps/transform/crop-regions"},{"title":"Spreadsheet to JSON","href":"/steps/transform/xlsx-to-json"},{"title":"JSON to XLSX","href":"/steps/transform/json-to-xlsx"},{"title":"Script","href":"/steps/transform/script"},{"title":"Text Chunker","href":"/steps/transform/text-chunker"},{"title":"Regex Extract","href":"/steps/transform/regex-extract"},{"title":"List Archive","href":"/steps/transform/archive-list"},{"title":"Extract Archive File","href":"/steps/transform/archive-extract"},{"title":"Merge Documents","href":"/steps/transform/merge-documents"}]},{"group":"Action steps","pages":[{"title":"HTTP Request","href":"/steps/action/http"},{"title":"Invoke Workflow","href":"/steps/action/invoke-workflow"},{"title":"Website Reader","href":"/steps/action/website-reader"},{"title":"Send Email","href":"/steps/action/email"}]},{"group":"Control steps","pages":[{"title":"Condition","href":"/steps/control/if"},{"title":"Switch","href":"/steps/control/switch"},{"title":"For Each","href":"/steps/control/foreach"},{"title":"Parallel Map","href":"/steps/control/parallel_map"},{"title":"Parallel","href":"/steps/control/parallel"},{"title":"Wait","href":"/steps/control/wait"},{"title":"Human Review","href":"/steps/control/human_review"},{"title":"Fail","href":"/steps/control/fail"}]}]},{"group":"Guides \u0026 tutorials","pages":[{"title":"Your first workflow","href":"/guides/first-workflow"},{"title":"Your first agent","href":"/guides/first-agent"},{"title":"Eval-first development","href":"/guides/eval-first-development"},{"title":"Build a dataset","href":"/guides/build-a-dataset"},{"title":"Evaluate a workflow","href":"/guides/evaluate-workflow"},{"title":"Deploy to production","href":"/guides/deploy-to-production"},{"title":"Upload files","href":"/guides/upload-files"},{"title":"Receive run events with webhooks","href":"/guides/outbound-webhooks"},{"title":"Errors and recovery","href":"/guides/errors"},{"title":"Manage email servers","href":"/guides/email-servers"},{"title":"Service accounts","href":"/guides/service-accounts"},{"title":"Review production runs","href":"/guides/review-runs"},{"title":"Execution tags","href":"/guides/execution-tags"},{"title":"Optimize cost","href":"/guides/optimize-cost"},{"title":"Install the EigenPal skill","href":"/guides/skill-install"}]},{"group":"Self-hosting","pages":[{"title":"Self-hosting EigenPal","href":"/self-hosting/overview"},{"title":"Install on Kubernetes","href":"/self-hosting/kubernetes"},{"title":"Configure EigenPal","sidebarTitle":"Configuration","href":"/self-hosting/configuration"},{"title":"Authentication and access","href":"/self-hosting/authentication"},{"title":"Operate EigenPal","sidebarTitle":"Operations","href":"/self-hosting/operations"},{"group":"Optional capabilities","expanded":false,"pages":[{"title":"Agent sandboxes","href":"/self-hosting/agent-sandboxes"},{"title":"Workflow promotion","href":"/self-hosting/workflow-promotion"}]},{"group":"Configuration reference","expanded":false,"pages":[{"title":"Environment variables","href":"/self-hosting/environment-variables"},{"title":"Deployment YAML reference","href":"/self-hosting/yaml-reference"},{"title":"Helm values reference","href":"/self-hosting/helm-values"}]},{"title":"Prometheus metrics","href":"/guides/prometheus-metrics"}]},{"group":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},{"tab":"CLI reference","pages":[{"title":"CLI reference","href":"/cli/overview"}]},{"tab":"SDKs","pages":[{"title":"SDKs","href":"/sdks/overview"}]},{"tab":"API reference","pages":[{"title":"API reference","href":"/api-reference/metadata/check-api-key-identity"}]}]},"basePath":"","title":"Separate Documents - EigenPal Docs","buildId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","deploymentId":"dpl_G2Qd45vZZ7MkBiGF9yYx8ZsbbKXX","dynamics":[],"chunks":[]}