Documentation ¶
Index ¶
- Constants
- func DefaultConfigDecoder(ret Retriever, cfg map[string]any) error
- func ExtractQuotedSubstrings(input string) []string
- type BM25Retriever
- type BasicRetriever
- type MergingRetriever
- type Retriever
- type RetrieverToMerge
- type RoutingRetriever
- type SubqueryRetriever
- func (s *SubqueryRetriever) DecodeConfig(cfg map[string]any) error
- func (s *SubqueryRetriever) Name() string
- func (s *SubqueryRetriever) NormalizedScores() bool
- func (s *SubqueryRetriever) Retrieve(ctx context.Context, store store.Store, query string, datasetIDs []string, ...) ([]vs.Document, error)
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
func (*BM25Retriever) NormalizedScores ¶ added in v0.4.13
func (r *BM25Retriever) NormalizedScores() bool
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
func (*BasicRetriever) NormalizedScores ¶ added in v0.4.13
func (r *BasicRetriever) NormalizedScores() bool
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
func (*MergingRetriever) NormalizedScores ¶ added in v0.4.13
func (r *MergingRetriever) NormalizedScores() bool
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 NormalizedScores() bool // whether the retriever returns normalized scores }
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
func (*RoutingRetriever) NormalizedScores ¶ added in v0.4.13
func (r *RoutingRetriever) NormalizedScores() bool
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
func (*SubqueryRetriever) NormalizedScores ¶ added in v0.4.13
func (s *SubqueryRetriever) NormalizedScores() bool
Click to show internal directories.
Click to hide internal directories.