From 7c05b6dbd30d05dfe5c98ed95b36ff006a93442b Mon Sep 17 00:00:00 2001 From: mahjongmen Date: Wed, 27 Nov 2024 21:42:58 -0500 Subject: [PATCH 01/10] added deprecation policy to docs site --- .../pages/going-to-production/deprecation.mdx | 44 +++++++++++++++++++ fern/v1.yml | 2 + fern/v2.yml | 2 + 3 files changed, 48 insertions(+) create mode 100644 fern/pages/going-to-production/deprecation.mdx diff --git a/fern/pages/going-to-production/deprecation.mdx b/fern/pages/going-to-production/deprecation.mdx new file mode 100644 index 000000000..c2c47127e --- /dev/null +++ b/fern/pages/going-to-production/deprecation.mdx @@ -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)' +--- +## Deprecations +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 for new customers but continue to be available for existing users until retirement (i.e. an existing user is anyone who has used the model or endpoint within 90 days of the deprecation announcement. We will assign a shut-down date at this point. +-*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 support@cohere.ai. + +## 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. + +| 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 support@cohere.ai if you need any assistance with migration or have any questions. \ No newline at end of file diff --git a/fern/v1.yml b/fern/v1.yml index e87e4d288..121b9976c 100644 --- a/fern/v1.yml +++ b/fern/v1.yml @@ -202,6 +202,8 @@ navigation: path: pages/going-to-production/rate-limits.mdx - page: Going Live path: pages/going-to-production/going-live.mdx + - page: Deprecations + path: pages/going-to-production/deprecation.mdx - page: How Does Cohere Pricing Work? path: pages/going-to-production/how-does-cohere-pricing-work.mdx - section: Integrations diff --git a/fern/v2.yml b/fern/v2.yml index 95bf54f0c..727f66997 100644 --- a/fern/v2.yml +++ b/fern/v2.yml @@ -183,6 +183,8 @@ navigation: path: pages/going-to-production/rate-limits.mdx - page: Going Live path: pages/going-to-production/going-live.mdx + - page: Deprecations + path: pages/going-to-production/deprecation.mdx - page: How Does Cohere Pricing Work? path: pages/going-to-production/how-does-cohere-pricing-work.mdx - section: Integrations From cebb7100b79cdc41ba22add9a68ac3366bd87954 Mon Sep 17 00:00:00 2001 From: mahjongmen Date: Wed, 27 Nov 2024 21:49:11 -0500 Subject: [PATCH 02/10] fixed some formatting on bullets --- fern/pages/going-to-production/deprecation.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fern/pages/going-to-production/deprecation.mdx b/fern/pages/going-to-production/deprecation.mdx index c2c47127e..ad8787ce0 100644 --- a/fern/pages/going-to-production/deprecation.mdx +++ b/fern/pages/going-to-production/deprecation.mdx @@ -17,10 +17,10 @@ As Cohere launches safer and more capable models, we will regularly retire old m 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 for new customers but continue to be available for existing users until retirement (i.e. an existing user is anyone who has used the model or endpoint within 90 days of the deprecation announcement. We will assign a shut-down date at this point. --*Shutdown:*The model and endpoint are no longer available for users. Requests to shutdown models and endpoints will fail. +- *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 for new customers but continue to be available for existing users until retirement (i.e. an existing user is anyone who has used the model or endpoint within 90 days of the deprecation announcement. We will assign a shut-down date at this point. +- *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. From e661e020bf87cccf4e29649a111adacbcb1e0a1c Mon Sep 17 00:00:00 2001 From: mahjongmen Date: Wed, 27 Nov 2024 22:13:05 -0500 Subject: [PATCH 03/10] added rerank-v3.5 to models, took out mentions of rerank-v2.0 --- fern/pages/going-to-production/deprecation.mdx | 9 ++++----- fern/pages/models/models.mdx | 16 +++++++--------- fern/pages/models/rerank-2.mdx | 12 ++++++------ 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/fern/pages/going-to-production/deprecation.mdx b/fern/pages/going-to-production/deprecation.mdx index ad8787ce0..ef069ad34 100644 --- a/fern/pages/going-to-production/deprecation.mdx +++ b/fern/pages/going-to-production/deprecation.mdx @@ -9,7 +9,6 @@ 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)' --- -## Deprecations Find information around deprecated endpoints and models with their recommended replacements. ## Overview @@ -17,10 +16,10 @@ As Cohere launches safer and more capable models, we will regularly retire old m 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 for new customers but continue to be available for existing users until retirement (i.e. an existing user is anyone who has used the model or endpoint within 90 days of the deprecation announcement. We will assign a shut-down date at this point. -- *Shutdown:* The model and endpoint are no longer available for users. Requests to shutdown models and endpoints will fail. +- **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. diff --git a/fern/pages/models/models.mdx b/fern/pages/models/models.mdx index 6407c467d..d98a65b82 100644 --- a/fern/pages/models/models.mdx +++ b/fern/pages/models/models.mdx @@ -104,13 +104,12 @@ 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 @@ -118,10 +117,9 @@ In this table, we provide some important context for using Cohere Rerank models | 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 |
diff --git a/fern/pages/models/rerank-2.mdx b/fern/pages/models/rerank-2.mdx index 069869dc0..c624fb909 100644 --- a/fern/pages/models/rerank-2.mdx +++ b/fern/pages/models/rerank-2.mdx @@ -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) | + 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. From cb0611027862f768e9970c5485872a6430e56f4e Mon Sep 17 00:00:00 2001 From: mahjongmen Date: Wed, 27 Nov 2024 22:40:06 -0500 Subject: [PATCH 04/10] cleaned the reranking best practices doc --- .../reranking/reranking-best-practices.mdx | 27 ++++--------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/fern/pages/text-embeddings/reranking/reranking-best-practices.mdx b/fern/pages/text-embeddings/reranking/reranking-best-practices.mdx index 1ba0bb922..a4235be58 100644 --- a/fern/pages/text-embeddings/reranking/reranking-best-practices.mdx +++ b/fern/pages/text-embeddings/reranking/reranking-best-practices.mdx @@ -17,23 +17,14 @@ In the following two tables, you'll find recommendations for getting the best Re | Constraint | Minimum | Maximum | Default Value | | ----------------------------- | ------- | ------------------------------------------------------------------------------------------------------- | :------------ | -| Number of Documents | 1 | 1000 | N/A | +| Number of Documents | 1 | 10,000 | N/A | | Max Number of Chunks | 1 | N/A | 1 | -| Number of Tokens per Document | 1 | N/A (see [below ](/docs/reranking-best-practices#document-chunking)for more info) | N/A | +| Number of Tokens per Document | 1 | N/A (see [below ](/docs/reranking-best-practices#document-chunking)for more info) | N/A | | Number of Tokens per Query | 1 | 2048 | N/A | -### Rerank-v2.0 - -| Constraint | Minimum | Maximum | Default Value | -| ----------------------------- | ------- | ------------------------------------------------------------------------------------------------------- | :------------ | -| Number of Documents | 1 | 10,000 | N/A | -| Max Number of Chunks | 1 | N/A | 10 | -| Number of Tokens per Document | 1 | N/A (see [below ](/docs/reranking-best-practices#document-chunking)for more info) | N/A | -| Number of Tokens per Query | 1 | 256 | N/A | - ## Document Chunking -For `rerank-v3.0`, the model breaks documents into 4094 token chunks. For example, if your query is 100 tokens and your document is 10,000 tokens, your document will be broken into the following chunks: +For `rerank-v3.0` and `rerank-v3.5`, the model breaks documents into 4093 token chunks. For example, if your query is 100 tokens and your document is 10,000 tokens, your document will be broken into the following chunks: 1. `relevance_score_1 = ` 2. `relevance_score_2 = ` @@ -46,19 +37,11 @@ If you would like more control over how chunking is done, we recommend that you ### Rerank-v3.0 Models -When using `rerank-v3.0` models, the endpoint will throw an error if the user tries to pass more than 1000 documents at a time. The maximum number of documents that can be passed to the endpoint is calculated with the following inequality: `Number of documents * max_chunks_per_doc >1000`. - -If `Number of documents * max_chunks_per_doc` exceeds `1000`, the endpoint will return an error. By default, the `max_chunks_per_doc` is set to `1` for `rerank-v3.0` models; given that the model has a context length of 4096, the maximum number of tokens for each call would be 4,096,000. - -### Rerank-v2.0 Models - -When using `rerank-v2.0`, the endpoint will throw an error if the user tries to pass more than 10,000 documents at a time. The maximum number of documents that can be passed to the endpoint is calculated with the following inequality: `Number of documents * max_chunks_per_doc >10,000`. - -If `Number of documents * max_chunks_per_doc` exceeds `10,000`, the endpoint will return an error. By default, the `max_chunks_per_doc` is set to `10` for `rerank-v2.0` models; given that the model has a context length of 512, the maximum number of tokens for each call would be 5,120,000. +When using `rerank-v3.5` and `rerank-v3.0` models, the endpoint will throw an error if the user tries to pass more than 10,000 documents at a time. The maximum number of documents that can be passed to the endpoint is calculated as the length of the documents list sent in. ## Queries -Our `rerank-v3.0` models are trained with a context length of 4096 tokens. The model takes into account both the input from the query and document. If your query is larger than 2048 tokens, it will be truncated to the first 2048 tokens. For v2.0 models, if your query is larger than 256 tokens, it will be truncated to the first 256 tokens. +Our `rerank-v3.5` and `rerank-v3.0` models are trained with a context length of 4096 tokens. The model takes into account both the input from the query and document. If your query is larger than 2048 tokens, it will be truncated to the first 2048 tokens. ## Semi-Structured Data Support From 7e80af0df89f7471028b2f616d2090d2c854f9ed Mon Sep 17 00:00:00 2001 From: mahjongmen Date: Wed, 27 Nov 2024 23:09:20 -0500 Subject: [PATCH 05/10] made some changes to reranking best practices for change in api and also removed mentions of rerank-v2.0 --- .../text-embeddings/reranking/overview.mdx | 6 +++--- .../reranking/reranking-best-practices.mdx | 20 +++++++++---------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/fern/pages/text-embeddings/reranking/overview.mdx b/fern/pages/text-embeddings/reranking/overview.mdx index 89523f60c..abe147f90 100644 --- a/fern/pages/text-embeddings/reranking/overview.mdx +++ b/fern/pages/text-embeddings/reranking/overview.mdx @@ -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** @@ -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) ``` @@ -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 | | -------- | -------------- | diff --git a/fern/pages/text-embeddings/reranking/reranking-best-practices.mdx b/fern/pages/text-embeddings/reranking/reranking-best-practices.mdx index a4235be58..c44021917 100644 --- a/fern/pages/text-embeddings/reranking/reranking-best-practices.mdx +++ b/fern/pages/text-embeddings/reranking/reranking-best-practices.mdx @@ -11,32 +11,30 @@ updatedAt: 'Thu May 30 2024 15:16:00 GMT+0000 (Coordinated Universal Time)' --- ## Optimizing Performance -In the following two tables, you'll find recommendations for getting the best Rerank performance, organized by model family. +In the following tables, you'll find recommendations for getting the best Rerank performance, organized by model family. -### Rerank-v3.0 +### Rerank-v3.0 and Rerank-v3.5 | Constraint | Minimum | Maximum | Default Value | | ----------------------------- | ------- | ------------------------------------------------------------------------------------------------------- | :------------ | -| Number of Documents | 1 | 10,000 | N/A | -| Max Number of Chunks | 1 | N/A | 1 | -| Number of Tokens per Document | 1 | N/A (see [below ](/docs/reranking-best-practices#document-chunking)for more info) | N/A | +| Number of Documents | 1 | 1000 | N/A | +| Max Tokens per Document | 1 | 32,000 | 1 | +| Number of Tokens per Document | 1 | N/A | N/A | | Number of Tokens per Query | 1 | 2048 | N/A | ## Document Chunking -For `rerank-v3.0` and `rerank-v3.5`, the model breaks documents into 4093 token chunks. For example, if your query is 100 tokens and your document is 10,000 tokens, your document will be broken into the following chunks: +For `rerank-v3.0` and `rerank-v3.5`, the model breaks documents into 4093 token chunks. For example, if your query is 100 tokens and your document is 10,000 tokens and you set , your document will be broken into the following chunks: -1. `relevance_score_1 = ` -2. `relevance_score_2 = ` -3. `relevance_score_3 = ` +1. `relevance_score_1 = ` +2. `relevance_score_2 = ` +3. `relevance_score_3 = ` 4. `relevance_score = max(relevance_score_1, relevance_score_2, relevance_score_3)` If you would like more control over how chunking is done, we recommend that you chunk your documents yourself. ## Max Number of Documents -### Rerank-v3.0 Models - When using `rerank-v3.5` and `rerank-v3.0` models, the endpoint will throw an error if the user tries to pass more than 10,000 documents at a time. The maximum number of documents that can be passed to the endpoint is calculated as the length of the documents list sent in. ## Queries From edc5b3aa6aa820810430062d2890a763861d5757 Mon Sep 17 00:00:00 2001 From: mahjongmen Date: Wed, 27 Nov 2024 23:17:55 -0500 Subject: [PATCH 06/10] formatting --- fern/pages/going-to-production/deprecation.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fern/pages/going-to-production/deprecation.mdx b/fern/pages/going-to-production/deprecation.mdx index ef069ad34..51356751b 100644 --- a/fern/pages/going-to-production/deprecation.mdx +++ b/fern/pages/going-to-production/deprecation.mdx @@ -29,7 +29,7 @@ To ensure a smooth transition, we recommend thorough testing of your application 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. +On December 2nd, 2024, we announced the release of Rerank-v3.5 along with the deprecation of the Rerank-v2.0 model family. | Shutdown Date| Deprecated Model| Deprecated Model Price| Recommended Replacement| |--------------|-----------------|-----------------------|------------------------| @@ -37,7 +37,7 @@ On December 2nd, 2024, we announced the release of Rerank-v3.5 along with the de | 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 support@cohere.ai if you need any assistance with migration or have any questions. \ No newline at end of file +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 support@cohere.ai if you need any assistance with migration or have any questions. \ No newline at end of file From 3a99ea46e11791534d44a6ad0e3b9b8cc9bdde74 Mon Sep 17 00:00:00 2001 From: mahjongmen Date: Wed, 27 Nov 2024 23:29:33 -0500 Subject: [PATCH 07/10] added a bit on finetune --- fern/pages/going-to-production/deprecation.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/fern/pages/going-to-production/deprecation.mdx b/fern/pages/going-to-production/deprecation.mdx index 51356751b..c3583486d 100644 --- a/fern/pages/going-to-production/deprecation.mdx +++ b/fern/pages/going-to-production/deprecation.mdx @@ -30,6 +30,7 @@ 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| |--------------|-----------------|-----------------------|------------------------| From e6c3bcf56c4db43e28cd67bde00a8608d26e4cf7 Mon Sep 17 00:00:00 2001 From: mahjongmen Date: Sat, 30 Nov 2024 21:35:29 -0500 Subject: [PATCH 08/10] added the release notes --- .../2024-12-02-Rerank-v3.5-is-released.mdx | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx diff --git a/fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx b/fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx new file mode 100644 index 000000000..2ea92a3cb --- /dev/null +++ b/fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx @@ -0,0 +1,32 @@ +--- +title: "Announcing Rerank-v3.5" +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. + +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 process + +```Text cURL +POST https://api.cohere.ai/v2/rerank +{ + "model": "rerank-v3.5", + "input_type": "image", + "embedding_types": ["float"], + "images": [enc_img] +} +``` \ No newline at end of file From c272537fe422b0c948f9c05c362cff603d796519 Mon Sep 17 00:00:00 2001 From: mahjongmen Date: Sat, 30 Nov 2024 21:49:04 -0500 Subject: [PATCH 09/10] added curl call for releas enotes --- .../2024-12-02-Rerank-v3.5-is-released.mdx | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx b/fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx index 2ea92a3cb..c3ed44db7 100644 --- a/fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx +++ b/fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx @@ -1,5 +1,5 @@ --- -title: "Announcing Rerank-v3.5" +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 @@ -9,6 +9,7 @@ description: >- --- 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. @@ -22,11 +23,19 @@ The Rerank v2 API has the following major changes: Example request on how to process ```Text cURL -POST https://api.cohere.ai/v2/rerank -{ +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", - "input_type": "image", - "embedding_types": ["float"], - "images": [enc_img] -} + "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."] + }' ``` \ No newline at end of file From e867970733b463cde7b34a4181c057931700f615 Mon Sep 17 00:00:00 2001 From: mahjongmen Date: Sat, 30 Nov 2024 21:57:07 -0500 Subject: [PATCH 10/10] added curl call for releas enotes --- fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx b/fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx index c3ed44db7..192a3479f 100644 --- a/fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx +++ b/fern/pages/changelog/2024-12-02-Rerank-v3.5-is-released.mdx @@ -20,7 +20,7 @@ The Rerank v2 API has the following major changes: - `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 process +Example request on how to use Rerank-v3.5 ```Text cURL curl --request POST \