MMRConfig#

class langchain_community.vectorstores.vectara.MMRConfig(is_enabled: bool = False, mmr_k: int = 50, diversity_bias: float = 0.3)[source]#
Configuration for Maximal Marginal Relevance (MMR) search.

This will soon be deprated in favor of RerankConfig.

is_enabled: True if MMR is enabled, False otherwise mmr_k: number of results to fetch for MMR, defaults to 50 diversity_bias: number between 0 and 1 that determines the degree

of diversity among the results with 0 corresponding to minimum diversity and 1 to maximum diversity. Defaults to 0.3. Note: diversity_bias is equivalent 1-lambda_mult where lambda_mult is the value often used in max_marginal_relevance_search() We chose to use that since we believe itโ€™s more intuitive to the user.

Attributes

diversity_bias

is_enabled

mmr_k

Methods

__init__([is_enabled,ย mmr_k,ย diversity_bias])

Parameters:
  • is_enabled (bool) โ€“

  • mmr_k (int) โ€“

  • diversity_bias (float) โ€“

__init__(is_enabled: bool = False, mmr_k: int = 50, diversity_bias: float = 0.3) โ†’ None#
Parameters:
  • is_enabled (bool) โ€“

  • mmr_k (int) โ€“

  • diversity_bias (float) โ€“

Return type:

None