Skip to content

RagPipelineOptions

optional batchSize?: number;

Batch size for embedMany calls. Default: 100.


chunker: Chunker;

Chunker for splitting documents into chunks.


embedder: Embedder;

Embedder for converting text to vectors.


indexName: string;

Index name for this pipeline’s data.


optional metric?: "cosine" | "euclidean" | "dotproduct";

Distance metric for index creation. Default: ‘cosine’.


optional reranker?: Reranker;

Optional reranker for post-retrieval refinement.


optional topK?: number;

Default topK for retrieval. Default: 10.


vectorStore: VectorStoreCore;

Vector store for persistent storage and similarity search.

ensureIndex() additionally requires VectorStoreIndexAdmin to provision indexes at runtime; passing a Core-only adapter (edge stores such as Cloudflare Vectorize or Upstash Vector whose indexes are provisioned out-of-band) is supported — ensureIndex() becomes a no-op on those stores (REQ-17).