Keyword, Semantic and Hybrid Search

Created by Abhyuday DesaiPublished , v1Runs 8 min 8 sec
0 views

About this video

In Episode 03 of Retrieval Explained, we search six passages of API documentation two ways. BM25 keyword search finds the passage on an exact error code, and misses the caching passage when the question asks how to make an application faster, because the two share no words. Semantic search compares embeddings and finds it. For a question that names the error and also says what we are trying to do, we merge both rankings with reciprocal rank fusion, which combines positions instead of scores, and check whether the merge found anything the simpler search missed.

You'll learn how to:

  • Score passages with BM25, and see how splitting text into tokens decides what can match
  • Recognize vocabulary mismatch, where a user and a document describe the same need in different words
  • Search by meaning with normalized embeddings and one matrix product
  • Merge two rankings with reciprocal rank fusion, and see why averaging BM25 and cosine scores does not work
  • Choose between keyword, semantic and hybrid search from the queries your users actually send

This video is for developers choosing a search method for a retrieval system. The code runs from the companion repo.

What changed

  1. v104 Oct 2026abhydesai8 min 8 secb9e8014

    First published version.

    0 views0 likes on this version