A support question can contain an exact error code and an informal description of a symptom. Keyword search is useful for the code; semantic search can find a differently worded explanation. Combining the candidate lists can cover both needs.
The implementation must decide how to merge rankings or scores, deduplicate results, and apply filters. A weight favoring one retrieval path is a tuning choice, rather than a universal recipe. Compare performance on queries with identifiers as well as queries that require paraphrase matching.
Example: if an error-code question returns a generic troubleshooting article ahead of the specific fix, inspect the fusion and filters before replacing the answer model. A larger answer model does not repair that missing retrieval evidence.
Hybrid search selects candidates from multiple retrieval paths. Reranking scores an already retrieved candidate set more closely; it can follow hybrid retrieval. RAG then supplies selected evidence to a model that writes an answer. Test retrieval quality separately from the quality of that answer.
Fuse two short lists by rank
Keyword scores and vector similarities are not on a shared scale, so fusion either normalizes them or uses ranks alone. In Weaviate, relativeScoreFusion normalizes each search’s scores and rankedFusion uses positions; the effective weighting can depend on client and server version, so set it explicitly. Elastic’s reciprocal rank fusion adds 1 / (k + rank) from each list that contains a document, with ranks starting at 1 and nothing added when a document is absent. Elastic’s default k is 60; k = 10 keeps the arithmetic readable.
Keyword search returns A then B. Vector search returns B then C:
| Document | Keyword rank | Vector rank | RRF score |
|---|---|---|---|
| A | 1 | none | 1/11 ≈ 0.0909 |
| B | 2 | 1 | 1/12 + 1/11 = 23/132 ≈ 0.1742 |
| C | none | 2 | 1/12 ≈ 0.0833 |
B comes first because both lists found it, and the score orders documents without saying how likely any of them is to be relevant. Cut each list to its top result and A and B tie at 1/11, so the tie rule decides; a passage neither list returned cannot be fused back in. When an exact error code goes missing, read the two input lists, the window sizes and the filters before the fused order.
Sources
- Weaviate: Hybrid search — Describes keyword/vector retrieval and result fusion.
- Weaviate: Hybrid search concepts — relativeScoreFusion normalizes each search's scores; rankedFusion scores by position. The effective alpha can differ by client and server version.
Go deeper
- How do you evaluate a RAG system? AI, decoded · How to Evaluate a RAG System
- What is RAG, and why do AI systems use it? AI, decoded · What Is RAG (Retrieval-Augmented Generation)
- Elastic: Reciprocal rank fusion docs
Work through the keyword and vector rankings to recalculate their fused order. Reading needs no cluster; running the requests requires Elasticsearch.