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