Interface SemanticChunk

A semantically coherent text chunk produced by the chunker.

Interface

SemanticChunk

interface SemanticChunk {
    text: string;
    index: number;
    startOffset: number;
    endOffset: number;
    boundaryType: BoundaryType;
    metadata?: Record<string, unknown>;
}

Properties

text: string

The chunk text content (may include overlap prefix).

index: number

0-based sequence index within the chunked document.

startOffset: number

Character offset in the original text where this chunk begins.

endOffset: number

Character offset in the original text where this chunk ends.

boundaryType: BoundaryType

Type of boundary that determined this chunk's split.

metadata?: Record<string, unknown>

Pass-through metadata from the caller.