Skip to main content

Module hybrid

Module hybrid 

Source
Expand description

Hybrid semantic + keyword search with Reciprocal Rank Fusion (RRF).

HybridIndex wraps a SearchIndex (dense vector search) and a Bm25Index (BM25 keyword search) and fuses their ranked results via Reciprocal Rank Fusion so that chunks appearing high in either list bubble to the top of the combined ranking.

Structs§

HybridIndex
Combined semantic + keyword search index with RRF fusion.
ParseSearchModeError
Error returned when a SearchMode string cannot be parsed.

Enums§

SearchMode
Controls which retrieval strategy is used during search.

Functions§

boost_with_pagerank
Apply a multiplicative PageRank boost to search results.
pagerank_lookup
Build a normalized PageRank lookup table from a [RepoGraph].
rrf_fuse
Reciprocal Rank Fusion of two ranked lists.