For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DASHBOARDPLAYGROUNDDOCSCOMMUNITYLOG IN
Guides and conceptsAPI ReferenceRelease NotesLLMUCookbooks
Guides and conceptsAPI ReferenceRelease NotesLLMUCookbooks
  • Get Started
    • Introduction
    • Installation
    • Creating a client
    • Playground
    • FAQs
  • Models
    • An Overview of Cohere's Models
    • Aya
    • Embed
    • Rerank
  • Text Generation
    • Introduction to Text Generation at Cohere
    • Using the Chat API
    • Reasoning
    • Image Inputs
    • Streaming Responses
    • Predictable Outputs
    • Advanced Generation Parameters
    • Tool Use
    • Tokens and Tokenizers
    • Summarizing Text
    • Safety Modes
  • Embeddings (Vectors, Search, Retrieval)
    • Introduction to Embeddings at Cohere
    • Semantic Search with Embeddings
    • Multimodal Embeddings
    • Batch Embedding Jobs
  • Going to Production
    • API Keys and Rate Limits
    • Going Live
    • Deprecations
    • How Does Cohere's Pricing Work?
  • Integrations
    • Integrating Embedding Models with Other Tools
    • Cohere and LangChain
    • LlamaIndex and Cohere
  • Deployment Options
    • Overview
    • SDK Compatibility
  • Tutorials
    • Cookbooks
    • LLM University
    • Build Things with Cohere!
      • Cohere Text Generation Tutorial
      • Building a Chatbot with Cohere
      • Semantic Search with Cohere
      • Reranking with Cohere
      • RAG with Cohere
      • Building an Agent with Cohere
    • Agentic RAG
    • Cohere on Azure
  • Responsible Use
    • Security
    • Usage Policy
    • Command A Technical Report
    • Command R and Command R+ Model Card
  • Cohere Labs
    • Cohere Labs Acceptable Use Policy
  • More Resources
    • Cohere Toolkit
    • Datasets
    • Improve Cohere Docs
LogoLogodocs
DASHBOARDPLAYGROUNDDOCSCOMMUNITYLOG IN
On this page
  • Installation and Setup
Tutorials

Build an Onboarding Assistant with Cohere!

Was this page helpful?
Edit this page
Previous

Cohere Text Generation Tutorial

Next
Built with

Welcome to our hands-on introduction to Cohere! This section is split over seven different tutorials, each focusing on one use case leveraging our Chat, Embed, and Rerank endpoints:

  • Part 1: Installation and Setup (the document you’re reading now)
  • Part 2: Text Generation
  • Part 3: Chatbots
  • Part 4: Semantic Search
  • Part 5: Reranking
  • Part 6: Retrieval-Augmented Generation (RAG)
  • Part 7: Agents with Tool Use

Your learning is structured around building an onboarding assistant that helps new hires at Co1t, a fictitious company. The assistant can help write introductions, answer user questions about the company, search for information from e-mails, and create meeting appointments.

We recommend that you follow the parts sequentially. However, feel free to skip to specific parts if you want (apart from Part 1, which is a pre-requisite) because each part also works as a standalone tutorial.

Installation and Setup

The Cohere platform lets developers access large language model (LLM) capabilities with a few lines of code. These LLMs can solve a broad spectrum of natural language use cases, including classification, semantic search, paraphrasing, summarization, and content generation.

Cohere’s models can be accessed through the playground and SDK. We support SDKs in four different languages: Python, Typescript, Java, and Go. For these tutorials, we’ll use the Python SDK and access the models through the Cohere platform with an API key.

To get started, first install the Cohere Python SDK.

PYTHON
1! pip install -U cohere

Next, we’ll import the cohere library and create a client to be used throughout the examples. We create a client by passing the Cohere API key as an argument. To get an API key, sign up with Cohere and get the API key from the dashboard.

PYTHON
1import cohere
2
3# Get your API key here: https://dashboard.cohere.com/api-keys
4
5co = cohere.ClientV2(api_key="YOUR_COHERE_API_KEY")

In Part 2, we’ll get started with the first use case - text generation.