Vector DB & ANN · core
Embeddings
Mapping text/images into dense vectors where distance encodes meaning.
Mental model
An embedding model projects content into a space where 'close' means 'semantically similar'. Search becomes geometry: find the nearest vectors to the query vector.
How to study Embeddings
Begin by restating the mental model in your own words, then connect it to a concrete system you have built or operated. Name the mechanism, the constraint it addresses, and the trade-off it introduces. Use MTEB: Massive Text Embedding Benchmark to check details, but close the source before writing your explanation. Retrieval is the learning step; rereading is only preparation.
Next, compare Embeddings with Vector Similarity, RAG, Embeddings (Transformer). Ask what changes in correctness, latency, resource use, operability, and failure recovery. Complete Embed a corpus and search it and preserve the command, input, output, and one failed attempt as evidence. Finish by explaining the idea without jargon to someone who has not studied the track.
Proof of understanding
- Explain the mechanism from first principles and identify the state it reads or changes.
- Give one situation where the concept is the right choice and one where it is not.
- Predict a realistic failure mode before running the drill, then compare the prediction with evidence.
- Connect the result to a roadmap or build artifact instead of treating the concept as isolated trivia.
Where it matters
OpenAI/Cohere/Voyage embedding APIs, semantic search, RAG retrieval.
Common mistakes
- Comparing vectors from two different embedding models
- Forgetting to normalize when using cosine similarity
- Ignoring the model's max input length and silently truncating
Learn from primary sources
- MTEB: Massive Text Embedding Benchmark (article)
Practice and explain it back
Embed a corpus and search it
Embed a small corpus with an embedding model, embed a query, and return the nearest documents by cosine similarity.
Expected evidence: Semantically relevant documents for a query that shares no exact keywords.
Open the interactive drill →Review prompts
- What does 'distance' mean in an embedding space?
Build evidence
RAG pipeline v0
An end-to-end retrieve → pack → generate pipeline grounded in a document corpus.
- Ingest documents with a chunking strategy
- Retrieve relevant chunks for a query
- Generate an answer grounded in retrieved context
- Have at least 10 eval questions
Prerequisites
None assigned yet.