Skip to main content

Interface: EmbeddedChunk<ChunkMetadata>

batteries/docs.EmbeddedChunk

A piece of a document that is ready to be added into a vector space.

Type parameters

NameType
ChunkMetadataextends Jsonifiable = Jsonifiable

Properties

content

content: string

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

Defined in

packages/ai-jsx/src/batteries/docs.tsx:376


vector

vector: number[]

The vector representing this chunk for semantic nearest neighbors.

Defined in

packages/ai-jsx/src/batteries/docs.tsx:370


documentName

Optional documentName: string

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

Defined in

packages/ai-jsx/src/batteries/docs.tsx:379


id

Optional id: string

The identifier for this chunk. When adding this object to a vector database, this field will be generated if not populated.

Defined in

packages/ai-jsx/src/batteries/docs.tsx:367


metadata

Optional metadata: ChunkMetadata

Optional additional metadata associated with this chunk.

Defined in

packages/ai-jsx/src/batteries/docs.tsx:382