Database / Qdrant Vector DB Interview questions
What is a collection in Qdrant?
A collection is the top-level container for a set of points (vectors plus their payloads) in Qdrant, roughly analogous to a table in a relational database, and it defines shared configuration like vector dimensionality, distance metric, and indexing/quantization settings that apply to every point stored in it.
from qdrant_client import QdrantClient, models client = QdrantClient(url="http://localhost:6333") client.create_collection( collection_name="documents", vectors_config=models.VectorParams(size=384, distance=models.Distance.COSINE), )
Every point added to a collection must have a vector matching that collection's configured size and be compared using its configured distance metric, which is why the vector dimensionality and distance metric are fixed at collection-creation time rather than being flexible per point.
A collection can hold one or more named vectors per point (useful for storing multiple embeddings per item, like a text embedding and an image embedding side by side), and it's also the unit at which sharding, replication, and quantization settings are configured for a distributed deployment.
More Related questions...