Module 7 of 12

Retrieval & Reranking

Lessons

About This Module

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.

Lessons

5 videos
01

Hybrid Search in RAG Explained

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.

Video
02

RAG Reranking Explained: Bi-Encoder vs Cross-Encoder

The 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.

Video
03

Advanced RAG 04: Reranking with Cross Encoders, and Cohere API

A walkthrough of adding a reranking step to a RAG pipeline, using an open cross-encoder model and the Cohere rerank API.

Video
04

RAG But Better: Rerankers with Cohere AI

How a reranker improves the results of a first-pass vector search, shown with the Cohere reranking model.

Video
05

Learn RAG from Scratch: Python AI Tutorial from a LangChain Engineer

A 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