Cookies

With your permission, we use Google Analytics cookies to measure visits and improve the site. Necessary cookies are always on. You can change your choice or withdraw consent anytime in the footer, under Cookie settings. Cookie Policy

Skip to content

RAG and Knowledge ·Intermediate

RAG Agent with Cohere ⌘R

About this app

A RAG Agentic system built with Cohere's new model Command-r7b-12-2024, Qdrant for vector storage, Langchain for RAG and LangGraph for orchestration. This application allows users to upload documents, ask questions about them, and get AI-powered responses with fallback to web search when needed.

  • Complete open-source code
  • Step-by-step tutorial

Technical sheet

Category
RAG and Knowledge
Difficulty
Intermediate
Models
-
Frameworks
LangChain
Runs locally?
Needs cloud APIs
Required keys
None

License Apache-2.0 · content curated and maintained by Doutor AI.

Full tutorial

A RAG Agentic system built with Cohere's new model Command-r7b-12-2024, Qdrant for vector storage, Langchain for RAG and LangGraph for orchestration. This application allows users to upload documents, ask questions about them, and get AI-powered responses with fallback to web search when needed.

Features

  • Document Processing
  • PDF document upload and processing
  • Automatic text chunking and embedding
  • Vector storage in Qdrant cloud
  • Intelligent Querying
  • RAG-based document retrieval
  • Similarity search with threshold filtering
  • Automatic fallback to web search when no relevant documents found
  • Source attribution for answers
  • Advanced Capabilities
  • DuckDuckGo web search integration
  • LangGraph agent for web research
  • Context-aware response generation
  • Long answer summarization
  • Model Specific Features
  • Command-r7b-12-2024 model for Chat and RAG
  • cohere embed-english-v3.0 model for embeddings
  • create_react_agent function from langgraph
  • DuckDuckGoSearchRun tool for web search

Prerequisites

1. Cohere API Key

  1. Go to Cohere Platform
  2. Sign up or log in to your account
  3. Navigate to API Keys section
  4. Create a new API key

2. Qdrant Cloud Setup

  1. Visit Qdrant Cloud
  2. Create an account or sign in
  3. Create a new cluster
  4. Get your credentials:
  • Qdrant API Key: Found in API Keys section
  • Qdrant URL: Your cluster URL (format: https://xxx-xxx.aws.cloud.qdrant.io)

How to Run

  1. Clone the repository:
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
cd rag_tutorials/rag_agent_cohere
  1. Install dependencies:
pip install -r requirements.txt
streamlit run rag_agent_cohere.py

From the same category

RAG and KnowledgeIntermediate

Agentic RAG Embedding Gemma

This Streamlit app demonstrates an agentic Retrieval-Augmented Generation (RAG) Agent using Google's EmbeddingGemma for embeddings and Llama 3.2 as th…

  • Llama
  • local
RAG and KnowledgeIntermediate

Agentic RAG with GPT-5

An agentic RAG application built with the Agno framework, featuring GPT-5 and LanceDB for efficient knowledge retrieval and question answering.

  • OpenAI

Need a tailor-made solution?

Not sure where to start with AI in your business? Get a free assessment and a tailored plan - no commitment.

Save hours every week with AI, no hassle

Doutor AI gives you 1,859 ready-to-copy AI prompts, by industry and in plain English - plus a complete technical library for those who want to go further.

See plans