Notebooks
C
Cohere
Tutorial Pt1 V2

Tutorial Pt1 V2

guidesv2notebookscohere-developer-experiencegetting-started

Cohere Tutorial

Build your first Cohere application: An onboarding assistant for new hires

Welcome to the Cohere tutorial – a hands-on introduction to Cohere!

In this tutorial, you will learn how to use the Cohere API, specifically three endpoints: Chat, Embed, and Rerank.

This tutorial is split over seven parts, with each part focusing on one use case, as follows:

  • Part 1: Installation and Setup (Pre-requisite)
  • 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

You'll learn about these use cases by building an onboarding assistant that helps new hires onboard to a fictitious company called Co1t. 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.

Total Duration: ~15 minutes

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.

This tutorial uses the Python SDK and accesses the models through the Cohere platform.

To get started, first install the Cohere Python SDK.

[ ]

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.

[ ]

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