Hybrid Search: Keywords Plus Vectors
Why pure vector search misses exact names, codes, and IDs — and how to combine full-text and vector results with reciprocal rank fusion.
Your semantic search handles "my teammate never got the invite" beautifully. Then a customer pastes ERR_SYNC_403 into the search box, and the top result is a general article about connecting email, while the one article that names that exact error sits at position seven. Nothing is broken. Embeddings capture meaning, and an error code doesn't have much meaning to capture.
Hybrid search fixes this by running a keyword search and a vector search side by side and merging the results. In this lesson you'll see exactly which queries vector search misses, add Postgres full-text search to Deskmate's knowledge base, merge both result lists with reciprocal rank fusion, and add a shortcut for queries that are really lookups. All of it fits in a single SQL query on the database you already have.
Where pure vector search falls down
Embedding models compress a passage into one point in "meaning space." That's ideal for paraphrases and fuzzy questions, and lossy for anything whose value is its exact characters. In practice, these are the queries that fail:
| Query type | Example | Why vectors struggle |
|---|---|---|
| Error codes and IDs | ERR_SYNC_403, DM-48213 | Arbitrary strings; nearby codes look alike to the model |
| Product and feature names | "Smart Assign", "Macros" | Ordinary words with a special meaning in your product |
| Rare names | A customer's integration partner, an internal codename | The model has little or no signal for them |
| Version and number specifics | "API v2 webhooks", "limit of 50 agents" | Numbers carry little weight in the vector |
| Very short queries | "SAML" | Not enough text to produce a distinctive vector |
Keyword search has the opposite profile. It's literal: it finds ERR_SYNC_403 instantly and is useless for "my teammate never got the invite" when the article says "invitation email" and "agent." Neither approach dominates. Each fails exactly where the other succeeds, which is why combining them is so effective.