Weaviate: Hybrid Search, HNSW Tuning and Multi-Tenancy
A vector database you can run yourself, with a schema, native hybrid search, and the index parameters exposed for you to tune.
Weaviate is an open-source vector database that differs from a managed-only service in three ways that shape this whole course.
Overview
**It does the embedding for you, if you want.** A **vectoriser module** - `text2vec-openai`, `text2vec-cohere`, `text2vec-transformers` running locally - turns your text into vectors at insert and at query time, so your application sends text and never handles a float array. That is genuinely convenient and it is also a coupling: the model is now part of your database configuration, and changing it is a schema change plus a re-vectorisation. You can equally bring your own vectors, and the course covers both.
**It exposes the index.** Pinecone decides how to search; Weaviate hands you **HNSW** with its parameters - `ef`, `efConstruction`, `maxConnections` - plus a **flat** index for small collections and three kinds of **quantisation** that trade recall for memory. This is the course where approximate search stops being a black box and becomes a set of dials with measurable consequences, and **Module 4 is largely about measuring what each dial costs you in recall**.
Alongside that: **native hybrid search** combining BM25 and vector scores with a choice of fusion algorithms, **first-class multi-tenancy** with tenant lifecycle states, sharding and replication with per-request consistency levels, and the option to run the whole thing in Docker on your laptop - which makes every laboratory in this course free.
Seven modules, about 75 hours. The capstone is a semantic product search with hybrid retrieval, relevance tests and multi-tenant collections.
Introduction
For a sandbox, `docker compose up` with the official file runs Weaviate locally with whichever modules you enable, which makes the laboratories free and repeatable. **Weaviate Cloud** has a sandbox tier and is needed for nothing in this course except a comparison in Module 6. Use the **Python client v4**, which is a different API from v3 and is what current documentation describes.
Reuse the corpus and the **ground-truth set from the Pinecone course** if you did it. If you did not, build one now: thirty to fifty questions with the objects that genuinely answer them, split into conceptual and exact-match. Module 4's entire content depends on having it.
One framing to carry through. Because Weaviate exposes the index, you can make retrieval worse by tuning - and you will not be told. `ef` set too low silently reduces recall; aggressive quantisation silently reduces recall; a `maxConnections` change requires a rebuild to take effect. So the discipline is the same as Pinecone's and the surface is larger: **change one parameter, measure recall and latency, record both.**
What you will be able to do
- Run Weaviate locally with modules, and explain the compose configuration
- Design collections with typed properties, and explain what the schema buys
- Choose between a vectoriser module and bringing your own vectors
- Use named vectors, and explain when several vectors per object help
- Model cross-references, and state their cost
- Write CRUD, filters, vector search and BM25 queries
- Use hybrid search with alpha and both fusion algorithms
- Explain HNSW, and reason about ef, efConstruction and maxConnections
- Choose between HNSW, flat and dynamic indexes
- Configure product, binary and scalar quantisation, and measure the recall cost
- Measure the recall and latency trade-off across the index parameters
- Perform efficient batch imports and handle partial failures
- Implement multi-tenancy with tenant lifecycle states
- Configure sharding and replication, and choose a consistency level per request
- Perform backup and restore with a backup module
- Plan a rolling upgrade
- Implement authentication, RBAC and TLS
- Size a deployment from measured memory per vector, and model the cost
What each level covers
5 levels · 7 lessons
-
Beginner - Foundations
The local deployment and the schema; then the modelling the schema makes possible.
2 lessons 18 min of reading
Start with Collections, Objects, Vectorisers and the Local Stack → -
Intermediate - Application Behaviour
HNSW as a mechanism, reranking and generative search, and multi-tenancy as a first-class feature.
1 lesson 7 min of reading
Start with HNSW, Distance Metrics, Reranking, RAG and Multi-Tenancy → -
Advanced - Performance and Reliability
Quantisation and the recall it costs; then sharding, replication, consistency and backup.
2 lessons 14 min of reading
Start with Quantisation, Recall Trade-offs, Batch Imports and Index Tuning → -
Expert - Security and Production Architecture
Authentication and RBAC, tenant isolation, and sizing from the memory you measured.
1 lesson 9 min of reading
Start with Authentication, RBAC, TLS, Isolation, Monitoring and Sizing → -
Capstone
One product search, defended on measured relevance, a priced recall trade-off and proven tenant isolation.
1 lesson 7 min of reading
Start with Capstone - Semantic Product Search →
Guides and articles
Longer reading about this subject, written alongside the course.
Before you start
- Docker and Docker Compose
- Python 3.11 or later with weaviate-client version 4
- An embedding path: a local transformers module, or an API key for a vectoriser
- The Pinecone course, strongly recommended
- A corpus and a ground-truth set with conceptual and exact-match questions
- The programme's shared foundations
Common questions
- What does the Weaviate: Hybrid Search, HNSW Tuning and Multi-Tenancy course cover?
- It is 5 levels and 7 lessons: Beginner - Foundations; Intermediate - Application Behaviour; Advanced - Performance and Reliability; Expert - Security and Production Architecture; Capstone. Each level ends with a quiz, and the last one is an exam over the whole course.
- How long does it take?
- About 55 minutes of reading and exercises - roughly 0.9 hours. It is self-paced with no cohort and no start date, so you can leave and come back and the site remembers where you were.
- What do I need to know first?
- Docker and Docker Compose. Python 3.11 or later with weaviate-client version 4. An embedding path: a local transformers module, or an API key for a vectoriser. The Pinecone course, strongly recommended. A corpus and a ground-truth set with conceptual and exact-match questions. The programme's shared foundations.
- Is it free?
- Yes. Every lesson, example and quiz in this course is free to read, and you do not need an account to read them. Signing in only adds progress tracking and quiz results.
- What will I be able to do afterwards?
- Run Weaviate locally with modules, and explain the compose configuration. Design collections with typed properties, and explain what the schema buys. Choose between a vectoriser module and bringing your own vectors. Use named vectors, and explain when several vectors per object help. Model cross-references, and state their cost. Write CRUD, filters, vector search and BM25 queries. Use hybrid search with alpha and both fusion algorithms. Explain HNSW, and reason about ef, efConstruction and maxConnections. Choose between HNSW, flat and dynamic indexes. Configure product, binary and scalar quantisation, and measure the recall cost. Measure the recall and latency trade-off across the index parameters. Perform efficient batch imports and handle partial failures. Implement multi-tenancy with tenant lifecycle states. Configure sharding and replication, and choose a consistency level per request. Perform backup and restore with a backup module. Plan a rolling upgrade. Implement authentication, RBAC and TLS. Size a deployment from measured memory per vector, and model the cost.