Weaviate is a cloud-native vector database with modular vectorization and built-in generative search. These exercises cover the module system for vectorization and generation, automatic embedding on insert, BM25+vector hybrid search, cross-reference graph traversal, and RAG via generative search.
0 / 5 completed
1 / 5
What is the role of Weaviate modules in the architecture?
Weaviate modules are pluggable components that extend core functionality. Vectorizer modules (e.g., text2vec-openai, text2vec-cohere) automatically embed data on insert and queries. Generative modules (e.g., generative-openai) enable RAG by passing retrieved objects to an LLM. Reranker modules improve result ordering.
2 / 5
A developer defines a Weaviate collection with vectorizer_config=Configure.Vectorizer.text2vec_openai(). What happens when they insert an object?
When a vectorizer module is configured, Weaviate automatically generates embeddings during data insertion by calling the configured embedding service (here, OpenAI's API). This happens server-side, so clients don't need to manage embeddings separately. The same vectorizer is applied to queries for consistency.
3 / 5
What is hybrid search in Weaviate and which search types does it combine?
Weaviate hybrid search combines vector similarity search (semantic) with BM25 keyword search. Results from both are fused using Reciprocal Rank Fusion (RRF) or Relative Score Fusion (RSF), controlled by the alpha parameter (0 = pure keyword, 1 = pure vector). This improves retrieval for queries that benefit from both exact and semantic matching.
4 / 5
In Weaviate's data model, what are cross-references?
Weaviate cross-references are typed links between objects (similar to foreign keys or graph edges). For example, an Article object can reference Author objects. Cross-references enable graph-like traversal and are followed during queries with with_additional to fetch related objects without separate queries.
5 / 5
How does Weaviate's generative search (RAG) work at the API level?
Weaviate generative search runs a standard vector or hybrid search, then passes the retrieved objects and a prompt to a configured LLM (via a generative module like generative-openai) in a single API call. The LLM synthesizes an answer from the retrieved context, implementing RAG within the Weaviate query itself.