Welcome! This repository provides a collection of examples to help you build LLM-powered applications with the Cohere API. They contain step-by-step guides, with code examples and explanations, to help you understand and use the API effectively.
The examples are grouped into 3 categories:
- Getting started: A Cohere 101 guide. Build your first Cohere application – an onboarding assistant for new hires.
- LLM University: The code companion to the LLM University course containing a comprehensive list of modules.
- Cookbook: Deep dive into various techniques in the following topics: RAG, Agents, Search & embeddings, Summarization, and Others
Interested to contribute? Read the contributing guide.
This is a Cohere 101 guide. Build your first Cohere application: An onboarding assistant for new hires. Duration: ~15 mins.
Title | Colab |
---|---|
Part 1: Installation and setup | |
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 |
This section contains the code companion to the LLM University course containing a comprehensive list of modules.
This section provides a deep dive into various techniques in the following topics:
Title | Components | Colab |
---|---|---|
Basic RAG | Chat, Embed, Rerank | |
End-to-end RAG using Elasticsearch and Cohere | Chat, Embed, Rerank, Elasticsearch | |
Chunking Strategies | Chat, Embed, Rerank, LlamaIndex, LangChain | |
Migrating Monolithic Prompts to Command-R with RAG | Chat | |
RAG With Chat Embed and Rerank via Pinecone | Chat, Embed, Rerank, Pinecone | |
Creating a QA Bot From Technical Documentation | Chat, Embed, Rerank, LlamaIndex | |
Analysis of Form 10-K/10-Q Using Cohere and RAG | Cohere, Embed, Rerank, LlamaIndex, Langchain | |
Adaptive RAG | Chat, LangChain |
Title | Components | Colab |
---|---|---|
Basic Tool Use | Chat | |
Multi-Step Tool Use | Chat, Embed, LangChain | |
Calendar Agent with Native Multi Step Tool | Chat | |
A Data Analyst Agent Built with Cohere and Langchain | Chat, LangChain | |
Short-Term Memory Handling for Agents | Chat, LangChain | |
Agent API Calls | Chat, LangChain | |
Financial CSV Agent with Langchain | Chat, LangChain | |
Agentic RAG for PDFs with mixed data | Chat, Embed, Rerank, LangChain | |
SQL Agent | Chat, LangChain | |
Financial CSV Agent with Native Multi-Step Cohere API | Chat, LangChain | |
PDF Extractor with Native Multi Step Tool Use |
Chat, Unstructured | |
Agentic Multi-Stage RAG with Cohere Tools API | Chat, Embed | |
Agentic RAG with an Evaluator, Web Search, Human Input, and Python Tool | Chat, Embed, LangChain |
Title | Components | Colab |
---|---|---|
Basic Semantic Search | Embed | |
Basic Reranking | Rerank | |
Wikipedia Semantic Search with Cohere Embedding Archives | Embed | |
Semantic Search with Cohere Embed Jobs and Pinecone serverless Solution | Embed, Pinecone | |
Semantic Search with Cohere Embed Jobs | Embed, Rerank | |
Wikipedia Semantic Search with Cohere + Weaviate | Embed, Weaviate |
Title | Components | Colab |
---|---|---|
Long Form General Strategies | Chat, Embed, Rerank | |
Summarization Evals | Chat | |
Grounded Summarization Using Command R | Chat, Embed |
Title | Components | Colab |
---|---|---|
Advanced Document Parsing For Enterprises | Chat, Embed, Rerank | |
Analyzing Hacker News with Six Language Understanding Methods | Embed | |
Text Classification Using Embeddings | Embed | |
Article Recommender with Text Embedding Classification Extraction | Chat, Embed, Classify | |
Fueling Generative Content with Keyword Research | Chat, Embed | |
Topic Modeling AI Papers | Embed |
Thank you for your interest in contributing! We appreciate your input and encourage you to share your ideas and improvements. Here are some ways you can contribute:
-
New Examples and Guides: If you have an idea for a new example or guide, please share it with us! Create an issue to discuss your proposal, gather feedback, and get started. This ensures your contribution aligns with the project's scope and avoids duplication.
-
Improvements and Updates: You can contribute by enhancing existing examples and guides. This could involve adding more detailed explanations, code snippets, error handling, or exploring advanced usage. Your insights and expertise will make our examples more useful.
-
Feedback and Suggestions: Your feedback is invaluable. If you have suggestions for improving the structure, content, or overall user experience of this repository, please create an issue or contact us directly. We want to ensure this resource is as helpful as possible.
Please review existing issues and pull requests before starting your contribution to avoid duplication of efforts. We value your unique insights and contributions, and we want to ensure they are well-aligned with the project's goals.
Thank you for your contributions and for helping to make this repository a valuable resource for the developer community!