Interface RagDocumentInput

Represents raw document content provided for ingestion.

interface RagDocumentInput {
    id: string;
    content: string;
    dataSourceId?: string;
    source?: string;
    metadata?: Record<string, MetadataValue>;
    language?: string;
    timestamp?: string;
    embedding?: number[];
    embeddingModelId?: string;
}

Properties

id: string

Stable identifier for the document (chunk IDs will derive from this).

content: string

Raw text that will be chunked and embedded.

dataSourceId?: string

Optional override for which data source / collection to push this document into.

source?: string

Original source pointer (URL, file path, API, etc.).

metadata?: Record<string, MetadataValue>

Arbitrary metadata stored alongside chunks; values must be vector-store friendly.

language?: string

ISO language tag for the content.

timestamp?: string

ISO timestamp describing when this content was produced/updated.

embedding?: number[]

Optional pre-computed embedding vector.

embeddingModelId?: string

Identifier of the embedding model used when embedding is supplied.