Skip to content

Commit

Permalink
Merge branch 'main' into safety-mode-off-main
Browse files Browse the repository at this point in the history
Signed-off-by: trentfowlercohere <[email protected]>
  • Loading branch information
trentfowlercohere authored Aug 30, 2024
2 parents 288b7e6 + ae5365d commit 2e0a30d
Show file tree
Hide file tree
Showing 64 changed files with 3,550 additions and 464 deletions.
1,057 changes: 944 additions & 113 deletions cohere-openapi.yaml

Large diffs are not rendered by default.

Binary file added fern/assets/images/rag-cohere-mongodb-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fern/assets/images/rag-cohere-mongodb-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fern/assets/images/rag-cohere-mongodb-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fern/assets/images/rag-cohere-mongodb-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fern/assets/images/rag-cohere-mongodb-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fern/assets/images/rag-cohere-mongodb-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 4 additions & 11 deletions fern/assets/input.css
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,14 @@ button[class^="Sidebar-link-buttonWrapper"] {

.orange-text {
color: #e69138 !important;
white-space : pre-wrap !important;
}
.dark-orange-text{
color: #b45f06 !important;
}
.dark-red-text {
color: #a20302 !important;
white-space : pre-wrap !important;
}
.red-text {
color: #cc0100 !important;
Expand Down Expand Up @@ -570,6 +572,7 @@ button[class^="Sidebar-link-buttonWrapper"] {
}
.green-text {
color: #6aa84f !important;
white-space : pre-wrap !important;
}
.grass-green-text {
color: #38761d !important;
Expand Down Expand Up @@ -619,16 +622,6 @@ button[class^="Sidebar-link-buttonWrapper"] {
width: 100px !important; /* Adjust the width as needed */
/*height: 20px !important;*/ /* Adjust the height as needed */
}
.code-block {
background-color: rgb(233 230 222) !important;
border-width: 1px !important;
border-style: solid !important;
border-color: rgb(228 222 210) !important;
display: block !important;
overflow: auto !important;
padding: 1em !important;
border-radius:3px !important;
}

.extra-yellow {
color: #a31515 !important;
Expand All @@ -637,4 +630,4 @@ button[class^="Sidebar-link-buttonWrapper"] {

.extra-green {
color: #38761d !important;
}
}
16 changes: 8 additions & 8 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ versions:

logo:
light: assets/logo.svg
# dark: assets/logo-dark.svg
dark: assets/logo-dark.svg
height: 16

favicon: assets/favicon.png
Expand Down Expand Up @@ -78,22 +78,22 @@ layout:
colors:
accent-primary:
light: "#39594d"
# dark: "#517B6A"
dark: "#517B6A"
background:
light: "#E8E6DE"
# dark: "#0F0F0F"
dark: "#0F0F0F"
sidebar-background:
light: "#FAFAFA"
# dark: "#1C1C1C"
dark: "#1C1C1C"
header-background:
light: "#FAFAFA"
# dark: "#1C1C1C"
dark: "#1C1C1C"
card-background:
light: "#E8E6DE"
# dark: "#1A1A1A"
dark: "#1A1A1A"
border:
light: "#E0E0E0"
# dark: "#292929"
dark: "#292929"

experimental:
mdx-components:
Expand Down Expand Up @@ -401,5 +401,5 @@ redirects:
destination: /docs/fine-tuning-with-the-cohere-dashboard

analytics:
segment:
segment:
write-key: ${SEGMENT_WRITE_KEY}
51 changes: 51 additions & 0 deletions fern/pages/changelog/2024-08-30-command-gets-refreshed.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: "Command models get an August refresh"
slug: "changelog/command-gets-refreshed"
createdAt: "Fri Aug 30 2024 05:30:00 (MST)"
hidden: false
---

Today we’re announcing updates to our flagship generative AI model series: Command R and Command R+. These models demonstrate improved performance on a variety of tasks.

The latest model versions are designated with timestamps, as follows:
- The updated Command R is `command-r-08-2024` on the API.
- The updated Command R+ is `command-r-plus-08-2024` on the API.

In the rest of these release notes, we’ll provide more details about technical enhancements, new features, and new pricing.

## Technical Details

`command-r-08-2024` shows improved performance for multilingual retrieval-augmented generation (RAG) and tool use. More broadly, `command-r-08-2024` is better at math, code and reasoning and is competitive with the previous version of the larger Command R+ model.

`command-r-08-2024` delivers around 50% higher throughput and 20% lower latencies as compared to the previous Command R version, while cutting the hardware footprint required to serve the model by half. Similarly, `command-r-plus-08-2024` delivers roughly 50% higher throughput and 25% lower latencies as compared to the previous Command R+ version, while keeping the hardware footprint the same.

Both models include the following feature improvements:
- For tool use, `command-r-08-2024` and `command-r-plus-08-2024` have demonstrated improved decision-making around which tool to use in which context, and whether or not to use a tool.
- Improved instruction following in the preamble.
- Improved multilingual RAG searches in the language of the user with improved responses.
- Better structured data analysis for structured data manipulation.
- Better structured data creation from unstructured natural language instructions.
- Improved robustness to non-semantic prompt changes like white space or new lines.
- The models will decline unanswerable questions.
- The models have improved citation quality and users can now turn off citations for RAG workflows.
- For `command-r-08-2024` there are meaningful improvements on length and formatting control.

## New Feature: Safety Modes

The primary new feature available in both `command-r-08-2024` and `command-r-plus-08-2024` is Safety Modes (in beta). For our enterprise customers building with our models, what is considered safe depends on their use case and the context the model is deployed in. To support diverse enterprise applications, we have developed safety modes, acknowledging that safety and appropriateness are context-dependent, and that predictability and control are critical in building confidence in Cohere models.

Safety guardrails have traditionally been reactive and binary, and we’ve observed that users often have difficulty defining what safe usage means to them for their use case. Safety Modes introduce a nuanced approach that is context sensitive.

(Note: Command R/R+ have built-in protections against core harms, such as content that endangers child safety. These types of harm are always blocked and cannot be adjusted.)

Safety modes are activated through a `safety_mode` parameter, which can (currently) be in one of two modes:
- `"STRICT"`: Encourages avoidance of all sensitive topics. Strict content guardrails provide an extra safe experience by prohibiting inappropriate responses or recommendations. Ideal for general and enterprise use.
- `"CONTEXTUAL"`: (enabled by default): For wide-ranging interactions with fewer constraints on output while maintaining core protections. The model responds as instructed while still rejecting harmful or illegal suggestions. Well-suited for entertainment, creative, educational use.

You can also opt out of the safety modes beta by setting `safety_mode="NONE"`. For more information, check out our dedicated guide to [Safety Modes](https://docs.cohere.com/docs/safety-modes).

## Pricing
Here’s a breakdown the pricing structure for the new models:

- For `command-r-plus-08-2024`, input tokens are priced at \$2.50/M and output tokens at \$10.00/M.
- For `command-r-08-2024`, input tokens are priced at \$0.15/M and output tokens at \$0.60/M.
8 changes: 8 additions & 0 deletions fern/pages/cookbooks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,14 @@ export const searchCards = [
tags: ["search"],
href: "/page/rerank-demo",
},
{
title: "RAG with MongoDB and Cohere",
description:
"Build a chatbot that provides actionable insights on technology company market reports.",
imageSrc: "https://fern-image-hosting.s3.amazonaws.com/cohere/bad278b-Community_Demo_2.png",
tags: ["search"],
href: "/page/rag-cohere-mongodb",
},
];

export const cloudCards = [
Expand Down
2 changes: 1 addition & 1 deletion fern/pages/cookbooks/basic-tool-use.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Basic Tool Use
slug: /page/basic-tool-use

description: "This page describes how to work with Cohere's basic retrieval-augmented generation functionality."
description: "This page describes how to work with Cohere's basic tool use functionality."
image: "../../assets/images/f1cc130-cohere_meta_image.jpg"
keywords: "Cohere, tool use, AI agents"
---
Expand Down
2 changes: 1 addition & 1 deletion fern/pages/cookbooks/calendar-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Calendar Agent with Native Multi Step Tool
slug: /page/calendar-agent

description: "This page describes how to work with Cohere's basic retrieval-augmented generation functionality."
description: "This page describes how to use cohere Chat API with list_calendar_events and create_calendar_event tools to book appointments."
image: "../../assets/images/f1cc130-cohere_meta_image.jpg"
keywords: "Cohere, AI agents"
---
Expand Down
Loading

0 comments on commit 2e0a30d

Please sign in to comment.