Skip to main content
Storing is part of the Ingest workflow. It upserts embedded chunks into a vector database so retrieval, query, and chat can search them later. Use this page to understand the storage lifecycle. Use the interface-specific pages when you need exact parameters, flags, request fields, or response shapes.
Use the same vector_db, collection, and url when you store, retrieve, query, or chat over the same knowledge base.

Store embedded chunks

store() takes embedded chunk dictionaries from Embedding, validates their IDs/text/vectors, creates the target collection by default, and upserts points in batches.
Example stored result:

Stored point shape

Each embedded chunk becomes a vector database point.
text is stored in payload so retrieval can return answerable passages. Metadata is copied into payload for filtering, citations, table context, and maintenance workflows.
All vectors in a single store operation must have the same dimension. Ragrails stores valid chunks and rejects chunks whose vector size differs from the first valid embedding.

Databases

See Vector Databases for the reference table. These are the provider names accepted by SDK, CLI, and REST.
The SDK constructor uses vector_store={"provider": ...}. SDK method overrides, CLI, and REST use vector_db for the same provider value.

Collection names

Collection creation

store() creates or reuses the target collection by default with ensure_collection=True.
  • Qdrant collections are created with cosine distance and the first valid vector size.
  • Pinecone creates a dense serverless index when missing.
  • Weaviate creates a collection with self-provided vectors because Ragrails supplies embeddings itself.
Set ensure_collection=False only when the collection/index/class already exists and you want store operations to skip setup.

Update stored chunks

Use edit() to replace existing chunks by exact ID. It accepts unembedded chunk dictionaries, re-embeds their text with the configured embedder, then upserts replacements under the same IDs.
Example edit() result:
edit() is chunk-level. It does not find all chunks for a document; pass the exact chunk IDs you want to replace.

Delete stored chunks

Use delete() to remove exact chunk IDs from the vector database.
Example delete() result:

Ingest pipeline

High-level ingestion stores after extraction, chunking, and embedding. Pass storage options through the storage object.

Possible errors

Interface validation errors raise immediately in SDK and REST. Chunk validation, collection setup failures, and upsert/delete failures are returned in the result errors list when processing can continue. See Errors for the shared shapes.

Next steps