Combination of vector and keyword search for best results.
Installation¶
docker run -d -p 8080:8080 semitechnologies/weaviate:latest
Schema + Query¶
import weaviate
client = weaviate.Client('http://localhost:8080')
result = client.query.get('Article',['title','content'])\
.with_hybrid(query='PostgreSQL indexes', alpha=0.5)\
.with_limit(5).do()
Features: - Hybrid (vector+BM25) - Auto-vectorization - GraphQL API - Multi-tenancy
Architecture and Features¶
Weaviate uses its own vector index (HNSW) and combines it with an inverted index for keyword search. The alpha parameter in a hybrid query determines the ratio between vector similarity (alpha=1) and BM25 keyword relevance (alpha=0). A value of 0.5 is a good starting point.
Auto-vectorization means Weaviate can automatically generate embeddings when inserting data using built-in modules (text2vec-openai, text2vec-transformers). You do not need to manage an embedding pipeline externally. The GraphQL API enables flexible querying with filtering, aggregations, and cross-reference queries. For multi-tenant applications, Weaviate offers native tenant isolation with efficient resource utilization.
Weaviate for Hybrid¶
Best results thanks to vector + keyword combination.