Documentation
¶
Overview ¶
Package postprocessors is basically the same as package transformers, but used at a different stage of the RAG pipeline
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PostprocessorMap = map[string]Postprocessor{ "extra_metadata": NewTransformerWrapper(&transformers.ExtraMetadata{}), "keywords": NewTransformerWrapper(&transformers.KeywordExtractor{}), "filter_markdown_docs_no_content": NewTransformerWrapper(&transformers.FilterMarkdownDocsNoContent{}), "similarity": &SimilarityPostprocessor{}, "content_substring_filter": &ContentSubstringFilterPostprocessor{}, "content_filter": &ContentFilterPostprocessor{}, "cohere_rerank": &CohereRerankPostprocessor{}, }
Functions ¶
This section is empty.
Types ¶
type CohereRerankPostprocessor ¶ added in v0.1.7
type ContentFilterPostprocessor ¶ added in v0.1.7
type ContentSubstringFilterPostprocessor ¶ added in v0.1.7
type Postprocessor ¶
type Postprocessor interface {
Transform(ctx context.Context, query string, docs []vs.Document) ([]vs.Document, error)
}
Postprocessor is similar to types.DocumentTransformer, but can take into account the retrieval query
func GetPostprocessor ¶
func GetPostprocessor(name string) (Postprocessor, error)
type SimilarityPostprocessor ¶ added in v0.1.7
type SimilarityPostprocessor struct {
Threshold float32
}
type TransformerWrapper ¶ added in v0.1.7
type TransformerWrapper struct {
types.DocumentTransformer
}
func NewTransformerWrapper ¶ added in v0.1.7
func NewTransformerWrapper(transformer types.DocumentTransformer) *TransformerWrapper
Click to show internal directories.
Click to hide internal directories.