Skip to content

Base

BaseReranking

Bases: BaseComponent

Source code in libs/kotaemon/kotaemon/rerankings/base.py
class BaseReranking(BaseComponent):
    @abstractmethod
    def run(self, documents: list[Document], query: str) -> list[Document]:
        """Main method to transform list of documents
        (re-ranking, filtering, etc)"""
        ...

run abstractmethod

run(documents, query)

Main method to transform list of documents (re-ranking, filtering, etc)

Source code in libs/kotaemon/kotaemon/rerankings/base.py
@abstractmethod
def run(self, documents: list[Document], query: str) -> list[Document]:
    """Main method to transform list of documents
    (re-ranking, filtering, etc)"""
    ...