Skip to content
Forward Deployed

Forward Deployed
Retrieval Quality & RAG Applications: sections and modules
T6.1

Retrievers & Hybrid Search

Use the retriever interface: similarity, score threshold, MMR, multi-query, compression, ensemble.

Lessons
8 lessons
By
Sourav Banerjee
Prerequisites
None
8 lessons

Also used in this module

Lessons taught in another module that this one builds on.

Practise and Check

Deliverable
Hybrid upgrade: add BM25 to the vector retriever, tune the fusion weights on the golden set, and find three queries that only hybrid search answers.
Assessment
Answer the five Interview questions without notes, then run the lab.
Interview probe
Larkspur moved support search from keyword search to embeddings. Agents now report that pasting an order ID such as `ORD-88213` returns general refund-policy chunks instead of the one note that mentions that order. What happened, and what do you change?
Common mistakes
  • Mixing up distance and relevance score directions when setting a threshold
  • Tuning k1 and b before fixing the whitespace-only BM25 tokeniser
  • Tuning RRF's c when evidence sits below the hand-over depth

Checkpoint

8 questions on this module's lessons. Pass mark 70 %. Your result feeds interview readiness, and a failed checkpoint puts the module in your revision queue.

  1. 1. The Larkspur assistant retrieves with plain similarity search at k=3. Asked about a product Larkspur does not sell, it still answers from three unrelated handbook chunks. What is the first defence?
  2. 2. Dense search ranks document A first and document B second. BM25 ranks document C first and document B second, and A does not appear in the BM25 list. Using reciprocal rank fusion with the conventional k of 60, which document comes out on top, and why?
  3. 3. In a Chroma store set to cosine, similarity_search_with_score gives the best chunk 0.35375, and you plan to keep chunks with score_threshold=0.3 in the similarity_score_threshold mode. What is true?
  4. 4. You turn on MMR with k=4 and turn λ down to favour diversity, but the results still match plain similarity search, near-duplicates included. What is the most likely cause?
  5. 5. You fuse dense and BM25 results with weighted score fusion: min-max normalise each list per query, then rank by alpha * vector + (1 - alpha) * bm25. A user asks a question the corpus cannot answer. What do the fused scores look like?
  6. 6. On a shared platform, a restricted user keeps getting thin or empty context even though their own documents contain good answers. The pipeline retrieves and reranks a top 6 across the whole corpus, then removes the documents the user cannot see. What should change?
  7. 7. An EnsembleRetriever fuses dense and BM25 with weights 0.7 and 0.3 and the default constant of 60. For an exact-ID question the dense retriever misses the ID chunk entirely, and BM25 ranks it first. Where does it land?
  8. 8. You are adding BM25 alongside dense search so that a ticket ID such as MRD-5031 stops returning the MRD-5030 guide. The dense side already searches with several rewrites of the question. Which design keeps exact IDs findable?

Your Progress

How confident are you with this module?

1 means "I could not explain it yet"; 5 means "I could teach it". Rate again any time.

 

Saved in this browser when you leave the box.