Interface VectorDocument

Represents a document to be stored or retrieved from a vector store.

VectorDocument

interface VectorDocument {
    id: string;
    embedding: number[];
    metadata?: Record<string, MetadataValue>;
    textContent?: string;
}

Hierarchy (view full)

Properties

id: string

A unique identifier for the document.

embedding: number[]

The vector embedding of the document's content.

metadata?: Record<string, MetadataValue>

A flexible key-value store for document metadata. Values can be scalars or arrays of scalars. Used for filtering and providing context.

textContent?: string

Optional: The raw text content of the document. Some use cases might store this alongside the embedding, while others might fetch it from a primary store using the ID.