DocumentationAPI ReferenceπŸ““ TutorialsπŸ§‘β€πŸ³ Cookbook🀝 IntegrationsπŸ’œ Discord

Rankers

Rankers are a group of components that order Documents by given criteria. Their goal is to improve your document retrieval results.

RankerDescription
CohereRankerRanks documents based on their similarity to the query using Cohere rerank models.
JinaRankerRanks Documents based on their similarity to the query using Jina AI models.
LostInTheMiddleRankerPositions the most relevant Documents at the beginning and at the end of the resulting list while placing the least relevant Documents in the middle, based on a research paper.
MetaFieldRankerA lightweight Ranker that orders Documents based on a specific metadata field value.
TransformersSimilarityRankerA model-based Ranker that orders Documents based on their relevance to the query. It uses a cross-encoder model to produce query and Document embeddings. It then compares the similarity of the query embedding to the Document embeddings to produce a ranking with the most similar Documents appearing first.

It's a powerful Ranker that takes word order and syntax into account. You can use it to improve the initial ranking done by a weaker Retriever, but it's also more expensive computationally than the Rankers that don't use models.

Related Links