← Back to Library
Vector Databases Provider: Weaviate B.V.

Weaviate

Weaviate pioneered the open-source vector database movement, combining vector similarity search with traditional database features through a GraphQL API that developers love. Unlike pure vector search engines, Weaviate provides a complete database experience: CRUD operations, filtering, sorting, aggregations, and complex queries—all while maintaining sub-50ms vector search latency. Founded in 2019 and open-sourced from day one (BSD-3 license), Weaviate serves enterprises, AI-native startups, and research institutions requiring full control over their vector infrastructure. The platform excels at multi-modal search: simultaneously query text, images, and structured data using different embedding models (OpenAI, Cohere, HuggingFace, custom). Key differentiators: GraphQL API (intuitive querying versus REST), modular vectorizer architecture (bring your own embeddings), horizontal scaling (Kubernetes-native), and hybrid search combining vector similarity with keyword BM25 ranking. Weaviate Cloud provides managed hosting with automatic scaling, while self-hosted deployments offer complete data sovereignty. As of October 2025, Weaviate powers 10,000+ production deployments: e-commerce search, knowledge management, content discovery, recommendation engines, and enterprise RAG systems. The ecosystem includes 50+ integrations (LangChain, LlamaIndex, Haystack), vectorizers for all major AI models, and modules for question answering, text generation, and classification. 21medien implements Weaviate for clients requiring open-source flexibility combined with production reliability: from architecture design and deployment to query optimization, monitoring, and ongoing maintenance—ensuring optimal performance while maintaining full data control.

Weaviate
vector-databases weaviate open-source graphql semantic-search rag

Overview

Weaviate provides a complete vector database solution combining the simplicity of traditional databases with the power of semantic search. The GraphQL API enables intuitive querying: developers construct semantic searches using the same patterns they use for REST APIs, with automatic query optimization and result ranking. For example, searching for 'luxury electric vehicles' doesn't require manual vector generation—Weaviate's vectorizer modules automatically embed the query, search the vector space, and return results with relevance scores, metadata, and related objects. The architecture consists of four layers: Storage (object storage with vector indexes), Vectorization (pluggable modules for OpenAI, Cohere, HuggingFace, Sentence Transformers), Query Engine (GraphQL parser with vector and scalar filtering), and Modules (extensions for specific tasks like Q&A, summarization, generative search). Unlike Pinecone's serverless model, Weaviate provides full infrastructure control: deploy on-premise, in your cloud (AWS, GCP, Azure), or use Weaviate Cloud. This flexibility appeals to enterprises with data sovereignty requirements, privacy regulations (GDPR, HIPAA), or existing Kubernetes infrastructure.

Weaviate's multi-tenancy architecture enables SaaS applications to serve thousands of customers from a single deployment: each tenant gets isolated namespaces with separate vector indexes, configurable quotas, and independent scaling. Hybrid search combines vector similarity (semantic meaning) with BM25 keyword ranking (exact matches), controllable via alpha parameter (0=pure keyword, 1=pure vector, 0.5=balanced). Cross-reference capabilities link objects across collections: connect 'Products' to 'Reviews', 'Authors' to 'Articles', enabling graph-style queries within vector search. Generative search integrates LLMs directly: retrieve relevant vectors, pass to GPT-4/Claude, generate answers—all in a single GraphQL query. The platform supports batch operations (10,000+ objects/second), automatic replication, and RAFT-based consensus for high availability. 21medien leverages Weaviate for clients requiring open-source flexibility: we've deployed multi-region clusters serving 100M+ objects, implemented custom vectorizers for domain-specific embeddings, and optimized hybrid search parameters achieving 30% better relevance than pure vector search alone.

Key Features

  • GraphQL API: Intuitive querying with automatic optimization, nested queries, and aggregations versus manual REST calls
  • Modular vectorizers: Plug in any embedding model (OpenAI, Cohere, HuggingFace, Sentence Transformers, custom) without code changes
  • Multi-modal search: Query text, images, audio simultaneously using different embedding models per data type
  • Hybrid search: Combine vector similarity with BM25 keyword search, tunable alpha parameter for ranking balance
  • Kubernetes-native: Horizontal scaling, automatic pod management, stateful sets for persistence, Helm charts for deployment
  • Multi-tenancy: Isolated namespaces for thousands of customers with separate indexes, quotas, and security boundaries
  • Cross-references: Link objects across collections, graph-style queries within vector database (e.g., 'Products near Review')
  • Generative search: Built-in LLM integration (GPT-4, Claude) for question answering and summarization in single query
  • CRUD operations: Full database operations (create, read, update, delete) with ACID guarantees, not just insert-and-search
  • Open-source: BSD-3 license, self-host anywhere (AWS, GCP, Azure, on-premise), complete data sovereignty and privacy

Technical Architecture

Weaviate's architecture separates storage, indexing, and query execution for independent scaling. Storage Layer uses LSM (Log-Structured Merge) trees for objects and HNSW (Hierarchical Navigable Small World) graphs for vectors, both optimized for NVMe SSDs. Each collection maintains separate HNSW indexes with configurable parameters: efConstruction (build-time accuracy vs speed tradeoff), ef (query-time accuracy), maxConnections (graph density), and dynamic pruning. The Vectorization Layer provides pluggable modules: text2vec-openai (OpenAI embeddings), text2vec-cohere (Cohere embeddings), multi2vec-clip (image+text), ref2vec (learn from cross-references), and custom modules via gRPC. Query Engine parses GraphQL, executes vector searches, applies filters, performs aggregations, and merges results—all in parallel across shards. Sharding distributes data horizontally using consistent hashing: configure shard count per collection (1 for small data, 16+ for billions of objects), automatic rebalancing when adding nodes. Replication provides high availability: configure replication factor (2-3), RAFT consensus ensures consistency, automatic failover handles node failures. Modules extend functionality: qna-transformers (question answering), sum-transformers (summarization), img2vec-neural (image embedding), spellcheck (typo correction), and custom modules. Security includes API key authentication, OIDC integration, role-based access control (RBAC), and network policies for Kubernetes. 21medien designs Weaviate architectures optimizing for performance and cost: selecting pod types, configuring HNSW parameters, implementing caching strategies, and tuning query patterns for sub-10ms p50 latency.

Common Use Cases

  • Enterprise RAG systems: Knowledge base search with question answering, document retrieval with generative summaries, 70-85% answer accuracy
  • E-commerce semantic search: Product discovery by description, visual similarity search, hybrid keyword+semantic ranking for 40% better conversion
  • Content recommendation: Article suggestions, video recommendations, personalized content feeds based on user behavior embeddings
  • Customer support: Ticket routing, knowledge base search, automated response suggestions with generative answers
  • Research platforms: Literature search, patent discovery, scientific paper recommendations with citation graph navigation
  • Media asset management: Search images, videos, audio by content and metadata, duplicate detection, rights management
  • Multi-lingual search: Query in one language, retrieve results in any language using multilingual embeddings (e.g., mBERT, XLM-R)
  • Fraud detection: Identify similar transactions, anomaly detection in embedding space, pattern recognition for security
  • Knowledge graphs: Connect entities across collections, graph queries within vector database, relationship-aware search
  • SaaS applications: Multi-tenant architecture serving thousands of customers with isolated data, configurable per-tenant features

Integration with 21medien Services

21medien provides end-to-end Weaviate implementation services. Phase 1 (Architecture & Planning): We analyze your data (volume, update patterns, query types), infrastructure (Kubernetes, cloud provider, on-premise), and requirements (latency, availability, compliance) to design optimal Weaviate deployments. Schema design includes collection structure, vectorizer selection, cross-reference relationships, and indexing strategies. Phase 2 (Deployment): We deploy Weaviate via Kubernetes (Helm charts), configure auto-scaling (HPA based on CPU/memory), setup monitoring (Prometheus + Grafana), and implement backup strategies (S3, persistent volumes). Multi-region deployments include active-active replication, geo-routing, and disaster recovery. Phase 3 (Data Migration): ETL pipelines ingest data from existing systems (PostgreSQL, MongoDB, Elasticsearch), generate embeddings (batch processing with rate limiting), and populate Weaviate collections with validation. Phase 4 (Application Integration): We implement search interfaces using LangChain, LlamaIndex, or direct GraphQL clients (Python, JavaScript, Go), optimize queries for performance, and add caching layers (Redis) for frequent queries. Generative search pipelines combine retrieval with LLM generation for question answering. Phase 5 (Operations): Continuous monitoring tracks query latency, index size, memory usage, and cost. Performance tuning adjusts HNSW parameters, shard allocation, and vectorizer selection. Security audits ensure proper authentication, network isolation, and compliance (GDPR, HIPAA, SOC 2). Example: For a legal tech client, we deployed Weaviate Cloud with 20M document chunks, hybrid search (BM25 + semantic), generative QA using GPT-4, achieving 80ms p95 latency, 88% answer accuracy, serving 10K daily active users with 99.98% uptime—$12K/month versus $45K+ with managed alternatives for equivalent scale.

Code Examples

Basic Weaviate setup with Python client: import weaviate; from weaviate.auth import AuthApiKey; # Connect to Weaviate Cloud; client = weaviate.Client(url='https://your-cluster.weaviate.network', auth_client_secret=AuthApiKey('YOUR-API-KEY')); # Create schema; schema = {'class': 'Document', 'vectorizer': 'text2vec-openai', 'properties': [{'name': 'title', 'dataType': ['text']}, {'name': 'content', 'dataType': ['text']}, {'name': 'category', 'dataType': ['string']}]}; client.schema.create_class(schema); # Add objects; docs = [{'title': 'AI Guide', 'content': 'Comprehensive guide to AI...', 'category': 'tutorial'}]; client.batch.configure(batch_size=100); with client.batch as batch: for doc in docs: batch.add_data_object(doc, 'Document') — Semantic search with hybrid ranking: result = client.query.get('Document', ['title', 'content', 'category']).with_hybrid(query='machine learning tutorial', alpha=0.7).with_limit(5).with_additional(['score', 'distance']).do(); for item in result['data']['Get']['Document']: print(f'{item["title"]}: {item["_additional"]["score"]}') — Generative search with LLM: result = client.query.get('Document', ['title', 'content']).with_near_text({'concepts': ['refund policy']}).with_generate(single_prompt='Summarize this document in 2 sentences: {content}').with_limit(3).do(); print(result['data']['Get']['Document'][0]['_additional']['generate']['singleResult']) — LangChain integration: from langchain.vectorstores import Weaviate; from langchain.embeddings import OpenAIEmbeddings; vectorstore = Weaviate(client, 'Document', 'content', embedding=OpenAIEmbeddings(), attributes=['title', 'category']); retriever = vectorstore.as_retriever(search_type='hybrid', search_kwargs={'alpha': 0.75}); docs = retriever.get_relevant_documents('how to implement RAG') — 21medien provides GraphQL schema design, query optimization consulting, and performance tuning for production Weaviate deployments.

Best Practices

  • Choose appropriate vectorizers per data type—text2vec-openai for English, multi2vec-clip for images, multilingual models for global
  • Tune HNSW parameters based on use case—high efConstruction (128-256) for better recall, lower for faster indexing
  • Use hybrid search with alpha tuning—start at 0.7 (70% semantic), adjust based on user feedback and precision/recall metrics
  • Implement batch operations for bulk imports—10K+ objects/batch reduces API overhead, use parallel workers for throughput
  • Configure appropriate shard counts—1 shard per 10M objects guideline, over-sharding increases query latency, under-sharding limits scale
  • Monitor memory usage carefully—HNSW indexes are memory-intensive, 4-8 bytes per dimension per vector, plan capacity accordingly
  • Use cross-references for relationships—link related objects (Product→Review, Author→Article) for richer queries than metadata alone
  • Leverage generative search modules—combine retrieval with LLM generation for question answering, reduces application code complexity
  • Implement proper backup strategies—regular snapshots to S3, test restoration procedures, maintain disaster recovery runbooks
  • Start with Weaviate Cloud for prototyping—free tier for testing, easy scaling, migrate to self-hosted when infrastructure is ready

Weaviate Cloud vs Self-Hosted

Weaviate offers deployment flexibility matching organizational needs. Weaviate Cloud (Serverless): Fully managed service with automatic scaling, monitoring, backups, and updates—ideal for teams without Kubernetes expertise. Pricing based on storage ($25/10GB), queries ($1/1M operations), and compute ($0.10/hour per replica). Free tier includes 100K vectors, perfect for prototyping. Advantages: zero infrastructure management, instant provisioning (5 minutes), automatic updates, 99.9% SLA. Disadvantages: higher cost at scale (10B+ vectors), vendor dependency, limited customization. Self-Hosted (Kubernetes): Deploy on AWS EKS, GCP GKE, Azure AKS, or on-premise Kubernetes. Full control over infrastructure, custom modules, network policies, and compliance. Infrastructure costs only (EC2/GKE nodes, storage, bandwidth). Advantages: lower cost at scale (50-70% savings beyond 1B vectors), complete data sovereignty, custom integrations, regulatory compliance (GDPR, HIPAA, FedRAMP). Disadvantages: requires Kubernetes expertise, operational overhead (monitoring, updates, scaling), longer time-to-production. Hybrid Approach: Start with Weaviate Cloud for development/staging, migrate critical production workloads to self-hosted for cost optimization. 21medien helps clients choose optimal deployment: Weaviate Cloud for startups and rapid prototyping, self-hosted for enterprises with existing Kubernetes infrastructure and compliance requirements, hybrid for organizations transitioning to cloud-native architectures.

Official Resources

https://weaviate.io/