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 ¶
func (r *ScoreReranker) Rerank(_ context.Context, query string, results []knowledge.SearchResult) ([]knowledge.SearchResult, error)
Click to show internal directories.
Click to hide internal directories.