Retrieval decides which passages the model gets to see, so it often matters more than the model itself. A first search over a vector database is fast but rough: the best passage may sit fifth or tenth in the list, and a purely semantic search can miss exact terms like product names or error codes. This module covers the two main ways to fix that.
The lessons start with hybrid search, which combines keyword matching with vector search. Next you will see how rerankers take a larger set of candidate passages and re-score them with a more accurate model, and how a bi-encoder differs from a cross-encoder. Two videos show reranking in code, including with the Cohere API. A final long course covers retrieval more broadly, including query translation techniques that rewrite a question before searching.
Watch the lessons in order. The last video is a long course, so feel free to watch just the retrieval and query translation parts for now and come back to the rest later.
Why combining keyword search with vector search finds more of the right passages than either one alone, and how the two sets of results are merged.
VideoThe difference between the two kinds of model used in retrieval and reranking, why a cross-encoder is more accurate but slower, and a benchmark in code.
VideoA walkthrough of adding a reranking step to a RAG pipeline, using an open cross-encoder model and the Cohere rerank API.
VideoHow a reranker improves the results of a first-pass vector search, shown with the Cohere reranking model.
VideoA long freeCodeCamp course by Lance Martin that builds RAG step by step. The retrieval and query translation sections (Multi-Query, RAG Fusion, Decomposition, Step Back and HyDE) are the most relevant here, and the rest is an optional deep dive.
Video 2h30min