• wizzor@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    12
    ·
    5 days ago

    For those (like me 10 minutes ago) who wonder what are reranker models…

    Reranker models are models which can evaluate the semantic similarity of two pieces of text. They can be used to improve RAG systems which use embeddings to look for relevant documents. The reranker model can then be used to select the best candidates.

    This improves the result, because reranker models look at the two pieces of content simultaneously and can be fine tuned to the domain in question. They shouldn’t be used for the initial retrieval because the evaluation time is O(n²) as each combination of input and document pair needs to be evaluated as a pair.

    • morrowind@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      5 days ago

      I want to clarify something. Reranker is a general term that can refer to any model used for reranking. It is independent of implementation.

      What you refer to

      because reranker models look at the two pieces of content simultaneously and can be fine tuned to the domain in question. They shouldn’t be used for the initial retrieval because the evaluation time is O(n²) as each combination of input

      Is a specific implementation known as CrossEncoder that is common for reranking models but not retrieval ones for the reasons you described. But you can also use any other architecture

      • wizzor@sopuli.xyz
        link
        fedilink
        English
        arrow-up
        2
        ·
        4 days ago

        Thanks, I think this is a good clarification, I had not encountered rerankers outside this specific implementation.