cross_encoder.py — langchain Source File
Architecture documentation for cross_encoder.py, a python file in the langchain codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 648aa612_187e_4ab1_7898_f938c353fbcc["cross_encoder.py"] cccbe73e_4644_7211_4d55_e8fb133a8014["abc"] 648aa612_187e_4ab1_7898_f938c353fbcc --> cccbe73e_4644_7211_4d55_e8fb133a8014 style 648aa612_187e_4ab1_7898_f938c353fbcc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
from abc import ABC, abstractmethod
class BaseCrossEncoder(ABC):
"""Interface for cross encoder models."""
@abstractmethod
def score(self, text_pairs: list[tuple[str, str]]) -> list[float]:
"""Score pairs' similarity.
Args:
text_pairs: List of pairs of texts.
Returns:
List of scores.
"""
Domain
Subdomains
Classes
Dependencies
- abc
Source
Frequently Asked Questions
What does cross_encoder.py do?
cross_encoder.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, RunnableInterface subdomain.
What does cross_encoder.py depend on?
cross_encoder.py imports 1 module(s): abc.
Where is cross_encoder.py in the architecture?
cross_encoder.py is located at libs/langchain/langchain_classic/retrievers/document_compressors/cross_encoder.py (domain: CoreAbstractions, subdomain: RunnableInterface, directory: libs/langchain/langchain_classic/retrievers/document_compressors).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free