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
Name | Type |
---|---|
ChunkMetadata | extends 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
packages/ai-jsx/src/batteries/docs.tsx:301
documentName
• Optional
Readonly
documentName: string
The name of the document from which this chunk was extracted.
Defined in
packages/ai-jsx/src/batteries/docs.tsx:304
metadata
• Optional
Readonly
metadata: ChunkMetadata
Optional additional metadata associated with this chunk.