Skip to content

Document

A document loaded from an external source. Documents are the input to the chunking stage of the RAG pipeline.

id: string;

Unique identifier for this document.


optional metadata?: Record<string, unknown>;

Source metadata (file path, URL, content type, title, etc.).


text: string;

The document’s text content.