Skip to content

OneManCrew/from-rag-to-agentic-rag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

From RAG to Agentic RAG: Building Multi-Agent Search Systems

Code examples from the blog post: From RAG to Agentic RAG: Building Multi-Agent Search Systems

📁 Files

File Description
classic_rag.py Classic RAG pipeline: embed → retrieve → generate with ChromaDB
agentic_rag.py Agentic RAG: AI agent with a semantic search tool that decides when/what to search
multi_agent_search.py Multi-Agent Search System: Main Agent + Search Agent with SQL, semantic, and web tools

📦 Installation

# Clone the repository
git clone https://github.com/OneManCrew/from-rag-to-agentic-rag.git
cd from-rag-to-agentic-rag

# Create virtual environment
python -m venv venv
source venv/bin/activate  # Linux/macOS
# venv\Scripts\activate   # Windows

# Install dependencies
pip install -r requirements.txt

⚙️ Configuration

Set your OpenAI API key:

export OPENAI_API_KEY="sk-your-key-here"

🚀 Usage

1. Classic RAG

python classic_rag.py

Demonstrates the basic embed-retrieve-generate pipeline with ChromaDB.

2. Agentic RAG

python agentic_rag.py

An AI agent with a semantic search tool that can reformulate queries and search multiple times.

3. Multi-Agent Search System

python multi_agent_search.py

A Main Agent delegates to a Search Agent equipped with:

  • Semantic search — vector database for document retrieval
  • SQL search — structured database queries (products, customers, orders)
  • Web search — internet search for current information

🏗️ Architecture

User → Main Agent → find_information() → Search Agent
                                            ├── semantic_search() → ChromaDB
                                            ├── sql_search() → SQLite
                                            └── web_search() → Web API

📝 Blog Post

Read the full article with explanations and architecture diagrams: From RAG to Agentic RAG: Building Multi-Agent Search Systems

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages