BaseCrossEncoder#

class langchain.retrievers.document_compressors.cross_encoder.BaseCrossEncoder[source]#

Interface for cross encoder models.

Methods

score(text_pairs)

Score pairs' similarity.

abstract score(text_pairs: List[Tuple[str, str]]) → List[float][source]#

Score pairs’ similarity.

Parameters:

text_pairs (List[Tuple[str, str]]) – List of pairs of texts.

Returns:

List of scores.

Return type:

List[float]