Embeddings and vector databases
Understand semantic similarity and when vector search is actually useful.
- 11 minutes
- intermediate
- Reviewed 2026-07-16
What is it?
An embedding converts content into a vector. A vector database stores vectors and searches for nearby items, often combined with metadata filters.
Why does it matter?
Semantic search can find related meaning even when words differ, which is useful for retrieval, clustering, and recommendation.
The mental model
An embedding places meaning on a numerical map; nearby points are often semantically related.
A simple example
A search for 'ending a subscription' can find a passage titled 'account cancellation' without sharing exact words.
What it is not
A vector database is not a complete knowledge system, a source of truth, or mandatory for every RAG project.
Learn this first
These ideas make the lesson easier to place.
- RAG
- Basic search
Your first 60 minutes
Use one focused hour to make the idea concrete.
- Compare keyword and semantic results for five phrases.
- Add a metadata filter such as language or document type.
- Inspect one false positive and explain why it appeared.
Build this first
Create a tiny semantic search over 20 short notes and compare it with ordinary keyword matching.
When not to use it
Avoid vectors when exact IDs, dates, permissions, or small structured datasets should drive retrieval.
What to learn next
Learn grounded answer evaluation and hybrid search.