Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FusionEngine ¶
type FusionEngine interface {
// ReciprocalRankFusion (RRF) merges results from different modalities
// (e.g., Sparse + Dense, or Vector + Graph) and re-ranks them based on their reciprocal positions.
ReciprocalRankFusion(ctx context.Context, resultSets [][]*core.Chunk, topK int) ([]*core.Chunk, error)
}
FusionEngine is responsible for merging multiple retrieval streams.
type RRFFusionEngine ¶
type RRFFusionEngine struct {
// contains filtered or unexported fields
}
RRFFusionEngine implements Reciprocal Rank Fusion. RRF computes a score for each chunk based on its rank in multiple result sets. Formula: RRF_Score = 1 / (k + rank)
func NewRRFFusionEngine ¶
func NewRRFFusionEngine() *RRFFusionEngine
NewRRFFusionEngine creates a new fusion engine with the standard k=60.
Click to show internal directories.
Click to hide internal directories.