> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/avnlp/vectordb/llms.txt
> Use this file to discover all available pages before exploring further.

# Vector databases overview

> Compare and select the right vector database for your RAG pipeline

VectorDB supports five production-ready vector databases, each optimized for different deployment scenarios and feature requirements. This guide helps you choose the right database for your use case.

## Supported databases

<CardGroup cols={2}>
  <Card title="Pinecone" icon="cloud" href="/databases/pinecone">
    Managed cloud service with native hybrid search
  </Card>

  <Card title="Weaviate" icon="server" href="/databases/weaviate">
    Open-source with BM25 and generative search
  </Card>

  <Card title="Milvus" icon="database" href="/databases/milvus">
    Scalable with partition-key multi-tenancy
  </Card>

  <Card title="Qdrant" icon="bolt" href="/databases/qdrant">
    High-performance with quantization support
  </Card>

  <Card title="Chroma" icon="rocket" href="/databases/chroma">
    Lightweight for local development
  </Card>
</CardGroup>

## Feature comparison

| Feature                |        Pinecone        |        Weaviate        |         Milvus        |         Qdrant         |      Chroma     |
| :--------------------- | :--------------------: | :--------------------: | :-------------------: | :--------------------: | :-------------: |
| **Dense search**       |            ✅           |            ✅           |           ✅           |            ✅           |        ✅        |
| **Sparse vectors**     |        ✅ SPLADE        |         ✅ BM25         |        ✅ SPLADE       |        ✅ SPLADE        |     ✅ SPLADE    |
| **Hybrid search**      |        ✅ Native        |        ✅ Native        |         ✅ RRF         |          ✅ RRF         |  ✅ Experimental |
| **Metadata filtering** |            ✅           |            ✅           |      ✅ JSON paths     |            ✅           |        ✅        |
| **Multi-tenancy**      |       Namespaces       |       Collections      |     Partition keys    |     Payload filters    | Tenant/database |
| **Quantization**       |            ❌           |            ❌           |           ❌           |     ✅ Scalar/Binary    |        ❌        |
| **Generative search**  |            ❌           |          ✅ RAG         |           ❌           |            ❌           |        ❌        |
| **Distance metrics**   | Cosine, Euclidean, Dot | Cosine, Euclidean, Dot | Cosine, Euclidean, IP | Cosine, Euclidean, Dot |  Cosine, L2, IP |
| **Deployment**         |       Cloud only       |   Cloud + self-hosted  |  Cloud + self-hosted  |   Cloud + self-hosted  |  Cloud + local  |
| **Max dimensions**     |         20,000         |        Unlimited       |         32,768        |         65,536         |    Unlimited    |

## Selection guide

### Choose Pinecone if you need:

* Fully managed cloud service with zero infrastructure overhead
* Native sparse-dense hybrid search without external encoders
* Namespace isolation for 100,000+ tenants
* Serverless autoscaling for variable workloads

**Best for:** Production SaaS applications, startups prioritizing speed-to-market

### Choose Weaviate if you need:

* Native BM25 keyword search without sparse embeddings
* Generative search (RAG) with built-in LLM integration
* Multi-tenancy with per-tenant shards
* GraphQL query interface

**Best for:** RAG applications, knowledge graphs, semantic content management

### Choose Milvus if you need:

* Partition-key isolation for millions of tenants
* JSON path indexing for complex metadata filtering
* Hybrid search with configurable RRF or weighted fusion
* Both Zilliz Cloud and self-hosted deployment options

**Best for:** Large-scale multi-tenant systems, enterprise deployments

### Choose Qdrant if you need:

* Scalar or binary quantization for 4-32x memory reduction
* Maximal marginal relevance (MMR) for diverse results
* Tenant optimization for high-cardinality filtering
* High-performance gRPC protocol support

**Best for:** Memory-constrained environments, high-throughput search, cost optimization

### Choose Chroma if you need:

* Local persistent storage for development and testing
* Lightweight deployment without external dependencies
* Rapid prototyping with minimal configuration
* Tenant/database isolation for multi-tenancy

**Best for:** Local development, proof-of-concepts, embedded applications

## Multi-tenancy strategies

Each database uses different isolation mechanisms:

<AccordionGroup>
  <Accordion title="Pinecone: Namespace isolation">
    Logical partitioning within a single index. Recommended for up to 100,000 tenants.

    ```python theme={null}
    db.upsert(documents, namespace="tenant_1")
    results = db.query(vector=embedding, namespace="tenant_1")
    ```
  </Accordion>

  <Accordion title="Weaviate: Collection-based multi-tenancy">
    Native multi-tenancy with per-tenant shards for enterprise-grade isolation.

    ```python theme={null}
    db.create_collection("Documents", enable_multi_tenancy=True)
    db.create_tenants(["tenant_a", "tenant_b"])
    db.with_tenant("tenant_a").upsert(documents)
    ```
  </Accordion>

  <Accordion title="Milvus: Partition key isolation">
    Physical partitioning at the storage layer. Supports millions of tenants efficiently.

    ```python theme={null}
    db.create_collection("docs", use_partition_key=True, partition_key_field="tenant_id")
    db.insert_documents(documents, namespace="tenant_1")
    results = db.search(query_embedding=vec, scope="tenant_1")
    ```
  </Accordion>

  <Accordion title="Qdrant: Payload-based with tenant optimization">
    Indexed payload filters with specialized tenant optimization (Qdrant 1.16+).

    ```python theme={null}
    db.create_namespace_index(namespace_field="tenant_id")
    db.index_documents(documents, scope="tenant_1")
    results = db.search(query_vector=vec, scope="tenant_1")
    ```
  </Accordion>

  <Accordion title="Chroma: Tenant and database scoping">
    Flexible isolation using tenant and database namespaces.

    ```python theme={null}
    tenant_db = db.with_tenant("tenant_1", database="prod")
    tenant_db.upsert(documents)
    ```
  </Accordion>
</AccordionGroup>

## Hybrid search approaches

### Pinecone and Weaviate: Native hybrid

Both databases handle hybrid search internally without external fusion logic:

```python theme={null}
# Pinecone: Native sparse-dense fusion
results = db.query_with_sparse(
    vector=dense_embedding,
    sparse_vector=sparse_embedding,
    top_k=10
)

# Weaviate: BM25 + vector with alpha balancing
results = db.hybrid_search(
    query="machine learning",
    vector=embedding,
    alpha=0.5  # 1.0 = vector only, 0.0 = BM25 only
)
```

### Milvus and Qdrant: RRF fusion

Both use Reciprocal Rank Fusion to merge dense and sparse results:

```python theme={null}
# Milvus: RRF or weighted ranker
results = db.search(
    query_embedding=dense_vec,
    query_sparse_embedding=sparse_vec,
    ranker_type="rrf",  # or "weighted" with weights=[0.7, 0.3]
    top_k=10
)

# Qdrant: RRF via query fusion
results = db.search(
    query_vector={"dense": dense_vec, "sparse": sparse_vec},
    search_type="hybrid",
    top_k=10
)
```

## Connection patterns

<CodeGroup>
  ```python Pinecone theme={null}
  from vectordb.databases import PineconeVectorDB

  db = PineconeVectorDB(
      api_key="pc-xxx",
      index_name="my-index"
  )
  db.create_index(dimension=768, metric="cosine")
  ```

  ```python Weaviate theme={null}
  from vectordb.databases import WeaviateVectorDB

  db = WeaviateVectorDB(
      cluster_url="https://my-cluster.weaviate.cloud",
      api_key="weaviate-api-key"
  )
  db.create_collection("Articles")
  ```

  ```python Milvus theme={null}
  from vectordb.databases import MilvusVectorDB

  db = MilvusVectorDB(
      uri="https://in03-xxx.api.gcp-us-west1.zillizcloud.com",
      token="your-api-token"
  )
  db.create_collection("docs", dimension=768)
  ```

  ```python Qdrant theme={null}
  from vectordb.databases import QdrantVectorDB

  db = QdrantVectorDB(
      config={"qdrant": {
          "url": "https://cloud.qdrant.io",
          "api_key": "your-key",
          "collection_name": "documents"
      }}
  )
  db.create_collection(dimension=768)
  ```

  ```python Chroma theme={null}
  from vectordb.databases import ChromaVectorDB

  db = ChromaVectorDB(
      host="localhost",
      port=8000,
      persistent=True,
      path="./chroma_data"
  )
  db.create_collection("my_collection")
  ```
</CodeGroup>

## Performance considerations

### Memory optimization

* **Qdrant** offers the best memory efficiency with scalar (4x reduction) and binary (32x reduction) quantization
* **Milvus** supports large-scale deployments with partition-based data distribution
* **Chroma** is ideal for small to medium datasets in local environments

### Query latency

* **Pinecone** and **Qdrant** provide the lowest latency with optimized indexing
* **Weaviate** excels at hybrid search with native BM25 integration
* **Milvus** offers configurable HNSW parameters for latency vs. recall tradeoffs

### Throughput

* **Qdrant** uses gRPC by default for higher throughput than HTTP-based databases
* **Milvus** supports batch operations with configurable shard numbers
* **Pinecone** auto-scales for variable workload patterns

## Next steps

<CardGroup cols={2}>
  <Card title="Pinecone setup" icon="cloud" href="/databases/pinecone">
    Configure Pinecone for serverless hybrid search
  </Card>

  <Card title="Weaviate setup" icon="server" href="/databases/weaviate">
    Set up Weaviate with generative search
  </Card>

  <Card title="Milvus setup" icon="database" href="/databases/milvus">
    Deploy Milvus with partition keys
  </Card>

  <Card title="Qdrant setup" icon="bolt" href="/databases/qdrant">
    Enable Qdrant quantization and MMR
  </Card>
</CardGroup>
