Blogs / What a Reranker Is and How It Differs From an Embedding Model

What a Reranker Is and How It Differs From an Embedding Model

What a Hugging Face post says a reranker is and how it differs from an embedding model that encodes the query and document separately.

  • Learning
  • 1 min read

For: Learners who know what an embedding is.

What a reranker is

A reranker (a.k.a. pointwise cross-encoder) is a neural model that takes a (query, document) pair and outputs a single relevance score.[1]

How it differs from an embedding model

Unlike an embedding model, which encodes the query and document separately and computes their similarity from the two embedding vectors, a reranker lets the two texts attend to each other through every transformer layer.[1]

A rerankertakes a query and documentpair and outputs a singlerelevance scoreAn embedding modelencodes the query anddocument separatelyA reranker lets thetwo texts attend toeach otherthrough every transformerlayerdoesunlike
How do the two differ?

Sources

  1. Introducing the Ettin Reranker Family (huggingface.co · checked )

More articles