DocumentationAPI Reference📓 Tutorials🧑‍🍳 Cookbook🤝 Integrations💜 Discord🎨 Studio
Documentation

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.
SentenceTransformersDiversityRanker A Diversity Ranker based on Sentence Transformers.

Related Links