Hybrid retrieval-augmented generation (Hybrid RAG) combines multiple retrieval channels over structured and unstructured data to supply context for an LLM. The channels complement one another: lexical search finds exact keywords and error codes, dense vector search finds related meanings and synonyms, and knowledge graphs capture explicit relationships between entities. section 3.4 section 3.3.2
A typical retrieval flow has three stages:
- Pre-filter candidates using structured metadata, such as tenant ID, date range, document category, or access permissions. section 3.4
- Retrieve candidates through parallel channels, such as BM25 lexical search, dense semantic search, and graph traversal. section 3.4
- Merge and rank the candidate lists using rank fusion or a downstream reranker, then provide the selected context to the LLM. section 3.4
Weighted score fusion combines retrieval scores directly, but BM25 and cosine similarity scores have different scales and distributions. Normalizing them and tuning fixed weights can be fragile. Reciprocal rank fusion (RRF) instead sums contributions based on each candidate’s position in the retrieval lists: each contribution is 1 / (k + rank), where rank starts at one and k is conventionally 60. The smoothing constant reduces the difference between leading positions. section 3.4
Finding an incident
For a query containing an error code, lexical search can retrieve exact matches while dense search finds descriptions with related wording. Graph traversal can add context about explicitly connected entities. Fusion brings these candidates into one ranked list for context selection. section 3.4 section 3.3.2
