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

content update #19

Merged
merged 17 commits into from
Aug 11, 2024
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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/3b75f4e-image.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/837d25c-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions fern/assets/input.css
Original file line number Diff line number Diff line change
Expand Up @@ -453,3 +453,9 @@ button[class^="Sidebar-link-buttonWrapper"] {
padding: 9px 0 32px 0;
}
}

.side {
width: 40% !important;
float: right !important;
margin-left: .75rem !important;
}
2 changes: 1 addition & 1 deletion fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ navbar-links:
url: https://coral.cohere.com/
- type: secondary
text: DASHBOARD
url: https://os.cohere.ai/
url: https://dashboard.cohere.com/
- type: secondary
text: PLAYGROUND
url: https://dashboard.cohere.com/playground/generate
Expand Down
2 changes: 1 addition & 1 deletion fern/fern.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"organization": "cohere",
"version": "0.37.15"
"version": "0.37.16"
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Here are the steps you'll need to get set up in advance of running Cohere models

## Embeddings

You can use this code to invoke Cohere's embed model on Amazon Bedrock:
You can use this code to invoke Cohere's Embed English v3 model (`cohere.embed-english-v3`) or Embed Multilingual v3 model (`cohere.embed-multilingual-v3`) on Amazon Bedrock:

```python PYTHON
import cohere
Expand Down Expand Up @@ -70,7 +70,7 @@ print(result)

## Text Generation

You can use this code to invoke Cohere's Command models on Amazon Bedrock:
You can use this code to invoke either Command R (`cohere.command-r-v1:0`), Command R+ (`cohere.command-r-plus-v1:0`), Command (`cohere.command-text-v14`), or Command light (`cohere.command-light-text-v14`) on Amazon Bedrock:

```python PYTHON
import cohere
Expand Down
66 changes: 64 additions & 2 deletions fern/pages/deployment-options/cohere-on-microsoft-azure.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ In an effort to make our language-model capabilities more widely available, we'v

In this article, you learn how to use [Azure AI Studio](https://ai.azure.com/) to deploy both the Cohere Command models and the Cohere Embed models on Microsoft's Azure cloud computing platform.

The following four models are available through Azure AI Studio with pay-as-you-go, token-based billing:
The following six models are available through Azure AI Studio with pay-as-you-go, token-based billing:

- Command R
- Command R+
- Embed v3 - English
- Embed v3 - Multilingual
- Cohere Rerank V3 (English)
- Cohere Rerank V3 (multilingual)

## Prerequisites

Expand All @@ -30,10 +32,11 @@ Whether you're using Command or Embed, the initial set up is the same. You'll ne
- An [Azure AI project](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/create-projects) in Azure AI Studio.
- Azure role-based access controls (Azure RBAC) are used to grant access to operations in Azure AI Studio. To perform the required steps, your user account must be assigned the Azure AI Developer role on the resource group. For more information on permissions, see [Role-based access control in Azure AI Studio](https://learn.microsoft.com/en-us/azure/ai-studio/concepts/rbac-ai-studio).

For Command- or Embed-based workflows, you'll also need to create a deployment and consume the model. Here are links for more information:
For workflows based around Command, Embed, or Rerank, you'll also need to create a deployment and consume the model. Here are links for more information:

- **Command:** [create a Command deployment](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-command#create-a-new-deployment) and then [consume the Command model](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-command#create-a-new-deployment).
- **Embed:** [create an Embed deployment](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-embed#create-a-new-deployment) and [consume the Embed model](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-embed#consume-the-cohere-embed-models-as-a-service).
- **Rerank**: [create a Rerank deployment](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-rerank) and [consume the Rerank model](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-rerank#consume-the-cohere-rerank-models-as-a-service).

## Text Generation

Expand Down Expand Up @@ -133,6 +136,65 @@ except urllib.error.HTTPError as error:
print(error.read().decode("utf8", "ignore"))
```

## ReRank

We currently exposes the `v1/rerank` endpoint for inference with both Rerank 3 - English and Rerank 3 - Multilingual. For more information on using the APIs, see the [reference](https://learn.microsoft.com/en-us/azure/ai-studio/how-to/deploy-models-cohere-rerank#rerank-api-reference-for-cohere-rerank-models-deployed-as-a-service) section.

```python PYTHON
import cohere

co = cohere.Client(
base_url="https://<endpoint>.<region>.inference.ai.azure.com/v1",
api_key="<key>"
)

documents = [
{
"Title": "Incorrect Password",
"Content": "Hello, I have been trying to access my account for the past hour and it keeps saying my password is incorrect. Can you please help me?",
},
{
"Title": "Confirmation Email Missed",
"Content": "Hi, I recently purchased a product from your website but I never received a confirmation email. Can you please look into this for me?",
},
{
"Title": "Questions about Return Policy",
"Content": "Hello, I have a question about the return policy for this product. I purchased it a few weeks ago and it is defective.",
},
{
"Title": "Customer Support is Busy",
"Content": "Good morning, I have been trying to reach your customer support team for the past week but I keep getting a busy signal. Can you please help me?",
},
{
"Title": "Received Wrong Item",
"Content": "Hi, I have a question about my recent order. I received the wrong item and I need to return it.",
},
{
"Title": "Customer Service is Unavailable",
"Content": "Hello, I have been trying to reach your customer support team for the past hour but I keep getting a busy signal. Can you please help me?",
},
{
"Title": "Return Policy for Defective Product",
"Content": "Hi, I have a question about the return policy for this product. I purchased it a few weeks ago and it is defective.",
},
{
"Title": "Wrong Item Received",
"Content": "Good morning, I have a question about my recent order. I received the wrong item and I need to return it.",
},
{
"Title": "Return Defective Product",
"Content": "Hello, I have a question about the return policy for this product. I purchased it a few weeks ago and it is defective.",
},
]

response = co.rerank(
documents=documents,
query="What emails have been about returning items?",
rank_fields=["Title", "Content"],
top_n=5,
)
```

## A Note on SDKs

You should be aware that it's possible to use the cohere SDK client to consume Azure AI deployments. Here are example notes for [Command](https://github.com/Azure/azureml-examples/blob/main/sdk/python/foundation-models/cohere/cohere-cmdR.ipynb) and [Embed](https://github.com/Azure/azureml-examples/blob/main/sdk/python/foundation-models/cohere/cohere-embed.ipynb).
Expand Down
35 changes: 15 additions & 20 deletions fern/pages/get-started/the-cohere-platform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,74 +9,69 @@ keywords: "natural language processing, generative AI, fine-tuning models"
createdAt: "Thu Oct 13 2022 21:30:34 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Mon Jun 24 2024 09:16:55 GMT+0000 (Coordinated Universal Time)"
---
Cohere allows developers and enterprises to build LLM-powered applications. We do that by creating world-class models, and the supporting platform to deploy them securely and privately.
Cohere allows developers and enterprises to build LLM-powered applications. We do that by creating world-class models, along with the supporting platform required to deploy them securely and privately.

## Cohere Large Language Models (LLMs).

The Command family of models includes [Command](https://cohere.com/models/command), [Command R](/docs/command-r), and [Command R+](/docs/command-r-plus). Together, they are the text-generation LLMs powering conversational agents, summarization, copywriting, and similar use cases. They work through the [Chat](/reference/chat) endpoint, which can be used with or without [retrieval augmented generation](/docs/retrieval-augmented-generation-rag) (RAG).
The Command family of models includes [Command](https://cohere.com/models/command), [Command R](/docs/command-r), and [Command R+](/docs/command-r-plus). Together, they are the text-generation LLMs powering conversational agents, summarization, copywriting, and similar use cases. They work through the [Chat](/reference/chat) endpoint, which can be used with or without [retrieval augmented generation](/docs/retrieval-augmented-generation-rag) RAG.

[Rerank](https://txt.cohere.com/rerank/) is the fastest way to inject the intelligence of a language model into an existing search system. It can be accessed via the [Rerank](/reference/rerank-1) endpoint.

[Embed](https://cohere.com/models/embed) improves the accuracy of search, classification, clustering, and RAG results. It also powers the [Embed](/reference/embed) and [Classify](/reference/classify) endpoints.

<img src='../../assets/images/b483350-Visual_1.png' />

<img src="../../assets/images//b483350-Visual_1.png" />

[Click here](/docs/foundation-models) to learn more about Cohere foundation models.

## These LLMs Make it Easy to Build Conversational Agents (and Other LLM-powered Apps)

Try [Coral](http://coral.cohere.com) to see what an LLM-powered conversational agent can look like. It is able to converse, summarize text, and write emails and articles.
Try [the Chat UI](https://coral.cohere.com) to see what an LLM-powered conversational agent can look like. It is able to converse, summarize text, and write emails and articles.

<img src='../../assets/images/ff41a67-Visual_2.png' />
<img src="../../assets/images//ebb82f9-Screenshot_2024-07-10_at_9.27.11_AM.png" />

Our goal, however, is to enable you to build your own LLM-powered applications. The [Chat endpoint](/docs/chat-api), for example, can be used to build a conversational agent powered by the Command family of models.

Our goal, however, is to enable you to build your own LLM-powered applications. The [Chat endpoint](/docs/cochat-beta), for example, can be used to build a conversational agent powered by the Command family of models.

<img src='../../assets/images/f4a351b-Visual_3.png' />

<img src="../../assets/images//f4a351b-Visual_3.png" alt="A diagram of a conversational agent." />

### Retrieval-Augmented Generation (RAG)

“Grounding” refers to the practice of allowing an LLM to access external data sources – like the internet or a company’s internal technical documentation – which leads to better, more factual generations.

Coral is being used with grounding enabled in the screenshot below, and you can see how accurate and information-dense its reply is.

<img src='../../assets/images/8971b33-Visual_4.png' />
Chat is being used with grounding enabled in the screenshot below, and you can see how accurate and information-dense its reply is.

<img src="../../assets/images//04315e6-Screenshot_2024-07-10_at_9.29.25_AM.png" />

What’s more, Coral’s advanced RAG capabilities allow you to see what underlying query the model generates when completing its tasks, and its output includes [citations](/docs/documents-and-citations) pointing you to where it found the information it uses. Both the query and the citations can be leveraged alongside the Cohere Embed and Rerank models to build a remarkably powerful RAG system, such as the one found in [this guide](https://txt.cohere.com/rag-chatbot/).

<img src='../../assets/images/545e35e-Visual_5.png' />
What’s more, advanced RAG capabilities allow you to see what underlying query the model generates when completing its tasks, and its output includes [citations](/docs/documents-and-citations) pointing you to where it found the information it uses. Both the query and the citations can be leveraged alongside the Cohere Embed and Rerank models to build a remarkably powerful RAG system, such as the one found in [this guide](https://cohere.com/llmu/rag-chatbot).

<img src="../../assets/images//545e35e-Visual_5.png" />

[Click here](/docs/serving-platform) to learn more about the Cohere serving platform.

### Use Language Models to Build Better Search and RAG Systems

Embeddings enable you to search based on what a phrase _means_ rather than simply what keywords it _contains_, leading to search systems that incorporate context and user intent better than anything that has come before.

<img src='../../assets/images/04fe094-Visual_6.png' />

<img src="../../assets/images//04fe094-Visual_6.png" alt="How a query returns results." />

Learn more about semantic search [here](/docs/intro-semantic-search).

## Create Fine-Tuned Models with Ease

To [create a fine-tuned model](/docs/fine-tuning), simply upload a dataset and hold on while we train a custom model and then deploy it for you. Fine-tuning can be done with [generative models](/docs/generate-fine-tuning), [multi-label classification models](/docs/classify-fine-tuning), [rerank models](/docs/rerank-fine-tuning), and [chat models](/docs/chat-fine-tuning).

<img src='../../assets/images/980660f-Visual_7.png' />

<img src="../../assets/images//980660f-Visual_7.png" alt="A diagram of fine-tuning." />

## Where you can access Cohere Models

Depending on your privacy/security requirements there are a number of ways to access Cohere:

- [Cohere API](/reference/about): this is the easiest option, simply grab an API key from [the dashboard](https://dashboard.cohere.com/) and start using the models hosted by Cohere.
- Cloud AI platforms: this option offers a balance of ease-of-use and security. you can access Cohere on various cloud AI platforms such as [Oracle's GenAI Service](https://www.oracle.com/uk/artificial-intelligence/generative-ai/large-language-models/), AWS' [Bedrock](https://aws.amazon.com/bedrock/cohere-command-embed/) and [Sagemaker](https://aws.amazon.com/blogs/machine-learning/cohere-brings-language-ai-to-amazon-sagemaker/) platforms, [Google Cloud](https://console.cloud.google.com/marketplace/product/cohere-id-public/cohere-public?ref=txt.cohere.com), and [Azure's AML service](https://txt.cohere.com/coheres-enterprise-ai-models-coming-soon-to-microsoft-azure-ai-as-a-managed-service/).
- Cloud AI platforms: this option offers a balance of ease-of-use and security. you can access Cohere on various cloud AI platforms such as [Oracle's GenAI Service](https://www.oracle.com/uk/artificial-intelligence/generative-ai/large-language-models/), AWS' [Bedrock](https://aws.amazon.com/bedrock/cohere-command-embed/) and [Sagemaker](https://aws.amazon.com/blogs/machine-learning/cohere-brings-language-ai-to-amazon-sagemaker/) platforms, [Google Cloud](https://console.cloud.google.com/marketplace/product/cohere-id-public/cohere-public?ref=txt.cohere.com), and [Azure's AML service](https://txt.cohere.com/coheres-enterprise-ai-models-coming-soon-to-microsoft-azure-ai-as-a-managed-service/).
- Private cloud deploy deployments: Cohere's models can be deployed privately in most virtual private cloud (VPC) environments, offering enhanced security and highest degree of customization. Please [contact sales](emailto:[email protected]) for information.

<img src='../../assets/images/2ce36b1-Visual_8.png' />
<img src="../../assets/images//2ce36b1-Visual_8.png" alt="The major cloud providers." />


### On-Premise and Air Gapped Solutions
Expand Down
5 changes: 4 additions & 1 deletion fern/pages/llm-university/llmu-2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ title: "Welcome to LLM University!"
slug: "docs/llmu-2"
description: "LLM University (LLMU) offers in-depth, practical NLP and LLM training. Ideal for all skill levels. Learn, build, and deploy Language AI with Cohere."
image: "../../assets/images/1cc9fac-Cohere_LLM_University.png"
no-image-zoom: true
createdAt: "Wed Apr 26 2023 16:41:18 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Wed Apr 24 2024 03:04:28 GMT+0000 (Coordinated Universal Time)"
---

![](../../assets/images/60c937f-small-LLMUni_Docs_Banner.png)
<a target="_blank" href="https://cohere.com/llmu?_gl=1*1ofvam2*_gcl_au*MTQ4NTk2Mzc4Mi4xNzE5OTMzNjE3*_ga*NDY1MzI1MTIxLjE3MTk5MzM2MTc.*_ga_CRGS116RZS*MTcyMzQwMDg1OC4zMi4xLjE3MjM0MDA5MDUuMTMuMC4w">
<img src="../../assets/images/60c937f-small-LLMUni_Docs_Banner.png" />
</a>

#### Welcome to LLM University by Cohere!

Expand Down
6 changes: 3 additions & 3 deletions fern/pages/responsible-use/responsible-use.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ keywords: "AI safety, AI risk, responsible AI"
createdAt: "Thu Sep 01 2022 19:22:12 GMT+0000 (Coordinated Universal Time)"
updatedAt: "Fri Mar 15 2024 04:47:51 GMT+0000 (Coordinated Universal Time)"
---
The Responsible Use documentation aims to guide developers in using language models constructively and ethically. Toward this end, we've published [guidelines](/usage-guidelines) for using our API safely, as well as our processes around [harm prevention](/harm-prevention). We provide model cards to communicate the strengths and weaknesses of our models and to encourage responsible use (motivated by [Mitchell, 2019](https://arxiv.org/pdf/1810.03993.pdf)). We also provide a [data statement](/data-statement) describing our pre-training datasets (motivated by [Bender and Friedman, 2018](https://www.aclweb.org/anthology/Q18-1041/)).
The Responsible Use documentation aims to guide developers in using language models constructively and ethically. Toward this end, we've published [guidelines](/docs/usage-guidelines) for using our API safely, as well as our processes around [harm prevention](#harm-prevention). We provide model cards to communicate the strengths and weaknesses of our models and to encourage responsible use (motivated by [Mitchell, 2019](https://arxiv.org/pdf/1810.03993.pdf)). We also provide a [data statement](/data-statement) describing our pre-training datasets (motivated by [Bender and Friedman, 2018](https://www.aclweb.org/anthology/Q18-1041/)).

**Model Cards:**

- [Generation](generation-card)
- [Representation](representation-card)
- [Generation](/docs/generation-benchmarks)
- [Representation](/docs/representation-benchmarks)

If you have feedback or questions, please feel free to [let us know](mailto:[email protected]) — we are here to help.

Expand Down
Loading
Loading