Skip to main content
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.
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.
integer
Override the per-window token ceiling. Defaults to env SPLIT_WINDOW_TOKEN_BUDGET or 20000.

Output

Batch-level escalation summary: labelled vs unlabelled counts + docs needing review.
Documents discovered in the batch, in page order. The full batch is covered.