RagPipeline
Convenience class that wires embedder, vector store, chunker, and optional reranker into a single ingestion + retrieval pipeline.
Implements the Retriever interface so it can be passed directly to createVectorRetrievalTool() or used as an agent retriever.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new RagPipeline(options): RagPipeline;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
Returns
Section titled “Returns”RagPipeline
Methods
Section titled “Methods”ensureIndex()
Section titled “ensureIndex()”ensureIndex(): Promise<void>;Ensure the vector index exists, creating it if necessary. Requires at least one embed() call to determine dimension.
On edge stores that only implement VectorStoreCore (indexes
provisioned out-of-band), this is a no-op — the store’s own
listIndexes() is still consulted so a genuinely missing index
surfaces later at query time via the backend’s own error.
Returns
Section titled “Returns”Promise<void>
ingest()
Section titled “ingest()”ingest(documents): Promise<void>;Ingest documents: chunk, embed, and store in the vector store.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”Promise<void>
retrieve()
Section titled “retrieve()”retrieve(query, options?): Promise<RetrievalResult[]>;Retrieve relevant chunks for a query. Implements the Retriever interface.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
|
|
Returns
Section titled “Returns”Promise<RetrievalResult[]>