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!
    • Agentic RAG
      • Routing Queries to Data Sources
      • Generating Parallel Queries
      • Performing Tasks Sequentially
      • Generating Multi-Faceted Queries
      • Querying Structured Data (Tables)
      • Querying Structured Data (SQL)
    • 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
Tutorials

Building Agentic RAG with Cohere

Was this page helpful?
Edit this page
Previous

Routing Queries to Data Sources

Next
Built with
agentic rag

Welcome to the tutorial on Agentic RAG with Cohere!

Retrieval Augmented Generation (RAG) is a technique that gives LLMs the capability to ground their responses in external text data, making the response more accurate and less prone to hallucinations.

However, a standard RAG implementation struggles on more complex type of tasks, such as:

  • When it has to search over diverse set of sources
  • When the question requires sequential reasoning
  • When the question has multiple parts
  • When it requires comparing multiple documents
  • When it requires analyzing structured data

In an enterprise setting where data sources are diverse with non-homogeneous formats this approach becomes even more important. For example, the data sources could be a mix of structured, semi-structured and unstructured data.

This is where agentic RAG comes into play, and in this tutorial, we’ll see how agentic RAG can solve these type of tasks.

Concretely, this is achieved using the tool use approach. Tool use allows for greater flexibility in accessing and utilizing data sources, thus unlocking new use cases not possible with a standard RAG approach.

This tutorial is split into six parts, with each part focusing on one use case:

  • Part 1: Routing queries to data sources
    • Getting started with agentic RAG
    • Setting up the tools
    • Running an agentic RAG workflow
    • Routing queries to tools
  • Part 2: Generating parallel queries
    • Query expansion
    • Query expansion over multiple data sources
    • Query expansion in multi-turn conversations
  • Part 3: Performing tasks sequentially
    • Multi-step tool calling
    • Multi-step, parallel tool calling
    • Self-correction
  • Part 4: Generating multi-faceted queries
    • Multi-faceted data querying
    • Setting up the tool to generate multi-faceted queries
    • Performing multi-faceted queries
  • Part 5: Querying structured data (tables)
    • Python tool for querying tabular data
    • Setting up the tool to generate pandas queries
    • Performing queries over structured data (table)
  • Part 6: Querying structured data (databases)
    • Setting up a database
    • Setting up the tool to generate SQL queries
    • Performing queries over structured data (SQL)