Chunk
Extended chunk type with positional and token metadata. KnowledgeChunk is a subset of this (id + text + meta).
Properties
Section titled “Properties”endIndex?
Section titled “endIndex?”optional endIndex?: number;Character offset of the chunk end in the original text.
id: string;Unique identifier for this chunk within its source.
metadata?
Section titled “metadata?”optional metadata?: Record<string, unknown>;Arbitrary metadata (heading, section name, source path, etc.).
startIndex?
Section titled “startIndex?”optional startIndex?: number;Character offset of the chunk start in the original text.
text: string;The chunk text content.
tokens?
Section titled “tokens?”optional tokens?: number;Estimated token count for this chunk.