Storage
Vector Databases
Choose vector storage based on scale, operations, filtering, hybrid search, and your existing cloud environment.
Database Comparison
Vector databases are not interchangeable only by name. They differ in local vs managed operation, metadata filtering, hybrid search, index lifecycle, tenancy, backups, and the amount of infrastructure your team must own.
| Database | Best for | Recommendation | Credentials |
|---|---|---|---|
| ChromaDB | Local development and demos | First choice for learning and local tests. | Optional CHROMA_PERSIST_DIRECTORY |
| FAISS | Fast local similarity search | Use for local file-persisted indexes. | Optional FAISS_INDEX_PATH |
| Pinecone | Managed production vector DB | Use when you want minimal operations. | PINECONE_API_KEY |
| Qdrant | Filtering, local/cloud flexibility | Strong production default. | QDRANT_URL, optional QDRANT_API_KEY |
| Weaviate | Hybrid search and schema-rich data | Use when object schema and hybrid search matter. | WEAVIATE_URL, optional WEAVIATE_API_KEY |
| Milvus | Very large vector collections | Use when scale is the main challenge. | MILVUS_URI, optional MILVUS_TOKEN |
| Redis | Low-latency vector search | Use when Redis is already part of the stack. | REDIS_URL |
| PGVector | PostgreSQL-native vector search | Use when relational consistency matters. | PGVECTOR_CONNECTION_STRING |
| Elasticsearch | Full-text plus vector hybrid search | Use for mature search teams. | ELASTICSEARCH_URL |
| OpenSearch | AWS/OpenSearch search stacks | Use for AWS-managed search environments. | OPENSEARCH_URL |
| Azure AI Search | Azure enterprise search | Use for Azure-based apps. | AZURE_SEARCH_ENDPOINT, AZURE_SEARCH_KEY |
| MongoDB Atlas Vector Search | MongoDB document applications | Use when source documents already live in MongoDB. | MONGODB_ATLAS_CLUSTER_URI |
Production Rules
Match dimensions
The vector index dimension must match the selected embedding model. If the model changes, create a new collection or re-ingest.
Use names carefully
Collection names should identify environment, application, corpus, and embedding model family.
Smoke test live backends
Run opt-in smoke tests against the exact DBs planned for production.
How MS-RAGS(ALL-IN-ONE) uses Vector Stores
During setup
The CLI collects connection parameters, shows a summary, tests the connection, and asks for approval before ingestion begins.
During ingestion
Documents are loaded, split into chunks, embedded, and written into the selected collection or index with metadata attached.
During query
The retriever reads from the same populated vector store used during ingestion, avoiding the rebuild bug that can create empty runtime wrappers.
During generated-code use
Generated pipelines can ingest new documents or connect to an existing persisted collection for query-only usage when supported.
Collection Naming Strategy
Use names that tell future users what is inside the index.
msrag_{environment}_{app}_{corpus}_{embedding}
# Examples
msrag_dev_support_docs_openai_small
msrag_prod_policy_bge_m3
msrag_staging_legal_parent_child_3072
A good collection name reduces accidental ingestion into the wrong environment and helps users understand embedding compatibility.
Backend Selection Details
ChromaDB vs FAISS
Use Chroma when you want a simple local DB with collection semantics. Use FAISS when you want fast local vector search and file-backed persistence.
Pinecone vs Qdrant
Use Pinecone for managed serverless simplicity. Use Qdrant when filtering, local/cloud parity, and Rust-backed performance are attractive.
PGVector vs MongoDB Atlas
Use PGVector when your product data is relational. Use MongoDB Atlas when source documents already live in MongoDB collections.
Elasticsearch/OpenSearch/Azure AI Search
Use search platforms when hybrid lexical plus vector retrieval and enterprise search operations matter.
Smoke Test Examples
MS_RAG_SMOKE_VECTOR_DBS=chroma python -m pytest tests/smoke/test_vector_db_smoke.py -q
MS_RAG_SMOKE_VECTOR_DBS=faiss python -m pytest tests/smoke/test_vector_db_smoke.py -q
MS_RAG_SMOKE_VECTOR_DBS=qdrant python -m pytest tests/smoke/test_vector_db_smoke.py -q