Chapter 11 · Retrieval and memory
Hybrid search and reranking
Combine keyword and vector search, then rerank the best hits, for more accurate retrieval.
Chapter 11 · Retrieval and memory
Combine keyword and vector search, then rerank the best hits, for more accurate retrieval.
Keyword search and meaning search each return their own list.
Each method misses something the other catches. Merge them, then spend extra effort only on the shortlist.
It finds the very words you typed, such as a product code or a name. It misses a different wording of the same idea.
Pick a query, then slide the blend. Watch the order change. Switch reranking on to see which of the top five move.
A teaching version over 16 short documents. The reranker here is a simple rule: it prefers documents whose main topic matches the question's. A real reranker is a model that reads the question and a document together. Try “affordable holiday ideas” at keyword only: no word matches, so nothing is found.
What does keyword search do better than meaning search?
Why rerank only the top few results?
What is the point of hybrid search?