Skip to main content

Module hybrid_searcher

Module hybrid_searcher 

Source

Structs§

GrepOptions
HybridResults
HybridSearcher
KgConcept
RetrievedChunk

Enums§

Haystack

Constants§

DEFAULT_KG_BOOST_WEIGHT
Default weight applied to KG matches when boosting a chunk’s relevance score. A weight of 1.0 means a chunk whose path and content fully match the top KG concept can roughly double its rank vs an unmatched chunk with the same base score.

Functions§

boost_chunks_with_kg
Apply KG boost to a batch of chunks and sort by boosted score (descending). Mutates relevance_score in place so downstream consumers can see the boost reflected in the JSON output – otherwise the ordering would be inexplicable.
score_kg_boost
Compute the KG boost for a single chunk against a set of matched concepts.