Database / Weaviate Vector database Interview questions
1. What is Weaviate?
Weaviate is an open-source, Go-built vector database that stores both data objects and their vector embeddings together, letting an application combine semantic vector search with structured filtering, keyword search, and even graph-like relationships in a single system. Its core engine is Apache...
2. What is a Collection in Weaviate?
A Collection is Weaviate's schema-defined container for a set of objects sharing the same structure: a name, a list of properties (fields and their types), the vectorizer module (if any) used to generate embeddings, and vector index configuration. It's the direct equivalent of what earlier Weavia...
3. What is a vectorizer module in Weaviate?
A vectorizer module is a pluggable component that automatically converts an object's text (or image, or other supported data) into a vector embedding, at both insert time and query time, by calling out to an embedding provider or model. Configuring one on a collection means the application can wo...
4. What is hybrid search in Weaviate?
Hybrid search combines two distinct retrieval signals, dense vector similarity and BM25 keyword scoring, into a single query and a single fused ranking, rather than requiring an application to run two separate searches and merge the results itself. results = collection.query.hybrid( query="afford...
5. What is the HNSW index in Weaviate?
HNSW (Hierarchical Navigable Small World) is Weaviate's primary, in-memory graph-based approximate nearest neighbor index, and historically its only index type, still the default and most commonly used choice for collections of meaningful size. vector_index_config=Configure.VectorIndex.hnsw( ef_c...
6. What is a Flat index in Weaviate?
A Flat index performs exact, brute-force nearest neighbor search, comparing a query vector against every stored vector directly, with no graph or clustering structure involved. It trades the speed advantage of an approximate index for perfect recall and much lower memory overhead per vector. vect...
7. What is the Dynamic index in Weaviate?
The Dynamic index is a hybrid strategy that starts a collection off using a Flat index and automatically switches to an HNSW index once the collection's object count crosses a configured threshold, giving small collections the low overhead of Flat while still scaling gracefully into HNSW's better...
8. What is a cross-reference in Weaviate?
A cross-reference is a link from one object to another, potentially in a different collection, letting Weaviate represent relationships between data, similar in spirit to a foreign key in a relational database, but resolved at query time as part of a GraphQL-style traversal. Property( name="hasAu...
9. What are named vectors in Weaviate?
Named vectors let a single collection define multiple distinct vector fields per object, each with its own vectorizer, index configuration, and compression settings, rather than being limited to exactly one vector per object. vector_config=[ Configure.Vectors.text2vec_openai(name="title_vector", ...
10. What is Weaviate Cloud?
Weaviate Cloud is the fully managed, hosted deployment of Weaviate's database engine, run and operated by Weaviate the company, for teams that want the same open-source engine's capabilities without deploying and maintaining Docker or Kubernetes infrastructure themselves. Because Weaviate Cloud r...
11. What is quantization/compression in Weaviate, and why is it used?
Quantization compresses a vector's representation, reducing each dimension from full 32-bit floating point precision down to a smaller number of bits, trading a controlled amount of precision loss for a significantly smaller memory footprint and, in some cases, faster comparison speed. Technique ...
12. What is Rotational Quantization (RQ) in Weaviate?
RQ is Weaviate's newest and currently recommended compression technique, applying a fast pseudorandom rotation to each vector before quantizing it, which spreads information evenly across dimensions and allows high recall retention without any training phase or manual tuning. vector_index_config=...
13. What is generative search (RAG) in Weaviate?
Generative search combines Weaviate's retrieval capability with a connected large language model in a single query: Weaviate first retrieves relevant objects (via vector, keyword, or hybrid search), then automatically passes those results to a configured generative module, which produces a natura...
14. What is multi-tenancy in Weaviate?
Multi-tenancy in Weaviate creates isolated data partitions within a single collection, one per tenant, with each tenant's data stored in its own physical segment on disk rather than being commingled with other tenants' data in shared storage. client.collections.create( name="Documents", multi_ten...
15. What is Object TTL in Weaviate?
Object Time-to-Live (TTL) is a lifecycle management feature that automatically expires and removes objects from a collection once a configured amount of time has passed, without an application needing to run its own scheduled cleanup job to delete stale data. client.collections.create( name="Sess...
16. What is the Weaviate Query Agent?
The Query Agent is an AI-driven feature, generally available since September 2025, that accepts a natural-language question and automatically routes and executes the appropriate search (or searches) across one or more collections, without the calling application needing to construct the underlyin...
17. What is a UUID's role for objects in Weaviate?
Every object stored in Weaviate, in every collection, is assigned a UUID that's guaranteed unique across the entire Weaviate instance, not just within its own collection. This universal uniqueness is what makes cross-collection references and direct object lookups by ID reliable and unambiguous. ...
18. What are properties in a Weaviate collection?
Properties are the named, typed fields that make up a collection's schema, analogous to columns in a relational table, defining what data each object in that collection holds beyond its vector embedding. Property(name="title", data_type=DataType.TEXT) Property(name="price", data_type=DataType.NUM...
19. What is BM25 in the context of Weaviate?
BM25 (Best Matching 25) is a classic, well-established term-weighting and ranking algorithm from information retrieval, used to score how relevant a document is to a query based on term frequency and how common or rare each term is across the whole collection. Weaviate uses BM25 as the keyword-ma...
20. What is the alpha parameter in Weaviate hybrid search?
alpha controls the relative weighting between the vector search component and the BM25 keyword component in a hybrid search query, letting an application tune how much each signal contributes to the final fused ranking for a given use case. collection.query.hybrid(query="running shoes", alpha=0.0...
21. What are the main deployment options for Weaviate?
Weaviate can be deployed in a few different ways, matching different operational preferences and scale requirements, all running the same underlying open-source engine. Deployment option Best suited for Self-hosted (Docker / Kubernetes) Full control, self-managed infrastructure, strict data resid...
22. What is replication in Weaviate?
Replication maintains multiple copies of a collection's data (or specific shards of it) across separate nodes in a cluster, so the loss of any single node doesn't make that data unavailable, and so read traffic can be distributed across more than one copy for better throughput. client.collections...
23. What is sharding in Weaviate?
Sharding splits a collection's data horizontally across multiple nodes, with each shard holding a subset of the collection's objects, letting a single collection scale beyond what any one node's storage and compute capacity could handle alone. client.collections.create( name="Products", sharding_...
24. What are the main use cases for Weaviate?
Weaviate's combination of vector search, keyword search, and structured filtering in one system suits a range of applications that need more than pure semantic similarity alone. Retrieval-augmented generation (RAG) - retrieving grounded context for LLM-powered applications, often via the built-in...
25. What is the difference between bringing your own vectors and using a vectorizer module?
Using a vectorizer module means Weaviate calls out to a configured embedding provider automatically, both when objects are inserted and when a text-based query (like near_text ) is issued, so the application only ever deals with raw text or other source data, never raw vector arrays directly. Vec...
26. Explain the data flow of an object being vectorized and indexed in Weaviate?
Inserting an object into a collection with a configured vectorizer involves several steps between the client's insert call and the object becoming fully searchable via its vector index. sequenceDiagram participant Client participant Weaviate participant Vectorizer as Vectorizer Module (e.g. text2...
27. Why does Weaviate combine BM25 and vector search instead of using vector search alone?
Dense vector embeddings excel at capturing semantic meaning and paraphrased similarity, but they can genuinely struggle with specific, rare terms, an exact product code, an uncommon proper noun, a precise legal citation, where the literal token matters and a general-purpose embedding model may no...
28. How does Weaviate differ from Milvus?
Both are open-source vector databases supporting approximate nearest neighbor search at scale, but they emphasize different capabilities and take different architectural approaches to storage organization. Weaviate Milvus Objects and vectors stored together with rich property schema and cross-ref...
29. What is the difference between HNSW and the HFresh index in Weaviate?
HNSW keeps its full graph structure in memory for fast, high-recall search, which delivers strong query performance but means memory usage scales directly with data volume. HFresh is a newer, disk-based cluster index designed specifically for cases where memory efficiency matters more than achiev...
30. How do you choose between PQ, BQ, SQ, and RQ quantization?
Each compression technique trades off training requirements, compression ratio, and recall retention slightly differently, and Weaviate's own guidance points toward a fairly clear default recommendation while leaving room for specific alternatives. RQ (recommended starting point) - no training ne...
31. When should you use the Dynamic index instead of always using HNSW?
Always using HNSW, even for very small collections or individual tenant partitions, means paying the overhead of building and maintaining a graph structure even when a small collection's data would search perfectly fast with plain brute-force comparison. The Dynamic index avoids that unnecessary ...
32. How do you troubleshoot poor recall after enabling quantization in Weaviate?
A drop in search quality after enabling compression usually traces back to a mismatch between the chosen technique's assumptions and the actual data, or a configuration that hasn't been tuned for the specific recall/compression trade-off the application needs. Check whether rescoring is enabled a...
33. What is the difference between rescoring and raw compressed-vector search?
Raw compressed-vector search compares the query against every candidate using only the compressed (lossy) representation throughout, which is fast but accepts whatever recall degradation the compression technique introduces without any correction step. Rescoring adds a second pass: after an initi...
34. How does Weaviate's multi-tenancy isolate tenant data on disk?
Rather than storing every tenant's objects together in one shared collection-wide storage area distinguished only by a tenant ID field (which would still leave data physically commingled), Weaviate allocates each tenant its own distinct physical segment on disk within the collection. This physica...
35. Explain the internal working of Weaviate's rescoring mechanism for quantized vectors?
Rescoring is what lets Weaviate get most of quantization's memory savings without accepting the full recall cost that using compressed vectors alone throughout the entire search would otherwise incur. flowchart TD A[Query vector arrives] --> B[Search using compressed vectors, e.g. RQ/PQ/BQ/SQ] B ...
36. What is the difference between Weaviate and Pinecone?
Both support vector similarity search at production scale, but they differ sharply in openness, deployment flexibility, and how much built-in functionality sits directly in the database versus needing to be assembled from separate tools. Weaviate Pinecone Open-source (Apache 2.0) core; self-hoste...
37. How do you implement RAG using Weaviate's generative search module?
Implementing RAG with Weaviate's built-in generative search means configuring a generative module on the collection, then using one of the generate-family query methods to combine retrieval and generation in a single call, rather than manually orchestrating a separate retrieval step and a separat...
38. Why use cross-references sparingly, according to Weaviate's own guidance?
Weaviate's documentation actively encourages minimizing cross-reference usage, suggesting teams first consider whether a relationship could instead be represented by denormalizing related data directly into an object's own properties, or by using filters against those properties, rather than mode...
39. What is the difference between rankedFusion and relativeScoreFusion in hybrid search?
Both are algorithms Weaviate can use to combine the separate vector-search and BM25-search result lists into one fused ranking, but they combine those lists using different mathematical approaches. rankedFusion relativeScoreFusion Combines results based on each item's rank position in each list. ...
40. How does the Weaviate Query Agent route natural-language questions across collections?
Rather than a developer writing explicit logic to decide which collection a given question is about and what kind of search (vector, keyword, hybrid, filtered) best answers it, the Query Agent is given access to a set of collections and interprets an incoming natural-language question to make tho...
41. When would you choose multi-vector (ColBERT-style) embeddings over single-vector embeddings?
A traditional single-vector embedding compresses an entire piece of text (a document, a passage) down into one fixed-length vector, which necessarily loses some fine-grained, token-level information in the process. Multi-vector embeddings, produced by models like ColBERT, ColPali, or ColQwen, ins...
42. How do you configure replication factor for high availability in Weaviate?
Replication factor is set at collection-creation time (and can be adjusted afterward), specifying how many copies of each shard should be maintained across the cluster's nodes. client.collections.create( name="Products", replication_config=Configure.replication( factor=3, async_enabled=True ) A h...
43. What is the difference between Weaviate's REST/GraphQL API and its gRPC API?
Weaviate has historically exposed a GraphQL API (alongside a REST API for schema and object management) as its primary query interface, letting clients construct rich, nested queries combining vector search, filtering, and cross-reference traversal in a single request. More recently, Weaviate has...
44. Explain the lifecycle of a hybrid search query in Weaviate?
A hybrid search request involves running two independent searches internally and then fusing their results, all within the scope of handling that single client call. sequenceDiagram participant Client participant Weaviate participant Vectorizer as Vectorizer Module participant VectorIdx as Vector...
45. How do you optimize Weaviate for memory efficiency at large scale?
At large scale, memory is typically the dominant cost driver for a Weaviate deployment (particularly for HNSW-indexed collections), so optimization mostly means reducing what has to stay resident in memory without unacceptably sacrificing recall or latency for the workload. Enable RQ compression ...
46. What is the difference between PQ and RQ quantization internally?
PQ (Product Quantization) works by splitting each vector into smaller sub-vector segments, then training a separate small codebook (via clustering) for each segment on a sample of the actual data, so each segment gets replaced at query time by a compact code pointing to its nearest trained codebo...
47. How does Weaviate decide which shard(s) to query for a given request?
For a collection split across multiple shards, an unfiltered vector or hybrid search generally needs to query every shard, since the globally best-matching objects could in principle live on any of them, and Weaviate fans the request out accordingly, merging the per-shard results into one final r...
48. Why should you avoid excessive cross-reference traversal in a single query?
Each cross-reference traversal in a query effectively requires Weaviate to resolve a link from one object to another, potentially in a completely different collection, which is a fundamentally different operation from evaluating a property directly on the object already being searched. Chaining s...
49. What is the difference between Weaviate Database (self-hosted) and Weaviate Cloud?
Weaviate Database is the open-source engine itself, deployable via Docker or Kubernetes on infrastructure an organization controls and operates directly. Weaviate Cloud is the same engine, run and operated by Weaviate the company as a managed service, so the organization doesn't need to provision...
50. How do you troubleshoot a Weaviate collection running out of memory at scale?
An out-of-memory condition on a Weaviate node almost always traces back to the resident vector index (typically HNSW) and its associated data structures exceeding available memory, and the fix generally involves either reducing that footprint or spreading the load across more capacity. Check whet...