Quiz: Vector Databases
Test your knowledge about vector databases, indexing algorithms, and database selection.
30 questions - Click on each question to reveal the correct answer.
Question 1
What is the primary purpose of a vector database?
a) Store relational data
b) Efficient similarity search on high-dimensional vectors
c) Text processing
d) File storage
Show Answer
Correct Answer: b
Vector databases are optimized for storing and efficiently searching high-dimensional vectors using similarity metrics.
Question 2
Which indexing algorithm is most commonly used in production vector databases?
a) B-Tree
b) Hash Index
c) HNSW
d) Binary Search
Show Answer
Correct Answer: c
HNSW (Hierarchical Navigable Small World) is the most popular algorithm due to its excellent balance of speed and accuracy.
Question 3
What does HNSW stand for?
a) High-speed Navigable Search Web
b) Hierarchical Navigable Small World
c) Hybrid Neural Search Wrapper
d) Hash-based Neighbor Search Width
Show Answer
Correct Answer: b
HNSW stands for Hierarchical Navigable Small World, a graph-based approximate nearest neighbor algorithm.
Question 4
Which vector database is fully managed (cloud-only)?
a) Chroma
b) Milvus
c) Pinecone
d) FAISS
Show Answer
Correct Answer: c
Pinecone is a fully managed, cloud-only vector database service.
Question 5
What is Chroma best suited for?
a) Enterprise production
b) Local development and prototyping
c) Multi-region deployment
d) Petabyte-scale data
Show Answer
Correct Answer: b
Chroma is lightweight and best suited for local development, prototyping, and small-scale production.
Question 6
What is the Flat index trade-off?
a) Fast but inaccurate
b) Slow but 100% accurate
c) Fast and accurate
d) Requires training
Show Answer
Correct Answer: b
Flat index performs brute-force exact search - slowest but guarantees 100% accuracy.
Question 7
What is metadata filtering in vector databases?
a) Removing duplicate vectors
b) Filtering search results by non-vector attributes
c) Compressing vectors
d) Deleting old data
Show Answer
Correct Answer: b
Metadata filtering allows you to filter similarity search results based on attributes like source, date, or category.
Question 8
Which open-source database is written in Rust?
a) Milvus
b) Chroma
c) Qdrant
d) Pinecone
Show Answer
Correct Answer: c
Qdrant is a modern, high-performance vector database written in Rust.
Question 9
What does pgvector enable?
a) Graph databases in PostgreSQL
b) Vector similarity search in PostgreSQL
c) Time-series data in PostgreSQL
d) NoSQL in PostgreSQL
Show Answer
Correct Answer: b
pgvector is a PostgreSQL extension that enables vector similarity search within your existing PostgreSQL database.
Question 10
What is FAISS best suited for?
a) Cloud deployment
b) High-speed in-memory search
c) Multi-tenant applications
d) Long-term storage
Show Answer
Correct Answer: b
FAISS (Facebook AI Similarity Search) excels at high-speed, in-memory similarity search.
Question 11
In IVF indexing, what is 'nlist'?
a) Number of search results
b) Number of vector dimensions
c) Number of clusters
d) Number of neighbors
Show Answer
Correct Answer: c
In IVF (Inverted File Index), nlist is the number of clusters the vectors are partitioned into.
Question 12
What is 'top-k' in vector search?
a) The top k databases
b) The k nearest neighbors to return
c) The k largest vectors
d) The k oldest results
Show Answer
Correct Answer: b
Top-k refers to returning the k most similar (nearest neighbor) vectors to the query.
Question 13
Which metric is most common for text embeddings?
a) Euclidean distance
b) Manhattan distance
c) Cosine similarity
d) Hamming distance
Show Answer
Correct Answer: c
Cosine similarity is most commonly used for text embeddings as it measures directional similarity.
Question 14
What is a namespace in Pinecone?
a) A variable name
b) A way to partition data within an index
c) A type of index
d) An API endpoint
Show Answer
Correct Answer: b
Namespaces in Pinecone allow you to partition data within a single index for multi-tenancy or organization.
Question 15
What built-in feature does Weaviate offer that others don't?
a) HNSW indexing
b) Built-in vectorization (text2vec)
c) Metadata storage
d) REST API
Show Answer
Correct Answer: b
Weaviate has built-in vectorization modules that can automatically generate embeddings using various models.
Question 16
What is the ef parameter in HNSW?
a) Embedding function
b) Error factor
c) Exploration factor (quality-speed trade-off)
d) Encryption flag
Show Answer
Correct Answer: c
ef (exploration factor) controls the trade-off between search quality and speed in HNSW.
Question 17
Which database offers hybrid search (vector + keyword)?
a) Only Pinecone
b) Only FAISS
c) Weaviate, Qdrant
d) None support it
Show Answer
Correct Answer: c
Several databases including Weaviate and Qdrant support hybrid search combining vector and keyword search.
Question 18
What is upsert in vector databases?
a) Upload and insert
b) Update if exists, insert if not
c) User settings
d) Undo operation
Show Answer
Correct Answer: b
Upsert means update the vector if the ID exists, otherwise insert it as a new record.
Question 19
Why might you choose pgvector over specialized vector DBs?
a) Better performance
b) Already using PostgreSQL, want to avoid new infrastructure
c) More features
d) Free forever
Show Answer
Correct Answer: b
pgvector is ideal for teams already using PostgreSQL who want to add vector search without managing new infrastructure.
Question 20
What is the M parameter in HNSW?
a) Memory limit
b) Maximum connections per node
c) Metric type
d) Minimum results
Show Answer
Correct Answer: b
M controls the maximum number of connections each node can have in the HNSW graph.
Question 21
Which database is best for petabyte-scale deployments?
a) Chroma
b) SQLite
c) Milvus
d) In-memory FAISS
Show Answer
Correct Answer: c
Milvus is designed for large-scale deployments and can handle billions of vectors.
Question 22
What query interface does Weaviate use?
a) SQL only
b) GraphQL
c) MongoDB query language
d) No query interface
Show Answer
Correct Answer: b
Weaviate uses GraphQL as its primary query interface.
Question 23
What is collection in Milvus/Qdrant terminology?
a) A group of users
b) A table-like structure holding vectors
c) A type of index
d) A backup
Show Answer
Correct Answer: b
A collection is similar to a table in relational databases - it holds vectors and their metadata.
Question 24
What does IVF require before searching?
a) Nothing special
b) Training on data
c) GPU
d) Internet connection
Show Answer
Correct Answer: b
IVF (Inverted File Index) requires training to cluster the vectors before efficient searching is possible.
Question 25
What is the main disadvantage of HNSW?
a) Slow search
b) High memory usage
c) Low accuracy
d) No filtering support
Show Answer
Correct Answer: b
HNSW requires storing the graph structure in memory, leading to high memory usage compared to other algorithms.
Question 26
Which database offers the best free tier for testing?
a) Pinecone (limited)
b) All are equally free
c) Chroma (fully free, self-hosted)
d) None have free options
Show Answer
Correct Answer: c
Chroma is fully open-source and free to self-host with no limitations.
Question 27
What is sharding in vector databases?
a) Deleting data
b) Distributing data across multiple nodes
c) Compressing vectors
d) Encrypting data
Show Answer
Correct Answer: b
Sharding distributes data across multiple nodes for horizontal scalability.
Question 28
Which LangChain method creates a retriever from a vector store?
a) get_retriever()
b) as_retriever()
c) create_retriever()
d) to_retriever()
Show Answer
Correct Answer: b
The as_retriever() method creates a retriever interface from any LangChain vector store.
Question 29
What is approximate nearest neighbor (ANN)?
a) Exact search
b) Search that trades some accuracy for speed
c) A database type
d) A company name
Show Answer
Correct Answer: b
ANN algorithms find approximately nearest neighbors much faster than exact search, accepting small accuracy trade-offs.
Question 30
For a production RAG system with sensitive data, which is most appropriate?
a) Cloud-only Pinecone
b) Self-hosted Qdrant or Milvus
c) In-memory FAISS
d) No database needed
Show Answer
Correct Answer: b
For sensitive data, self-hosted solutions like Qdrant or Milvus keep data within your infrastructure.
Results
| Score | Level |
|---|---|
| 27-30 | Excellent - Strong understanding of vector databases |
| 21-26 | Good - Some review recommended |
| 15-20 | Average - Review the chapters again |
| Below 15 | Needs comprehensive review |