rerank

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LLMReranker

type LLMReranker struct {
	// contains filtered or unexported fields
}

LLMReranker asks an LLM to rank candidate document IDs for a query.

func NewLLMReranker

func NewLLMReranker(gateway llm.Gateway, profile string) *LLMReranker

func (*LLMReranker) Rerank

func (r *LLMReranker) Rerank(ctx context.Context, query string, results []knowledge.SearchResult) ([]knowledge.SearchResult, error)

type ScoreReranker

type ScoreReranker struct{}

ScoreReranker reorders results by normalized score and lexical overlap with the query.

func NewScoreReranker

func NewScoreReranker() *ScoreReranker

func (*ScoreReranker) Rerank

Jump to

Keyboard shortcuts

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