// Stage 8 · RAG, Agents & AI Engineering
Embeddings, Vector Search & Reranking
BM25, sentence embeddings, DPR, ColBERT, HNSW, PQ and hybrid search.
about 8 hours10 algorithms4 paperslesson text in progress
01Goals
- Choose embedding models and similarity metrics
- Understand the trade-offs of HNSW vs IVF-PQ
- Build hybrid retrieval with re-ranking
Do these first: Tokenization & Embeddings · Unsupervised Learning
02Algorithms to master
Each card has the original paper, prerequisites and resources.
03Must-read papers
- The Probabilistic Relevance Framework: BM25 and Beyond ↗2009 ✓ verified
- Dense Passage Retrieval for Open-Domain Question Answering ↗2020 ✓ verified
- Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs ↗2016 ✓ verified
- ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT ↗2020 ✓ verified
04Courses & videos
- sbert.net ↗Official docsEN
- FAISS Wiki ↗Official docsEN
- Pinecone ↗ExplainersEN
- Pinecone ↗ExplainersEN
05Hands-on: project, code & exercises
Free, official or author-published pages. Most run in the browser or on a free Colab GPU.
PROJECT
On the same 10,000 documents, compare BM25, vector and hybrid retrieval by Recall@10 on 50 labelled questions.
- 1sbert.net ↗Official docs
Encode documents with Sentence Transformers, then add semantic search and cross-encoder re-ranking.
- 2facebookresearch/faiss ↗Reference code
Build Flat, IVF and HNSW indexes in FAISS and compare recall and speed.
- 3
06Self-test
Answer in your head, then open to check.
The main cost of HNSW?
High memory use and slow index builds.
Why mix BM25 with vectors?
Exact keyword matching and semantic matching complement each other.
Are re-rankers slower or faster than retrievers?
Slower and more accurate, so they only see a few candidates.
On these routes: Application Developers