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;
    tenantId?: string;
    aclGroups?: string[];
    classification?: "internal" | "public" | "confidential" | "restricted";
    status?: "active" | "archived" | "deprecated" | "draft";
    effectiveDate?: string;
    expiresAt?: 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.

tenantId?: string

Tenant the document belongs to. Used for multi-tenant isolation.

aclGroups?: string[]

ACL groups allowed to retrieve this document. Empty/undefined means the document inherits the data source's default ACL (typically unrestricted within the tenant).

classification?: "internal" | "public" | "confidential" | "restricted"

Sensitivity classification. Drives default redaction policy and audit obligations.

status?: "active" | "archived" | "deprecated" | "draft"

Lifecycle status. active chunks are returned by default; draft/archived/deprecated are excluded unless the retrieval options opt them in.

effectiveDate?: string

ISO timestamp: when this document became authoritative.

expiresAt?: string

ISO timestamp: when this document stops being authoritative.