RerankConfig#

class langchain_community.vectorstores.vectara.RerankConfig(reranker: str = 'none', rerank_k: int = 50, mmr_diversity_bias: float = 0.3)[source]#

Configuration for Reranker.

reranker: โ€œmmrโ€, โ€œrerank_multilingual_v1โ€ or โ€œnoneโ€ rerank_k: number of results to fetch before reranking, defaults to 50 mmr_diversity_bias: for MMR only - a 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: mmr_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

mmr_diversity_bias

rerank_k

reranker

Methods

__init__([reranker,ย rerank_k,ย ...])

Parameters:
  • reranker (str) โ€“

  • rerank_k (int) โ€“

  • mmr_diversity_bias (float) โ€“

__init__(reranker: str = 'none', rerank_k: int = 50, mmr_diversity_bias: float = 0.3) โ†’ None#
Parameters:
  • reranker (str) โ€“

  • rerank_k (int) โ€“

  • mmr_diversity_bias (float) โ€“

Return type:

None

Examples using RerankConfig