Expand description
Hybrid search: RRF fusion of semantic + BM25, then boosts and rerank.
Port of ~/src/semble/src/semble/search.py. Three entry points:
search_semantic— cosine similarity over the dense index.search_bm25— BM25 scoring (re-exported from the bm25 module).search_hybrid— fuses both ranked lists via Reciprocal Rank Fusion (k=60), over-fetchingtop_k * 5candidates, then applies ripvec’sboost_multi_chunk_files+apply_query_boost+ the penalty-awarererank_topk.
Constants§
- RRF_K
- Reciprocal Rank Fusion smoothing constant. Matches Python
_RRF_K = 60fromsearch.py:11.
Functions§
- parallel_
sgemv - Parallel matrix-vector multiply via row-sharded BLAS sgemv.
- search_
hybrid - Hybrid search: alpha-weighted RRF fusion of semantic + BM25,
followed by file-coherence + query boosts and the penalty-aware
reranker. Mirrors
search.py:search_hybrid. - search_
semantic - Pure semantic search: rank every chunk by dot product against the query embedding, then take the top-k after optional selector mask.