AIOps Peach

RAG Optimization · Module 02

Advanced Retrieval Strategies

Why vector search alone misses exact terms, how BM25 scores keywords, and how hybrid search merges both result lists with Reciprocal Rank Fusion.

Học tương tác →

Học xong bạn làm được

Bài học

  1. Advanced Retrieval Strategies: Vector Search and BM25

    Vector search captures meaning but misses exact wording such as proper names, product codes and rare terms - an "Error 503" query can come back with "server overloaded". BM25, the gold standard of classical keyword retrieval and a refined TF-IDF, fixes this with term-frequency saturation, IDF and length normalisation.

  2. Hybrid Search

    Hybrid search is not a new algorithm but a process - send the query to a sparse retriever (BM25) and a dense retriever (vector search) in parallel, fuse the two result lists into one, and rank the result to give the LLM the top-K documents.

  3. Reciprocal Rank Fusion (RRF)

    Vector search scores lie in [0, 1] while BM25 scores can be any positive number, so they cannot be added. RRF ignores scores and uses ranks - each document gets the sum of 1 / (k + rank) over the lists, with k usually 60 - so a document ranked well by both engines beats one ranked first by only one.

  4. Modern Embedding Techniques (2025-2026)

    ColBERT v2 represents queries and documents as token vectors and scores them by late interaction (MaxSim), at the cost of a much larger index. Matryoshka Representation Learning makes the first N dimensions a valid smaller embedding, cutting storage. Natively multimodal models embed text, images, video, audio and PDFs in one shared space.

  5. Assignment: Hybrid Search

    Hybrid Search with BM25 and Reciprocal Rank Fusion