Weaviate: Open-Source Vector Database with Hybrid Search
Weaviate is an open-source vector database that combines semantic vector search with BM25 keyword search (hybrid search), auto-vectorization via pluggable modules, and a flexible GraphQL API. It is production-ready for RAG pipelines, semantic search, and multi-tenant SaaS applications — self-hosted or on Weaviate Cloud.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
JSON Formatter & Validator
Format, beautify, and validate JSON online. Paste your JSON to instantly pretty-print it with 2-space, 4-space, or tab indentation. Minify JSON too. Free, runs in your browser.
Open free tool →
Regex Tester
Free regex tester. Test regular expressions against multiple strings with expected match/no-match assertions — see instant pass/fail results. Built-in presets for email, URL, IPv4, and phone. Pro: unl
Open free tool →
Base64 Encoder & Decoder
Free Base64 Encoder & Decoder. Convert text, images, and any file to Base64 and back. Supports URL-safe Base64, image data URIs, and file download from Base64. Runs 100% in your browser — no data sent
Open free tool →
More Free Tools
Related Articles
curl 深度使用手冊:API 測試從入門到進階
curl 是每位開發者必備的 CLI 工具。本文涵蓋 GET/POST/PUT/DELETE 請求、認證、header 設定、檔案上傳、除錯技巧,以及 REST API 測試的完整實戰範例。
Best AI Code Review Tools 2026: CodeRabbit, Sourcery, DeepCode & Bito Compared
Compare top AI code review tools for 2026: CodeRabbit, Sourcery, DeepCode, and Bito. Features, pricing, GitHub/GitLab integration, and choosing the right tool for your team.
AI Code Review Tools 2026: GitHub Copilot, CodeRabbit, Qodo Merge Ranked
Compare AI code review tools for 2026: GitHub Copilot code review, CodeRabbit, Qodo Merge, Sourcery, and PR-Agent. Pricing, accuracy, and GitHub integration.
AI Coding Tools Comparison 2026: GitHub Copilot vs Cursor vs Windsurf vs Cline
Comprehensive comparison of the best AI coding tools in 2026: GitHub Copilot, Cursor, Windsurf, and Cline. Pricing, features, model support, and real-world benchmarks.
AI Pair Programming in 2026: GitHub Copilot vs Cursor vs Claude Code
Master AI pair programming in 2026. Compare GitHub Copilot, Cursor, and Claude Code for autocomplete, chat, and agentic workflows. Includes setup guides and productivity tips.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →Defining a Weaviate Schema (Class + Properties)
In Weaviate, data is organized into classes (like database tables). Each class has typed properties and a vectorizer configuration.
import weaviate
from weaviate.classes.config import Configure, Property, DataType
client = weaviate.connect_to_weaviate_cloud(
cluster_url="https://YOUR-CLUSTER.weaviate.network",
auth_credentials=weaviate.auth.AuthApiKey("YOUR_API_KEY")
)
# Create a collection with OpenAI vectorizer
client.collections.create(
name="Article",
vectorizer_config=Configure.Vectorizer.text2vec_openai(
model="text-embedding-3-small",
dimensions=1536,
),
generative_config=Configure.Generative.openai(model="gpt-4o-mini"),
properties=[
Property(name="title", data_type=DataType.TEXT),
Property(name="content", data_type=DataType.TEXT),
Property(name="category",data_type=DataType.TEXT),
Property(name="pubDate", data_type=DataType.DATE),
]
)
# Insert objects — Weaviate auto-generates the embedding
articles = client.collections.get("Article")
with articles.batch.dynamic() as batch:
batch.add_object({
"title": "Introduction to RAG",
"content": "Retrieval-augmented generation combines search with LLMs...",
"category": "ai",
"pubDate": "2024-01-15T00:00:00Z"
})
client.close() Hybrid Search: BM25 + Vector
Hybrid search combines dense vector similarity with sparse BM25 keyword matching. The alpha parameter controls the blend.
from weaviate.classes.query import Filter, MetadataQuery
articles = client.collections.get("Article")
# Hybrid search — alpha=0.7 weights vector search more than BM25
results = articles.query.hybrid(
query="how does retrieval augmented generation work",
alpha=0.7, # 0 = pure BM25, 1 = pure vector
limit=5,
filters=Filter.by_property("category").equal("ai"),
return_metadata=MetadataQuery(score=True)
)
for obj in results.objects:
print(f"{obj.metadata.score:.4f} | {obj.properties['title']}")
# Pure vector search (nearText auto-vectorizes the query)
results_vec = articles.query.near_text(
query="semantic search techniques",
limit=3,
filters=Filter.by_property("category").equal("ai")
)
# Generative search — retrieve + LLM in one call
results_gen = articles.generate.near_text(
query="RAG architectures",
single_prompt="Summarize this article in one sentence: {content}",
limit=3
)
for obj in results_gen.objects:
print(obj.generated) Multi-Tenancy Configuration
Enable multi-tenancy at class creation. Each tenant gets an isolated shard that can be independently managed.
from weaviate.classes.config import Configure
from weaviate.classes.tenants import Tenant, TenantActivityStatus
# Create a multi-tenant collection
client.collections.create(
name="CustomerDocs",
multi_tenancy_config=Configure.multi_tenancy(enabled=True),
vectorizer_config=Configure.Vectorizer.text2vec_openai()
)
col = client.collections.get("CustomerDocs")
# Add tenants
col.tenants.create([
Tenant(name="tenant-acme"),
Tenant(name="tenant-globex"),
])
# All CRUD operations are scoped to a tenant
tenant_col = col.with_tenant("tenant-acme")
tenant_col.data.insert({"content": "ACME private document"})
# Offload inactive tenant to cold storage (saves cost)
col.tenants.update([
Tenant(name="tenant-acme", activity_status=TenantActivityStatus.INACTIVE)
])
# Delete a tenant and all its data
col.tenants.remove(["tenant-acme"]) Weaviate vs Pinecone vs Qdrant vs Chroma
| Feature | Weaviate | Pinecone | Qdrant | Chroma |
|---|---|---|---|---|
| Open source | Yes | No | Yes | Yes |
| Hybrid search | BM25 + vector | Limited | Sparse + dense | Vector only |
| Auto-vectorize | Yes (modules) | No | No | Yes (embedding fn) |
| Query API | GraphQL + REST | REST / SDK | REST / gRPC | Python SDK |
| Multi-tenancy | Shard-level | Namespaces | Collections | Collections |
| Managed cloud | Weaviate Cloud | Yes (serverless) | Qdrant Cloud | No |
| Best for | Hybrid RAG, SaaS | Fast managed setup | High perf self-host | Local dev, prototypes |
Frequently Asked Questions
What is Weaviate and what makes it different?▼
Weaviate is an open-source vector database with built-in hybrid search (BM25 keyword + vector similarity). Unlike Pinecone, it is self-hostable, supports native vectorizer modules (you don't need to pre-compute embeddings separately), and exposes a GraphQL API. It also supports multi-tenancy, cross-references between objects, and generative search via LLM integrations.
What are Weaviate vectorizer modules?▼
Weaviate modules auto-vectorize your data at ingestion time. text2vec-openai calls the OpenAI embeddings API, text2vec-cohere uses Cohere embed, text2vec-huggingface uses HuggingFace Inference API, and text2vec-transformers runs a local sentence transformer model. You configure the module at class level — Weaviate handles embedding automatically on every insert.
How does hybrid search work in Weaviate?▼
Weaviate hybrid search combines BM25 (sparse keyword retrieval) with dense vector similarity using a Reciprocal Rank Fusion (RRF) or weighted sum algorithm. You pass an alpha parameter between 0 (pure BM25) and 1 (pure vector). A value of 0.5 blends both equally. Hybrid search outperforms pure vector search for queries with specific keywords, product names, or IDs.
What is multi-tenancy in Weaviate?▼
Weaviate multi-tenancy isolates data per tenant at the shard level. Each tenant gets its own shard which can be independently activated, deactivated (offloaded to cold storage), or deleted. This enables SaaS applications to serve thousands of customers from one cluster while keeping data isolated and controlling storage costs by offloading inactive tenants.
Weaviate Cloud vs self-hosted: which should I choose?▼
Weaviate Cloud (WCD) is the managed SaaS option — zero infrastructure work, automatic upgrades, and a free sandbox tier. Self-hosted via Docker or Kubernetes gives you full control over hardware, data residency, and cost at scale. For production workloads under 10M vectors with a small team, WCD is often faster to ship. For >100M vectors or strict compliance requirements, self-hosted on your own VPC is more cost-effective.
Can Weaviate replace a traditional search engine like Elasticsearch?▼
Weaviate can replace Elasticsearch for semantic search use cases where understanding query intent matters more than keyword matching. It has BM25 support for keyword scenarios too. However, Elasticsearch has a more mature ecosystem for log analytics, complex aggregations, and enterprise search. For AI-native applications — RAG, semantic document search, recommendation — Weaviate is often the better fit.
Related Products
on GumroadAI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →AI Developer Prompts Pack
55 battle-tested prompt templates for the workflows developers actually use: code review, debugging, architecture, documentation, and testing. Stop writing prompts from scratch.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →You Might Also Need
CrewAI Agent Config Generator
Build CrewAI agent configurations visually. Define roles, goals, backstories, and tools. Generate YAML or Python code for multi-agent crews.
Open free tool →
Embedding Storage Calculator
Calculate storage requirements for vector embeddings at scale. Choose model, precision, and vector count to get RAM, disk, and Pinecone cost estimates.
Open free tool →
Test Coverage Calculator
Calculate line, branch, function, and statement code coverage percentages. Set thresholds, check pass/fail status, and generate Jest/Vitest coverage config snippets.
Open free tool →
More Free Tools
Related Articles
Vector Database Comparison 2026: Pinecone vs Weaviate vs Qdrant vs Chroma
In-depth comparison of the top vector databases in 2026. Evaluate Pinecone, Weaviate, Qdrant, and Chroma on performance, scalability, filtering, pricing, and self-hosting for production AI applications.
Vector Databases Compared: Pinecone vs Weaviate vs Qdrant vs Chroma vs pgvector 2025
A comprehensive comparison of the top vector databases in 2025. Learn how Pinecone, Weaviate, Qdrant, Chroma, and pgvector differ in performance, pricing, and use cases for RAG and semantic search.
Vector Databases Explained: Pinecone vs Weaviate vs Qdrant vs Chroma (2026 Guide)
A complete comparison of the best vector databases in 2026: Pinecone, Weaviate, Qdrant, Chroma, and pgvector. Pricing, code examples, performance benchmarks, and a clear decision framework for AI and LLM applications.
Building a RAG Pipeline from Scratch: Embeddings, Vector Databases, and Retrieval
Step-by-step guide to building a production-ready RAG pipeline in Python. Covers embeddings, chunking strategies, Chroma and Pinecone setup, hybrid search, reranking, and evaluation with RAGAS.
Building Production RAG Systems with LlamaIndex and Vector Databases 2026
Complete guide to building production-ready RAG systems with LlamaIndex v0.10+. Covers chunking strategies, embedding models, Chroma, Pinecone, Weaviate integration, and advanced retrieval patterns.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →