Vector Databases
Vector databases store numerical representations called embeddings and retrieve items whose vectors are near a query vector. They support similarity search for tasks such as semantic retrieval, recommendations, and retrieval-augmented generation.
itDatabases and data storage | OpenSkills.info
Intro
Vector Databases
A vector database stores vectors with identifiers, metadata, and source objects. It retrieves items whose vectors are close to a query vector under a chosen distance rule.
Use one mental model:
source object → embedding model → vector + metadata → index
query object → same model → query vector → candidates → rerank → result
The database does not understand meaning by itself. An embedding model maps inputs into a vector space. The database stores those vectors and searches that space efficiently.
What a vector represents
A vector is an ordered list of numbers. Its dimension is the number of values in that list. An embedding is a vector produced by a model to represent an input such as text, an image, audio, or a product.
Nearby embeddings may represent similar inputs according to the model and its training objective. That similarity is task-dependent. A model useful for English semantic search may be poor for source code, images, or another language.
Store the embedding model identity and version with the collection. Vectors produced by different models or incompatible versions do not automatically share a meaningful space.
Similarity needs a metric
A distance metric defines what “near” means.
- Cosine distance compares vector direction.
- Euclidean distance measures straight-line distance.
- Inner product uses the dot product and is often used when the embedding model expects it.
The embedding model's documentation should guide the metric. Changing the metric can change result order. Normalization can make some metrics closely related, but you should not assume vectors are normalized.
Exact and approximate search
Continue the course
This section is part of the paid course.
See pricing to subscribe, or log in if you already have access.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
