curation

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CuratedResult

type CuratedResult struct {
	Summary         string         `json:"summary"`
	Original        model.Document `json:"original"`
	Relevance       float64        `json:"relevance"`
	RelevanceReason string         `json:"relevance_reason,omitempty"`
}

CuratedResult wraps a search result with an LLM-generated summary. Original document data is always preserved untouched.

type Curator

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

Curator re-ranks and summarizes search results via LLM.

func New

func New(c llm.Completer) *Curator

New returns a Curator. If llm is nil, Curate returns passthrough results.

func (*Curator) Curate

func (c *Curator) Curate(ctx context.Context, query string, results []*model.SearchResult) ([]CuratedResult, error)

Curate re-ranks and lightly summarizes the given search results. Original data is ALWAYS preserved — never modified. When the LLM is nil or disabled, results are returned as-is.

Jump to

Keyboard shortcuts

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