fusion

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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.

func (*RRFFusionEngine) ReciprocalRankFusion

func (e *RRFFusionEngine) ReciprocalRankFusion(ctx context.Context, resultSets [][]*entity.Chunk, topK int) ([]*entity.Chunk, error)

ReciprocalRankFusion merges results from different modalities.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL