Reranker

Maximize the search relevancy and RAG accuracy with our cutting-edge reranker API.


The goal of a search system is to find the most relevant results quickly and efficiently. Traditionally, methods like BM25 or tf-idf have been used to rank search results based on keyword matching. Recent methods, such as embedding-based cosine similarity, have been implemented in many vector databases. These methods are straightforward but can sometimes miss the subtleties of language, and most importantly, the interaction between documents and a query's intent. This is where the "reranker" shines. A reranker is an advanced AI model that takes the initial set of results from a search—often provided by an embeddings/token-based search—and reevaluates them to ensure they align more closely with the user's intent. It looks beyond the surface-level matching of terms to consider the deeper interaction between the search query and the content of the documents.

1
Initial Retrieval
A search system uses embeddings/BM25 to find a broad set of potentially relevant documents based on the user's query.

2
Reranking
The reranker then takes these results and analyzes them at a more granular level, considering the nuances of how the query terms interact with the document content.

3
Improved Results
It reorders the search results, placing the ones it deems most relevant at the top, based on this deeper analysis.

The reranker can significantly improve the search quality because it operates at a sub-document and sub-query level, meaning it looks at the individual words and phrases, their meanings, and how they relate to each other within the query and the documents. This results in a more precise and contextually relevant set of search results.
Jina Reranker v2 is the best-in-class reranker released on Jun 25th 2024; it is built for Agentic RAG. It features function-calling support, multilingual retrieval for over 100 languages, code search capabilities, and offers a 6x speedup over v1. Read more about v2 model.
Multilingual Retrieval
Reranker v2 enables document retrieval in over 100 languages, regardless of the query language.

Function-Calling & Code Search
Reranker v2 ranks code snippets and function signatures based on natural language queries, ideal for Agentic RAG applications.

Tabular and Structured Data Support
Reranker v2 ranks the most relevant tables based on natural language queries, helping to sort different table schemas and identify the most relevant one before generating an SQL query.

Reranker API

Try our cutting-edge reranker API to maximize your search relevancy and RAG accuracy. Starting for free!


Number of returned documents
The number of most relevant documents to return for the query.

Example query
Change it and see how the response changes!
Example candidate documents to rank
Change them and see how the response changes!

Request
curl https://api.jina.ai/v1/rerank \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer " \
  -d @- <<EOFEOF
  {
    "query": "Organic skincare products for sensitive skin",
    "top_n": 3,
    "documents": [
        "Organic skincare for sensitive skin with aloe vera and chamomile: Imagine the soothing embrace of nature with our organic skincare range, crafted specifically for sensitive skin. Infused with the calming properties of aloe vera and chamomile, each product provides gentle nourishment and protection. Say goodbye to irritation and hello to a glowing, healthy complexion.",
        "New makeup trends focus on bold colors and innovative techniques: Step into the world of cutting-edge beauty with this seasons makeup trends. Bold, vibrant colors and groundbreaking techniques are redefining the art of makeup. From neon eyeliners to holographic highlighters, unleash your creativity and make a statement with every look.",
        "Bio-Hautpflege für empfindliche Haut mit Aloe Vera und Kamille: Erleben Sie die wohltuende Wirkung unserer Bio-Hautpflege, speziell für empfindliche Haut entwickelt. Mit den beruhigenden Eigenschaften von Aloe Vera und Kamille pflegen und schützen unsere Produkte Ihre Haut auf natürliche Weise. Verabschieden Sie sich von Hautirritationen und genießen Sie einen strahlenden Teint.",
        "Neue Make-up-Trends setzen auf kräftige Farben und innovative Techniken: Tauchen Sie ein in die Welt der modernen Schönheit mit den neuesten Make-up-Trends. Kräftige, lebendige Farben und innovative Techniken setzen neue Maßstäbe. Von auffälligen Eyelinern bis hin zu holografischen Highlightern – lassen Sie Ihrer Kreativität freien Lauf und setzen Sie jedes Mal ein Statement.",
        "Cuidado de la piel orgánico para piel sensible con aloe vera y manzanilla: Descubre el poder de la naturaleza con nuestra línea de cuidado de la piel orgánico, diseñada especialmente para pieles sensibles. Enriquecidos con aloe vera y manzanilla, estos productos ofrecen una hidratación y protección suave. Despídete de las irritaciones y saluda a una piel radiante y saludable.",
        "Las nuevas tendencias de maquillaje se centran en colores vivos y técnicas innovadoras: Entra en el fascinante mundo del maquillaje con las tendencias más actuales. Colores vivos y técnicas innovadoras están revolucionando el arte del maquillaje. Desde delineadores neón hasta iluminadores holográficos, desata tu creatividad y destaca en cada look.",
        "针对敏感肌专门设计的天然有机护肤产品:体验由芦荟和洋甘菊提取物带来的自然呵护。我们的护肤产品特别为敏感肌设计,温和滋润,保护您的肌肤不受刺激。让您的肌肤告别不适,迎来健康光彩。",
        "新的化妆趋势注重鲜艳的颜色和创新的技巧:进入化妆艺术的新纪元,本季的化妆趋势以大胆的颜色和创新的技巧为主。无论是霓虹眼线还是全息高光,每一款妆容都能让您脱颖而出,展现独特魅力。",
        "敏感肌のために特別に設計された天然有機スキンケア製品: アロエベラとカモミールのやさしい力で、自然の抱擁を感じてください。敏感肌用に特別に設計された私たちのスキンケア製品は、肌に優しく栄養を与え、保護します。肌トラブルにさようなら、輝く健康な肌にこんにちは。",
        "新しいメイクのトレンドは鮮やかな色と革新的な技術に焦点を当てています: 今シーズンのメイクアップトレンドは、大胆な色彩と革新的な技術に注目しています。ネオンアイライナーからホログラフィックハイライターまで、クリエイティビティを解き放ち、毎回ユニークなルックを演出しましょう。"
    ]
  }
EOFEOF


API Pricing

API pricing is based on token usage - input tokens for standard APIs and output tokens for Reader API. One API key gives you access to all search foundation products.
Auto-recharge when tokens are low
Recommended for uninterrupted service in production. When your token balance is below the threshold you set, we will automatically recharge your credit card for the same amount as your last top-up. If you purchased multiple packs in the last top-up, we will recharge only one pack.
Top up this API key with more tokens
Depending on your location, you may be charged in USD, EUR, or other currencies. Taxes may apply.
Toy Experiment
1 Million
Tokens valid for:
Non-commercial use only (CC-BY-NC)
Free
Enjoy your new API key with free tokens, no credit card required.
Prototype Development
1 Billion
Tokens valid for:
Unrestricted commercial use
$20
0.020 / 1M tokens
Production Deployment
11 Billion
Tokens valid for:
Unrestricted commercial use
Much higher rate limit
Priority customer support
Free 1-hour consultation
$200
0.018 / 1M tokens
Please input the right API key to top up

On-premises deployment

Deploy Jina Reranker on AWS Sagemaker and Microsoft Azure and soon in Google Cloud Services, or contact our sales team to get customized Kubernetes deployments for your Virtual Private Cloud and on-premises servers.
AWS SageMaker
Embeddings
Reranker
Microsoft Azure
Embeddings
Reranker
Google Cloud
Coming soon
Show benchmark for v2 model (latest)

MKQA (Multilingual Knowledge Questions and Answers)
Recall 10 scores reported for different reranking models for MKQA dataset
BEIR (Heterogeneous Benchmark on Diverse IR Tasks)
NDCG 10 scores reported for different reranking models for Beir dataset
ToolBench. The benchmark collects over 16 thousand public APIs and corresponding synthetically-generated instructions for using them in single and multi-API settings.
Recall 3 scores reported for different reranking models for ToolBench dataset
NSText2SQL
Recall 3 scores reported for different reranking models for NSText2SQL dataset
CodeSearchNet. The benchmark is a combination of queries in docstring and natural language formats, with labelled code-segments relevant to the queries.
MRR 10 scores reported for different reranking models for CodeSearchNet dataset
Throughput of Jina Reranker v2 on RTX4090
Throughput (documents retrieved in 50ms) scores reported for different reranking models on an RTX 4090 GPU.

Comparison of Reranker, Vector Search, and BM25

The table below provides a comprehensive comparison of the Reranker, Vector/Embeddings Search, and BM25, highlighting their strengths and weaknesses across various categories.
RerankerVector SearchBM25
Best ForEnhanced search precision and relevanceInitial, rapid filteringGeneral text retrieval across wide-ranging queries
GranularityDetailed: Sub-document and query segmentBroad: Entire documentsIntermediate: Various text segments
Query Time ComplexityHighMediumLow
Indexing Time ComplexityNot requiredHighLow, utilizes pre-built index
Training Time ComplexityHighHighNot required
Search QualitySuperior for nuanced queriesBalanced between efficiency and accuracyConsistent and reliable for a broad set of queries
StrengthsHighly accurate with deep contextual understandingQuick and efficient, with moderate accuracyHighly scalable, with established efficacy
Try reranker API for freeTry embedding API for free

Learning about Reranker

What is a reranker? Why is vector search or cosine similarity not enough? Learn about rerankers from the ground up with our comprehensive guide.
Rate Limit
Rate limits are tracked in two ways: RPM (requests per minute) and TPM (tokens per minute). Limits are enforced per IP and can be reached based on whichever threshold—RPM or TPM—is hit first.
ProductAPI EndpointDescriptionw/o API Keyw/ API Keyw/ Premium API KeyAverage LatencyToken Usage CountingAllowed Request
Reranker APIhttps://api.jina.ai/v1/rerankTokenize and segment long text500 RPM & 1,000,000 TPM2,000 RPM & 5,000,000 TPM
depends on the input size
Count the number of tokens in the input request.POST
Embedding APIhttps://api.jina.ai/v1/embeddingsConvert text/images to fixed-length vectors500 RPM & 1,000,000 TPM2,000 RPM & 5,000,000 TPM
depends on the input size
Count the number of tokens in the input request.POST
Reader APIhttps://r.jina.aiConvert URL to LLM-friendly text20 RPM200 RPM1000 RPM4.6sCount the number of tokens in the output response.GET/POST
Reader APIhttps://s.jina.aiSearch the web and convert results to LLM-friendly text40 RPM100 RPM8.7sCount the number of tokens in the output response.GET/POST
Reader APIhttps://g.jina.aiGrounding a statement with web knowledge10 RPM30 RPM22.7sCount the total number of tokens in the whole process.GET/POST
Classifier API (Zero-shot)https://api.jina.ai/v1/classifyClassify inputs using zero-shot classification200 RPM & 500,000 TPM1,000 RPM & 3,000,000 TPM
depends on the input size
Tokens counted as: input_tokens + label_tokensPOST
Classifier API (Few-shot)https://api.jina.ai/v1/classifyClassify inputs using a trained few-shot classifier20 RPM & 200,000 TPM60 RPM & 1,000,000 TPM
depends on the input size
Tokens counted as: input_tokensPOST
Classifier APIhttps://api.jina.ai/v1/trainTrain a classifier using labeled examples20 RPM & 200,000 TPM60 RPM & 1,000,000 TPM
depends on the input size
Tokens counted as: input_tokens × num_itersPOST
Segmenter APIhttps://segment.jina.aiTokenize and segment long text20 RPM200 RPM1,000 RPM0.3sToken is not counted as usage.GET/POST
CC BY-NC License Self-Check

Reranker-related common questions
API-related common questions
Billing-related common questions