Cohere-rerank-v3-multilingual
Cohere-rerank-v3-multilingual
Version: 1
CohereLast updated July 2024
Cohere Rerank Multilingual is the market’s leading reranking model used for semantic search and retrieval-augmented generation (RAG). Rerank Multilingual supports 100+ languages and can be used to search within a language (e.g., search with a French query on French documents) and across languages (e.g., search with an English query on Chinese documents). Rerank enables you to significantly improve search quality by augmenting traditional key-word based search systems with a semantic-based reranking system which can contextualize the meaning of a user's query beyond keyword relevance. Cohere's Rerank delivers much higher quality results than just embedding-based search, lexical search and even hybrid search, and it requires only adding a single line of code into your application. Rerank should be used as a ranker after initial retrieval (i.e. an initial search system finds the top-100 most relevant documents for a larger corpus of documents). Rerank supports JSON objects as documents where users can specify at query time the fields (keys) that semantic search should be applied over.
  • Context window of the model is 4096 tokens
  • The max query length is 2048 tokens
Rerank multilingual has SOTA performance on multilingual benchmarks such as Miracl. We evaluated Rerank multilingual on various configurations with BM25 (lexical search) as the initial retrieval step as well as Embeddings as the initial retrieval step Rerank v3.0 Miracl Evaluation Results . For full details of this model, release blog post

How to use the model

Follow this article to deploy Cohere model with pay-as-you-go. Learn more about the Cohere model's request schema here .

Inference samples

Sample TypeSample Notebook
CLI using CURL and Python web requestscohere-rerank.ipynb
LangChainlangchain.ipynb
Cohere SDKcohere-sdk.ipynb

Sample input

 {
  "query": "What is the capital of the United States?",
  "return_documents": true,
  "rank_fields":["Title", "Content"],
  "documents": [
  {"Title":"Facts about Carson City","Content":"Carson City is the capital city of the American state of Nevada. "},
  {"Title":"उत्तरी मारियाना द्वीप समूह के राष्ट्रमंडल का इतिहास","Content" : "उत्तरी मारियाना द्वीप समूह का राष्ट्रमंडल प्रशांत महासागर में द्वीपों का एक समूह है।"},
  {"Title":"Los Estados Unidos","Content" : "Washington, DC es la capital de los Estados Unidos."}
  ],
  "top_n": 3
 }

Sample output

 {
  "id": "e9f5ee96-7993-4800-a6cf-d4d2cc993e03",
  "results": [
   {
    "document": {
     "Title": "Los Estados Unidos",
     "Content": "Washington, DC es la capital de los Estados Unidos."
    },
    "index": 2,
    "relevance_score": 0.99999756
   },
   {
    "document": {
     "Title": "Facts about Carson City",
     "Content": "Carson City is the capital city of the American state of Nevada. "
    },
    "index": 0,
    "relevance_score": 0.98457545
   },
   {
    "document": {
     "Title": "उत्तरी मारियाना द्वीप समूह के राष्ट्रमंडल का इतिहास",
     "Content": "उत्तरी मारियाना द्वीप समूह का राष्ट्रमंडल प्रशांत महासागर में द्वीपों का एक समूह है।"
    },
    "index": 1,
    "relevance_score": 0.10951516
   }
  ]
 }
Model Specifications
Context Length4096
LicenseCustom
Last UpdatedJuly 2024
Input TypeText
Output TypeText
PublisherCohere
Languages1 Language