Loading...
Skip to main content

Interface: Chunk<ChunkMetadata>

batteries/docs.Chunk

A piece of a document that's appropriately sized for an LLM's [context window][https://docs.ai-jsx.com/guides/brand-new#context-window](https://docs.ai-jsx.com/guides/brand-new#context-window) and for semantic search.

Type parameters

NameType
ChunkMetadataextends Jsonifiable = Jsonifiable

Properties

content

Readonly content: string

The content of this chunk. This is what is provided as context to an LLM when the chunk is selected.

Defined in

ai-jsx/src/batteries/docs.tsx:303


documentName

Optional Readonly documentName: string

The name of the document from which this chunk was extracted.

Defined in

ai-jsx/src/batteries/docs.tsx:306


metadata

Optional Readonly metadata: ChunkMetadata

Optional additional metadata associated with this chunk.

Defined in

ai-jsx/src/batteries/docs.tsx:309