Expand description
Hybrid search engine: BM25 + vector similarity + Reciprocal Rank Fusion.
Structs§
Functions§
- cosine_
similarity - Compute cosine similarity between two vectors.
- deduplicate_
results - Deduplicate results by (source_type, source_id), keeping the first occurrence.
- fts_
only_ search - Full-text search only (no embeddings needed). Synchronous.
- hybrid_
search - Perform a hybrid search (BM25 + vector + RRF).
- hybrid_
search_ explained - Perform a hybrid search and return the exact score decomposition.
- rrf_
fuse - Fuse BM25 and vector results via Reciprocal Rank Fusion.
- rrf_
fuse_ with_ context - sanitize_
fts_ query - Sanitize a raw query string for safe use in an FTS5 MATCH expression.
- source_
dedup_ key - vector_
only_ search - Vector-only search. Called after embedding the query.