Skip to main content

Playground Overview

What is the Playground?#

The Cohere Playground is a visual interface for users to test Cohere's large language models without writing a single line of code. To familiarize yourself with our endpoints, we recommend clicking the Generate or Calculate button on each endpoint page and observing the outputs. Use the Playground to test your use cases and when you're ready to start building, simply click Export Code to add Cohere's functionality to your application.

Using the Playground#

Generate#

Generate produces natural language text in response to an input prompt. As seen in the screenshot below, we supplied the model with a prompt, "Given a product and keywords, this program will generate exciting product descriptions. Here are some examples:" and gave two examples of a product and keywords. The bolded text was generated by the model.

This is a screenshot of Cohere's Playground testing the Generate endpoint.
  • To write inputs that produce the best results for your use case, read our Prompt Engineering guide.
  • Try tinkering with different temperature and token-picking settings to alter the model's output behaviour.
  • To further improve your generations or to get the model to focus on generating text about a specific topic, try uploading a sample text to finetune the model. If you're interested in finetuning a model, please submit a Full Access request from your Cohere Dashboard.

Try asking the model to do any of the following:

  • Summarize a paragraph of text
  • Generate SEO tags for a blog post
  • Produce some questions for your next trivia night
  • Provide ideas of what to do in your city this weekend

In each case, give the model a few examples your desired output.

Additionally, note the Calculate Likelihood button on the bottom right-hand corner. This feature outputs the likelihood that each token would be generated by the model in the given sequence, as well as the average log-likelihood of each token in the input. Token likelihoods can be retrieved from our Generate endpoint.

This is a screenshot testing Generate endpoint with Likelihoods.

The log-likelihood is useful for evaluating model performance, especially when testing user-finetuned models. If you're interested in finetuning a model, please submit a Full Access request from your Cohere Dashboard.

Embed#

Using Embed in the Playground enables users to assign numerical representations to strings and visualize comparative meaning on a 2-dimensional plane. Phrases similar in meaning should ideally be closer together on this visualization. Add a couple of your own phrases and see if the Playground visualization feels accurate to you.

This is a screenshot of Cohere's Playground testing the Embed endpoint.

Cohere’s embeddings can be used to train a semantic classifier out of the box, saving users countless hours gathering data to train a model themselves.

Classify#

Cohere’s Classify endpoint enables users to create a classifier from a few labeled examples.

This is a screenshot of Cohere's Playground testing the Classify endpoint.

Selecting the Right Model Size#

Larger models are more capable of complex tasks but smaller models have faster response times and are less expensive. Here is a rough guideline for which model size to use for various tasks:

Large is the most capable model and can perform any task the other models can, with improved results. This model is well suited for challenging tasks including abstract reasoning, summarization, and complex classification. As such, we recommend Large for use case that include content moderation or semantic search.

Medium provides a great tradeoff between power and speed at an affordable price. Use it to power tasks including data extraction and copy generation for chatbots or marketing content.

Small is our fastest model and can be used for straightforward tasks including sentiment analysis, content rephrasing, and simple classification.

The models are listed above from largest to smallest. Larger models can perform all tasks accomplished by smaller models.