Documentation ¶
Index ¶
Constants ¶
View Source
const BM25RetrieverName = postprocessors.BM25PostprocessorName
View Source
const BasicRetrieverName = "basic"
View Source
const MergingRetrieverName = "merge"
View Source
const RoutingRetrieverName = "routing"
View Source
const SubqueryRetrieverName = "subquery"
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigDecoder ¶ added in v0.4.11
func ExtractQuotedSubstrings ¶ added in v0.4.7
Extract double-quoted substrings from a string
Types ¶
type BM25Retriever ¶ added in v0.4.11
type BM25Retriever struct { TopN int K1 float64 // K1 should be between 1.2 and 2 - controls term frequency saturation B float64 // B should be around 0.75 - controls the influence of document length normalization CleanStopWords []string // list of stopwords to remove from the documents - if empty, no stopwords are removed, if only "auto" is present, the language is detected automatically }
func (*BM25Retriever) DecodeConfig ¶ added in v0.4.11
func (r *BM25Retriever) DecodeConfig(cfg map[string]any) error
func (*BM25Retriever) Name ¶ added in v0.4.11
func (r *BM25Retriever) Name() string
type BasicRetriever ¶
type BasicRetriever struct {
TopK int
}
func (*BasicRetriever) DecodeConfig ¶ added in v0.4.11
func (r *BasicRetriever) DecodeConfig(cfg map[string]any) error
func (*BasicRetriever) Name ¶ added in v0.1.9
func (r *BasicRetriever) Name() string
type MergingRetriever ¶ added in v0.4.11
type MergingRetriever struct { TopK int Retrievers []RetrieverToMerge `json:"retrievers" mapstructure:"retrievers" yaml:"retrievers"` // contains filtered or unexported fields }
func (*MergingRetriever) DecodeConfig ¶ added in v0.4.11
func (r *MergingRetriever) DecodeConfig(cfg map[string]any) error
func (*MergingRetriever) Name ¶ added in v0.4.11
func (r *MergingRetriever) Name() string
type Retriever ¶
type Retriever interface { Retrieve(ctx context.Context, store store.Store, query string, datasetIDs []string, where map[string]string, whereDocument []chromem.WhereDocument) ([]vs.Document, error) Name() string DecodeConfig(cfg map[string]any) error }
func GetDefaultRetriever ¶
func GetDefaultRetriever() Retriever
func GetRetriever ¶
type RetrieverToMerge ¶ added in v0.4.11
type RoutingRetriever ¶ added in v0.1.8
func (*RoutingRetriever) DecodeConfig ¶ added in v0.4.11
func (r *RoutingRetriever) DecodeConfig(cfg map[string]any) error
func (*RoutingRetriever) Name ¶ added in v0.1.9
func (r *RoutingRetriever) Name() string
type SubqueryRetriever ¶ added in v0.1.8
func (*SubqueryRetriever) DecodeConfig ¶ added in v0.4.11
func (s *SubqueryRetriever) DecodeConfig(cfg map[string]any) error
func (*SubqueryRetriever) Name ¶ added in v0.1.9
func (s *SubqueryRetriever) Name() string
Click to show internal directories.
Click to hide internal directories.