VectaraQueryConfig#
- class langchain_community.vectorstores.vectara.VectaraQueryConfig(k: int = 10, lambda_val: float = 0.0, filter: str = '', score_threshold: float | None = None, n_sentence_before: int = 2, n_sentence_after: int = 2, n_sentence_context: int | None = None, mmr_config: MMRConfig | None = None, summary_config: SummaryConfig | None = None, rerank_config: RerankConfig | None = None)[source]#
Configuration for Vectara query.
k: Number of Documents to return. Defaults to 10. lambda_val: lexical match parameter for hybrid search. filter Dictionary of argument(s) to filter on metadata. For example a
filter can be βdoc.rating > 3.0 and part.lang = βdeuββ} see https://docs.vectara.com/docs/search-apis/sql/filter-overview for more details.
- score_threshold: minimal score threshold for the result.
If defined, results with score less than this value will be filtered out.
- n_sentence_before: number of sentences before the matching segment
to add, defaults to 2
- n_sentence_after: number of sentences before the matching segment
to add, defaults to 2
rerank_config: RerankConfig configuration dataclass summary_config: SummaryConfig configuration dataclass
Attributes
filter
k
lambda_val
n_sentence_after
n_sentence_before
score_threshold
Methods
__init__
([k,Β lambda_val,Β filter,Β ...])- Parameters:
k (int) β
lambda_val (float) β
filter (str) β
score_threshold (float | None) β
n_sentence_before (int) β
n_sentence_after (int) β
n_sentence_context (Optional[int]) β
mmr_config (Optional[MMRConfig]) β
summary_config (SummaryConfig) β
rerank_config (RerankConfig) β
- __init__(k: int = 10, lambda_val: float = 0.0, filter: str = '', score_threshold: float | None = None, n_sentence_before: int = 2, n_sentence_after: int = 2, n_sentence_context: int | None = None, mmr_config: MMRConfig | None = None, summary_config: SummaryConfig | None = None, rerank_config: RerankConfig | None = None)[source]#
- Parameters:
k (int) β
lambda_val (float) β
filter (str) β
score_threshold (float | None) β
n_sentence_before (int) β
n_sentence_after (int) β
n_sentence_context (int | None) β
mmr_config (MMRConfig | None) β
summary_config (SummaryConfig | None) β
rerank_config (RerankConfig | None) β
Examples using VectaraQueryConfig