Interface SemanticChunkerConfig

Configuration for the semantic chunker.

Interface

SemanticChunkerConfig

interface SemanticChunkerConfig {
    targetSize?: number;
    maxSize?: number;
    minSize?: number;
    overlap?: number;
    preserveCodeBlocks?: boolean;
    respectHeadings?: boolean;
}

Properties

targetSize?: number

Target chunk size in characters. Default: 1000.

maxSize?: number

Maximum chunk size — hard limit before forced splitting. Default: 2000.

minSize?: number

Minimum chunk size — fragments below this merge with previous. Default: 200.

overlap?: number

Overlap characters from previous chunk prepended for context. Default: 100.

preserveCodeBlocks?: boolean

Whether to detect and preserve fenced code blocks intact. Default: true.

respectHeadings?: boolean

Whether to detect markdown headings as chunk-start boundaries. Default: true.