Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added deprecation policy to docs site #271

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
41 changes: 41 additions & 0 deletions fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: "Announcing Rerank-v3.5 - SOTA Retrieval by Cohere"
slug: "changelog/rerank-v3.5"
createdAt: "Mon Dec 2 2024 00:00:00 (MST)"
hidden: false
description: >-
Launch of Rerank 3.5 offers improved performance for long and short
documents with a context length of 4096. Rerank 3.5 is SOTA in both English and multilingual retrieval tasks
---

We're pleased to announce the release of [Rerank 3.5](/docs/rerank-2) our newest and most performant foundational model for ranking. Rerank 3.5 has a context length of 4096, SOTA performance on Multilingual Retrieval tasks and Reasoning Capabilities. In addition, Rerank 3.5 has SOTA performance on BEIR and domains such as Finance, E-commerce, Hospitality, Project Management, and Email/Messaging Retrieval tasks.
Cohere has opted to release a singular model instead of a `multilingual` and `english` version of Rerank-v3.5. Our single model is SOTA in both English and Multilingual ranking tasks.

In the rest of these release notes, we’ll provide more details about changes in the api.

## Technical Details
### API Changes:
The Rerank v2 API has the following major changes:
- `model` is now a required parameter
- `max_chunks_per_doc` has been replaced by `max_tokens_per_doc`; `max_tokens_per_doc` will determine the maximum amount of tokens a document can have before truncation. The default value for `max_tokens_per_doc` is 4096.
- support for passing a list of objects for the `documents` parameter has been removed - if your documents contain structured data, for best performance we recommend formatting them as [YAML strings](/docs/rerank-overview#example-with-structured-data).

Example request on how to use Rerank-v3.5

```Text cURL
curl --request POST \
--url https://api.cohere.com/v2/rerank \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header "Authorization: bearer $CO_API_KEY" \
--data '{
"model": "rerank-v3.5",
"query": "What is the capital of the United States?",
"top_n": 3,
"documents": ["Carson City is the capital city of the American state of Nevada.",
"The Commonwealth of the Northern Mariana Islands is a group of islands in the Pacific Ocean. Its capital is Saipan.",
"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district.",
"Capitalization or capitalisation in English grammar is the use of a capital letter at the start of a word. English usage varies from capitalization in other languages.",
"Capital punishment has existed in the United States since beforethe United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states."]
}'
```
44 changes: 44 additions & 0 deletions fern/pages/going-to-production/deprecation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Deprecations
slug: docs/deprecations
hidden: false
description: >-
Learn about Cohere's deprecation policies and recommended replacements
image: ../../assets/images/4f186df-cohere_docs_preview_image_1200x630_copy.jpg
keywords: 'Cohere API, large language models, generative AI'
createdAt: 'Wed Nov 27 2024 00:00:00 GMT+0000 (Coordinated Universal Time)'
updatedAt: 'Wed Nov 27 2024 00:00:00 GMT+0000 (Coordinated Universal Time)'
---
Find information around deprecated endpoints and models with their recommended replacements.

## Overview
As Cohere launches safer and more capable models, we will regularly retire old models. Applications relying on Cohere's models may need occasional updates to keep working. Impacted customers will always be notified via email and in our documentation along with blog posts.
This page lists all API deprecations, along with recommended replacements.

Cohere uses the following terms to describe the lifecycle of our models:
- **Active:** The model and endpoint are fully supported and recommended for use.
- **Legacy:** The model and endpoints will no longer receive updates and may be deprecated in the future.
- **Deprecated:** The model and endpoints are no longer available to new customers but remain available to existing users until retirement. (An existing user is defined as anyone who has used the model or endpoint within 90 days of the deprecation announcement.) A shutdown date will be assigned at that time.
- **Shutdown:** The model and endpoint are no longer available for users. Requests to shutdown models and endpoints will fail.

## Migrating to replacements
Once a model is deprecated, it is imperative to migrate all usage to a suitable replacement before the shutdown date. Requests to models and endpoints past the shutdown date will fail.
To ensure a smooth transition, we recommend thorough testing of your applications with the new models well before the shutdown date. If your team requires assistance, do not hesitate to reach out to [email protected].

## Deprecation History
All deprecations are listed below with the most recent announcements at the top.

### 2024-12-02: Rerank v2.0
On December 2nd, 2024, we announced the release of Rerank-v3.5 along with the deprecation of the Rerank-v2.0 model family.
Fine-tuned models created from these base models are not affected by this deprecation.

| Shutdown Date| Deprecated Model| Deprecated Model Price| Recommended Replacement|
|--------------|-----------------|-----------------------|------------------------|
| 2025-03-31 | `rerank-english-v2.0` | $1.00 / 1K searches | `rerank-v3.5`|
| 2025-03-31 | `rerank-multilingual-v2.0` | $1.00 / 1K searches | `rerank-v3.5`|

# Best Practices:
1. Regularly check our documentation for updates on announcements regarding the status of models.
2. Test applications with newer models well before the shutdown date of your current model.
3. Update any production code to use an active model as soon as possible.
4. Contact [email protected] if you need any assistance with migration or have any questions.
16 changes: 7 additions & 9 deletions fern/pages/models/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,22 @@ In this table, we provide some important context for using Cohere Embed models o

The Rerank model can improve created models by re-organizing their results based on certain parameters. This can be used to improve search algorithms.

| Model Name | Description | Modalities | Context Length | Endpoints |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ---------------|---------------------------- |
| `rerank-english-v3.0` | A model that allows for re-ranking English Language documents and semi-structured data (JSON). This model has a context length of 4096 tokens. | Text | 4k | [Rerank](/reference/rerank) |
| `rerank-multilingual-v3.0` | A model for documents and semi-structure data (JSON) that are not in English. Supports the same languages as embed-multilingual-v3.0. This model has a context length of 4096 tokens. | Text | 4k | [Rerank](/reference/rerank) |
| | | | | |
| `rerank-english-v2.0` | A model that allows for re-ranking English language documents. | Text | 512 | [Rerank](/reference/rerank) |
| `rerank-multilingual-v2.0` | A model for documents that are not in English. Supports the same languages as `embed-multilingual-v3.0`. | Text | 512 | [Rerank](/reference/rerank) |
| Model Name | Description | Modalities | Context Length | Endpoints |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | ---------------|---------------------------- |
| `rerank-v3.5` | A model that allows for re-ranking in English and multilingual documents and semi-structured data (JSON). Supports the same languages as embed-multilingual-v3.0. This model has a context length of 4096 tokens. | Text | 4k | [Rerank](/reference/rerank) |
| `rerank-english-v3.0` | A model that allows for re-ranking English Language documents and semi-structured data (JSON). This model has a context length of 4096 tokens. | Text | 4k | [Rerank](/reference/rerank) |
| `rerank-multilingual-v3.0` | A model for documents and semi-structure data (JSON) that are not in English. Supports the same languages as embed-multilingual-v3.0. This model has a context length of 4096 tokens. | Text | 4k | [Rerank](/reference/rerank) |
| | | | | | | Text | 512 | [Rerank](/reference/rerank) |

### Using Rerank Models on Different Platforms

In this table, we provide some important context for using Cohere Rerank models on Amazon Bedrock, SageMaker, and more.

| Model Name | Amazon Bedrock Model ID | Amazon SageMaker | Azure AI Studio Model ID | Oracle OCI Generative AI Service |
| :------------------------- | :---------------------- | :-------------------- | :----------------------- | :------------------------------- |
| `rerank-v3.5` | `cohere.rerank-v3.5` | Unique per deployment | Unique per deployment | N/A |
| `rerank-english-v3.0` | Not yet available | Unique per deployment | Not yet available | N/A |
| `rerank-multilingual-v3.0` | Not yet available | Unique per deployment | Not yet available | N/A |
| `rerank-english-v2.0` | N/A | N/A | N/A | N/A |
| `rerank-multilingual-v2.0` | N/A | N/A | N/A | N/A |

<br />

Expand Down
12 changes: 6 additions & 6 deletions fern/pages/models/rerank-2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ updatedAt: "Mon Apr 08 2024 17:42:11 GMT+0000 (Coordinated Universal Time)"
---
Rerank models sort text inputs by semantic relevance to a specified query. They are often used to sort search results returned from an existing search solution. Learn more about using Rerank in the [best practices guide](/docs/reranking-best-practices).

| Latest Model | Description | Modality | Max Tokens | Endpoints |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ---------|------------|-------------------|
| `rerank-english-v3.0` | A model that allows for re-ranking English Language documents and semi-structured data (JSON). This model has a context length of 4096 tokens. | Text | N/A | [Rerank](/reference/rerank) |
| `rerank-multilingual-v3.0` | A model for documents and semi-structure data (JSON) that are not in English. Supports the same languages as `embed-multilingual-v3.0`. This model has a context length of 4096 tokens.| Text | N/A | [Rerank](/reference/rerank) |
| `rerank-english-v2.0` | A model that allows for re-ranking English language documents. This model has a context length of 512 tokens. | Text | N/A | [Rerank](/reference/rerank) |
| `rerank-multilingual-v2.0` | A model for documents that are not in English. Supports the same languages as `embed-multilingual-v3.0`. This model has a context length of 512 tokens. | Text | N/A | [Rerank](/reference/rerank) |
| Latest Model | Description | Modality | Max Tokens | Endpoints |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |----------- |---------------------------- |
| `rerank-english-v3.5` | A model for documents and semi-structured data (JSON). State-of-the-art performance in English and non-English languages; supports the same languages as embed-multilingual-v3.0. This model has a context length of 4096 tokens | Text | N/A | [Rerank](/reference/rerank) |
| `rerank-english-v3.0` | A model that allows for re-ranking English Language documents and semi-structured data (JSON). This model has a context length of 4096 tokens. | Text | N/A | [Rerank](/reference/rerank) |
| `rerank-multilingual-v3.0` | A model for documents and semi-structure data (JSON) that are not in English. Supports the same languages as `embed-multilingual-v3.0`. This model has a context length of 4096 tokens. | Text | N/A | [Rerank](/reference/rerank) |


<Note>
For each document included in a request, Rerank combines the tokens from the query with the tokens from the document and the combined total counts toward the context limit for a single document. If the combined number of tokens from the query and a given document exceeds the model’s context length for a single document, the document will automatically get chunked and processed in multiple inferences. See our [best practice guide](/docs/reranking-best-practices) for more info about formatting documents for the Rerank endpoint.
Expand Down
6 changes: 3 additions & 3 deletions fern/pages/text-embeddings/reranking/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ docs = [
"Charlotte Amalie is the capital and largest city of the United States Virgin Islands. It has about 20,000 people. The city is on the island of Saint Thomas.",
"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district. The President of the USA and many major national government offices are in the territory. This makes it the political center of the United States of America.",
"Capital punishment (the death penalty) has existed in the United States since before the United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states. The federal government (including the United States military) also uses capital punishment."]
results = co.rerank(model="rerank-english-v3.0", query=query, documents=docs, top_n=5, return_documents=True)
results = co.rerank(model="rerank-v3.5", query=query, documents=docs, top_n=5, return_documents=True)
```

**Response**
Expand Down Expand Up @@ -107,7 +107,7 @@ docs = [
{"Title":"The Capital of United States Virgin Islands","Content":"Charlotte Amalie is the capital and largest city of the United States Virgin Islands. It has about 20,000 people. The city is on the island of Saint Thomas."},
{"Title":"Washington D.C.","Content":"Washington, D.C. (also known as simply Washington or D.C., and officially as the District of Columbia) is the capital of the United States. It is a federal district. The President of the USA and many major national government offices are in the territory. This makes it the political center of the United States of America."},
{"Title":"Capital Punishment in the US","Content":"Capital punishment (the death penalty) has existed in the United States since before the United States was a country. As of 2017, capital punishment is legal in 30 of the 50 states. The federal government (including the United States military) also uses capital punishment."}]
results = co.rerank(model="rerank-english-v3.0", query=query, documents=docs, rank_fields=['Title','Content'],top_n=5, return_documents=True)
results = co.rerank(model="rerank-v3.5", query=query, documents=docs, rank_fields=['Title','Content'],top_n=5, return_documents=True)

```

Expand Down Expand Up @@ -172,7 +172,7 @@ In the `docs` parameter, we are passing in a list of objects which have the key

## Multilingual Reranking

Cohere offers a multilingual model, `rerank-multilingual-v3.0`. Please note that performance may vary across languages. The model is trained on the following languages:
Cohere's `rerank-v3.5` and `rerank-multilingual-v3.0` has been trained for performance across a variety of languages. Please note that performance may vary across languages. The model is trained on the following languages:

| ISO Code | Language Name |
| -------- | -------------- |
Expand Down
Loading
Loading