Hybrid Search
A combination of semantic vector search and BM25 keyword search.
Why Vector Search Alone Is Not Enough
Vector search looks for meaning but often misses exact names: articles, model numbers, rare terms. Keyword search looks for exact matches but does not understand synonyms.
The solution is to combine both approaches.
How It Works
flowchart LR
A[Query] --> B[Vector Search]
A --> C[BM25]
B --> D[Aggregation]
C --> D
D --> E[Top-20]
- Vector search looks for meaning.
- BM25 looks for exact matches.
- Results are aggregated.
- Further, reranking can be added.
Where It Is Implemented
- LangChain — EnsembleRetriever;
- Weaviate — out of the box;
- Qdrant — via configuration.