Skip to content

ritheesh-dev/AgentIQ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– AgenticIQ

An intelligent, agentic RAG (Retrieval-Augmented Generation) system that routes user queries between a local knowledge base and real-time web search β€” powered by LangGraph, Groq, and Streamlit.


πŸ“Œ Table of Contents


🧠 Overview

AgenticIQ is a full-stack agentic RAG pipeline that intelligently decides how to answer user questions. It uses a router node powered by an LLM to determine whether to retrieve documents from a local ChromaDB vector store or perform a live web search via Tavily β€” giving users the best of both worlds: deep domain knowledge and real-time information.


✨ Features

  • πŸ”€ Intelligent Routing β€” LLM-based router decides between vector store and web search
  • πŸ“š RAG Pipeline β€” Ingests and retrieves documents from ChromaDB
  • 🌐 Web Search β€” Real-time search using Tavily API
  • ⚑ Fast Inference β€” Powered by Groq's ultra-fast LLM API
  • πŸ–₯️ Streamlit UI β€” Clean, interactive frontend for querying the agent
  • πŸ”— LangGraph Orchestration β€” Robust agentic workflow using graph-based state management

πŸ› οΈ Tech Stack

Layer Technology
LLM Groq (LLaMA / Mixtral)
Orchestration LangGraph, LangChain
Vector Store ChromaDB
Embeddings HuggingFace
Web Search Tavily API
Frontend Streamlit
Language Python 3.12

πŸ“ Project Structure

AgenticIQ/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ RAG/
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ ingest.py        # PDF ingestion & vector store creation
β”‚   β”‚   └── retrieve.py      # Document retrieval from ChromaDB
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ config.py            # Centralized configuration & env variables
β”‚   β”œβ”€β”€ frontend.py          # Streamlit UI
β”‚   └── generation.py        # LangGraph agent nodes & routing logic
β”œβ”€β”€ knowledge-base/          # Source PDF documents (not tracked in git)
β”œβ”€β”€ chroma_db/               # Persistent vector store (not tracked in git)
β”œβ”€β”€ .env.example             # Environment variable template
β”œβ”€β”€ .gitignore
β”œβ”€β”€ requirements.txt
└── README.md

πŸš€ Getting Started

Prerequisites

1. Clone the repository

git clone https://github.com/your-username/agenticiq.git
cd agenticiq

2. Create and activate virtual environment

python -m venv venv

# Windows
venv\Scripts\activate

# macOS / Linux
source venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Set up environment variables

cp .env.example .env

Fill in your API keys in the .env file (see Environment Variables).

5. Ingest your documents

Add your PDF files to the knowledge-base/ folder, then run:

python -c "from src.RAG.ingest import ingest_pdfs_into_vectordb; ingest_pdfs_into_vectordb()"

6. Run the app

streamlit run src/frontend.py

πŸ” Environment Variables

Create a .env file in the root directory based on .env.example:

GROQ_API_KEY=your_groq_api_key
TAVILY_API_KEY=your_tavily_api_key
USER_AGENT=your_user_agent_string
HF_TOKEN=your_huggingface_token

⚠️ Never commit your .env file. It is already listed in .gitignore.


βš™οΈ How It Works

User Query
    β”‚
    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Router Node β”‚  ← LLM decides: vectorstore or web_search?
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚          β”‚
     β–Ό          β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   RAG   β”‚  β”‚ Web Search β”‚
β”‚Retrieve β”‚  β”‚  (Tavily)  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚          β”‚
     β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
          β–Ό
   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
   β”‚  Generation β”‚  ← LLM generates final answer
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚
          β–Ό
      Response
  1. Ingest β€” PDFs are chunked, embedded, and stored in ChromaDB
  2. Route β€” The router LLM analyzes the query and picks the best source
  3. Retrieve β€” Documents are fetched from ChromaDB or Tavily web search
  4. Generate β€” The LLM generates a final, grounded response
  5. Display β€” Answer is shown in the Streamlit UI

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m "feat: add your feature")
  4. Push to the branch (git push origin feature/your-feature)
  5. Open a Pull Request
Built with ❀️ using LangChain, LangGraph, Groq & Streamlit | AgenticIQ

Releases

No releases published

Packages

 
 
 

Contributors

Languages