<aside> 🎙️

Date: Wednesday, October 7, 2026 · Week 2, Day 10 · Type: Build Day + Live Session 3 (7:30 PM IST, 90 min)

</aside>

Learning Manual

10.1 Why Vector Search Fails Alone — the weakness of embeddings with exact part numbers, product codes, legal names, and error codes.

10.2 Keyword Search (BM25 / Lexical) — searching by exact keyword occurrences.

10.3 Hybrid Search Fusion — combining vector search and keyword search into a single unified ranking using Reciprocal Rank Fusion (RRF).

The Daily Build

Build a Hybrid Search module that runs vector similarity search and a simple exact-keyword search in parallel, merges both ranked lists using the RRF algorithm, and returns the top 5 combined results.

Architecture Diagram

+---> [Vector Search (Semantic)] ----+
                     |                                    |
[User Search Query] -+                                    v
                     |                         +--------------------+
                     +---> [Keyword Search (Lexical)] -> | RRF Merge & Rank   |
                                               +--------------------+
                                                          |
                                                          v
                                               [Unified Top-5 Results]

Interview Questions

  1. Why does vector embedding search often fail on queries like "Error code 0x80070005" or "Part #AB-9128"?
  2. What is Reciprocal Rank Fusion (RRF), and why is it preferred over simply adding similarity scores together?
  3. How does the smoothing constant k (typically k=60) in the RRF formula prevent top ranks from dominating scores?

Problem Statement

Problem 10. Implement the Reciprocal Rank Fusion algorithm: RRF_Score(d) = Σ (1 / (60 + rank_m(d))) across ranked lists m. Write a function that merges two ranked lists of document IDs ['doc_1', 'doc_2', 'doc_3'] and ['doc_3', 'doc_4', 'doc_1'] and returns the sorted fused ranking.

AI-DSA Primitive

Algorithm: Rank Aggregation via Hash Map Accumulation.

Mechanics: Iterating through multiple ranked lists and accumulating positional reciprocal scores into a hash map in O(M·N) time.

Real-World Production Use: Deployed inside Azure AI Search, Pinecone Hybrid Search, and Elasticsearch hybrid retrieval pipelines.

Software Design Pattern