BaseCrossEncoder#

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

Interface for cross encoder models.

Methods

__init__()

score(text_pairs)

Score pairs' similarity.

__init__()#
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]