Weaviate Vector DB 8 min read

Weaviate Guide 2025: Open-Source Vector Database & Semantic Search

A practical guide to Weaviate for developers building semantic search, RAG pipelines, and recommendation systems — from Docker setup to production generative search.

What Is Weaviate?

Weaviate is an open-source vector database written in Go, designed to store objects alongside their vector embeddings and query them by semantic similarity. Unlike traditional databases, Weaviate is schema-aware: every object belongs to a collection (formerly called a class) with typed properties, which enables filtering during vector search without a separate metadata store.

Weaviate's key differentiator is its module system: vectorizer modules like text2vec-openai auto-embed your text at insert and query time, so you never need to call an embedding API separately. The generative-openai and generative-anthropic modules enable generative search — built-in RAG where Weaviate retrieves relevant objects and passes them to an LLM in a single query.

It exposes a GraphQL API (primary query interface), a REST API, and a gRPC API (used by the v4 Python client for performance). The Python client v4 (weaviate-client>=4.0) wraps gRPC and provides a modern, typed interface.

Deployment Options

Weaviate Cloud (Managed)

Sandbox: free 14-day trial, no credit card. Serverless: pay-per-use ($0.095/1M vector dimensions stored). Enterprise Dedicated: single-tenant cluster with SLA. Connect via weaviate.connect_to_weaviate_cloud(cluster_url=..., auth_credentials=...).

Docker (Self-hosted)

Run docker run -p 8080:8080 -p 50051:50051 cr.weaviate.io/semitechnologies/weaviate:latest. REST on port 8080, gRPC on port 50051. Free and unlimited. Add vectorizer modules via environment variables.

Kubernetes (Helm chart)

Official Helm chart supports horizontal scaling with multiple replicas. Weaviate supports a distributed mode with sharding for large-scale multi-node deployments.

Python Client v4 Quickstart

# Install

pip install weaviate-client

# Connect, create collection, insert and search

import weaviate
import weaviate.classes as wvc

# Connect to local Docker instance
client = weaviate.connect_to_local()
# For Weaviate Cloud:
# client = weaviate.connect_to_weaviate_cloud(
#     cluster_url="https://YOUR-CLUSTER.weaviate.network",
#     auth_credentials=wvc.init.Auth.api_key("YOUR-WCD-API-KEY"),
# )

# Create a collection with text2vec-openai vectorizer
client.collections.create(
    name="Article",
    vectorizer_config=wvc.config.Configure.Vectorizer.text2vec_openai(),
    generative_config=wvc.config.Configure.Generative.openai(),
    properties=[
        wvc.config.Property(name="title", data_type=wvc.config.DataType.TEXT),
        wvc.config.Property(name="body", data_type=wvc.config.DataType.TEXT),
        wvc.config.Property(name="category", data_type=wvc.config.DataType.TEXT),
    ],
)

articles = client.collections.get("Article")

# Batch insert (auto-embeds via text2vec-openai)
with articles.batch.dynamic() as batch:
    batch.add_object({"title": "Weaviate 1.24 released", "body": "New gRPC interface...", "category": "news"})
    batch.add_object({"title": "RAG with Weaviate", "body": "How to build a retrieval pipeline...", "category": "tutorial"})

# Semantic search (auto-embeds the query)
results = articles.query.near_text(
    query="vector database tutorial",
    limit=3,
    filters=wvc.query.Filter.by_property("category").equal("tutorial"),
    return_metadata=wvc.query.MetadataQuery(score=True),
)

for obj in results.objects:
    print(obj.properties["title"], obj.metadata.score)

client.close()

Hybrid Search & Generative Search

Hybrid search combines BM25 keyword matching with vector similarity. The alpha parameter controls the blend: 0 = pure BM25, 1 = pure vector, 0.5 = equal blend.

# Hybrid search
results = articles.query.hybrid(query="Weaviate tutorial", alpha=0.5, limit=5)

# Generative search (RAG in one query — passes results to an LLM)
response = articles.generate.near_text(
    query="vector database best practices",
    limit=3,
    single_prompt="Summarize this article in one sentence: {title} — {body}",
    grouped_task="What are the top takeaways from these articles?",
)

single_prompt generates one LLM response per retrieved object. grouped_task sends all retrieved objects to the LLM together for synthesis — ideal for summarization or Q&A over retrieved chunks.

Multi-Tenancy for SaaS Apps

Weaviate has native multi-tenancy support at the collection level. Each tenant gets isolated storage within the same collection, making it ideal for SaaS applications where you need per-customer data separation without separate Weaviate instances.

# Enable multi-tenancy on collection creation
client.collections.create(
    name="CustomerDocs",
    multi_tenancy_config=wvc.config.Configure.multi_tenancy(enabled=True),
)

docs = client.collections.get("CustomerDocs")

# Add tenants
docs.tenants.create([wvc.tenants.Tenant(name="customer_abc"), wvc.tenants.Tenant(name="customer_xyz")])

# Work with a specific tenant
tenant_collection = docs.with_tenant("customer_abc")
tenant_collection.data.insert({"content": "Customer ABC's private doc"})

Pricing

Tier Cost Use case
Sandbox Free (14 days) Prototyping, no credit card
Serverless ~$0.095/1M dim stored Variable workloads, pay per use
Enterprise Dedicated Custom pricing Single-tenant, SLA, VPC
Self-hosted Free (infra cost only) Full control, on-premise

Weaviate vs Alternatives

Database Language Best for Free tier
Weaviate Go Generative search, hybrid, modules 14-day sandbox
Qdrant Rust High perf, filtering, quantization 1 GB cloud
Pinecone Managed Simplest managed setup 2 GB serverless
Chroma Python Local prototyping, zero config Fully free (local)

See also: Qdrant guide, Pinecone guide, LlamaIndex guide, and LangChain guide.

Monitor Weaviate Cloud Status

Weaviate Cloud outages can silently break your RAG pipeline or semantic search. Prismix tracks live Weaviate status and sends instant alerts before your users notice.

Weaviate Troubleshooting → Live Status →