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

Deepseek Local RAG Reasoning Agent

About this app

A powerful reasoning agent that combines local Deepseek models with RAG capabilities. Built using Deepseek (via Ollama), Snowflake for embeddings, Qdrant for vector storage, and Agno for agent orchestration, this application offers both simple local chat and advanced RAG-enhanced interactions with comprehensive document processing and web search capabilities.

  • Complete open-source code
  • Step-by-step tutorial
  • Runs on your computer

Technical sheet

Category
RAG and Knowledge
Difficulty
Intermediate
Models
Llama, DeepSeek
Frameworks
Agno, LangChain, Ollama (local)
Runs locally?
Yes (Ollama)
Required keys
None

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

Full tutorial

🎓 FREE Step-by-Step Tutorial

👉 Click here to follow our complete step-by-step tutorial and learn how to build this from scratch with detailed code walkthroughs, explanations, and best practices.

A powerful reasoning agent that combines local Deepseek models with RAG capabilities. Built using Deepseek (via Ollama), Snowflake for embeddings, Qdrant for vector storage, and Agno for agent orchestration, this application offers both simple local chat and advanced RAG-enhanced interactions with comprehensive document processing and web search capabilities.

Features

  • Dual Operation Modes
  • Local Chat Mode: Direct interaction with Deepseek locally
  • RAG Mode: Enhanced reasoning with document context and web search integration - llama3.2
  • Document Processing (RAG Mode)
  • PDF document upload and processing
  • Web page content extraction
  • Automatic text chunking and embedding
  • Vector storage in Qdrant cloud
  • Intelligent Querying (RAG Mode)
  • RAG-based document retrieval
  • Similarity search with threshold filtering
  • Automatic fallback to web search
  • Source attribution for answers
  • Advanced Capabilities
  • Exa AI web search integration
  • Custom domain filtering for web search
  • Context-aware response generation
  • Chat history management
  • Thinking process visualization
  • Model Specific Features
  • Flexible model selection:
  • Deepseek r1 1.5b (lighter, suitable for most laptops)
  • Deepseek r1 7b (more capable, requires better hardware)
  • Snowflake Arctic Embedding model (SOTA) for vector embeddings
  • Agno Agent framework for orchestration
  • Streamlit-based interactive interface

Prerequisites

1. Ollama Setup

  1. Install Ollama
  2. Pull the Deepseek r1 model(s):
# For the lighter model
ollama pull deepseek-r1:1.5b

# For the more capable model (if your hardware supports it)
ollama pull deepseek-r1:7b

ollama pull snowflake-arctic-embed
ollama pull llama3.2

2. Qdrant Cloud Setup (for RAG Mode)

  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.cloud.qdrant.io)

3. Exa AI API Key (Optional)

  1. Visit Exa AI
  2. Sign up for an account
  3. Generate an API key for web search capabilities

How to Run

  1. Clone the repository:
git clone https://github.com/Shubhamsaboo/awesome-llm-apps.git
cd rag_tutorials/deepseek_local_rag_agent
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
streamlit run deepseek_rag_agent.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