Vector search feels like magic the first time it finds "my food arrived cold" for a question about "the biryani wasn't hot". Then a customer searches Tiffin for "Paneer 65", or a support agent pastes error code PAY-4012, and vector search returns things that are vaguely about paneer, or vaguely about payments. The exact match is on page two, or nowhere.
Meaning-based search and word-based search fail in opposite ways. Good retrieval systems run both and merge the results, then use a slower, smarter model to re-order the best few. This lesson covers that pipeline. It builds on the previous lesson (embeddings, vector indexes, chunks) and on keyword search with inverted indexes, which Module 9 introduces and Module 21 covers in depth under Elasticsearch.
Where each kind of search fails
| Query | Keyword search | Vector search |
|---|---|---|
| "Paneer 65" | Finds the exact dish | Finds paneer tikka, chilli paneer, maybe "65 rupee meals" |
| "PAY-4012" | Finds the one article that mentions it | Codes have little meaning to embed: you get payment-error articles, often for other codes |
| "food came cold" | Misses "not hot on arrival" | Finds it |
| "can I eat this if I'm allergic to nuts" | Misses "contains peanuts" if words differ | Finds it |
| "refund" in Hindi script | Misses English articles | Can match if the embedding model is multilingual |
The pattern: keyword search is precise with names, codes, rare terms and exact phrases. Vector search is good with paraphrases, questions written in everyday language and different languages. Real users send both kinds of query, often mixed in one: "Paneer 65 came cold".
Hybrid search runs keyword search and vector search on the same query, then merges the two ranked lists into one.