IntelliDocs AI
README.md
# IntelliDocs AI โ Enterprise RAG + MCP Assistant
<div align="center">
[](https://www.python.org/downloads/)
[](https://fastapi.tiangolo.com/)
[](https://github.com/rupali-chauksey/intellidocs-ai-enterprise-rag-mcp)
**One assistant, multiple knowledge sources, intelligent routing.**
[๐ฅ Demo Video](#-demo-video) โข [๐ Features](#-key-features) โข [โก Quick Start](#-quick-start) โข [๐ ๏ธ Setup](#-installation-setup) โข [๐ฎ Roadmap](#-future-improvements)
</div>
---
## ๐ฏ Overview
IntelliDocs AI is a **production-ready enterprise AI assistant** that combines:
- **Retrieval-Augmented Generation (RAG)** โ Answer questions from uploaded enterprise documents
- **Model Context Protocol (MCP)** โ Access structured company databases with intelligent tool selection
- **Web Search** โ Fetch current external information
- **LangGraph Workflow** โ Orchestrate complex multi-source queries with conversation memory
Perfect for organizations needing a **unified AI interface** that connects documents, databases, and real-time information.
---
## ๐ฅ Demo Video
https://github.com/user-attachments/assets/74e28186-4539-4337-a1e2-9add03b54a40
---
## ๐ธ Live Demo Screenshot
<img width="1912" height="1017" alt="IntelliDocs AI Demo" src="https://github.com/user-attachments/assets/72da7124-efb1-49c5-8038-b838e7b21962" />
<img width="1908" height="824" alt="ChatGPT Image Sep 8, 2026, 11_58_46 AM" src="https://github.com/user-attachments/assets/f4766053-1e90-4e1b-9fde-57ecd670225a" />
---
## โก Quick Start (5 Minutes)
### Prerequisites
- **Python 3.9+**
- **GROQ API Key**
- **Git** (for cloning)
### Installation & Running
```bash
# 1๏ธโฃ Clone the repository
git clone https://github.com/rupali-chauksey/intellidocs-ai-enterprise-rag-mcp.git
cd intellidocs-ai-enterprise-rag-mcp
# 2๏ธโฃ Create 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๏ธโฃ Setup environment variables
cp .env.example .env
# Edit .env and add your GROQ_API_KEY
# 5๏ธโฃ Initialize database
python setup_db.py
# 6๏ธโฃ Run the application
python -m uvicorn app.main:app --reload --port 8002
# 7๏ธโฃ Open browser
# Navigate to http://localhost:8002
```
**Done! ๐** Your IntelliDocs AI instance is now running.
---
## ๐ง Installation & Setup
### System Requirements
| Requirement | Version |
|------------|---------|
| Python | 3.9 or higher |
| pip | Latest |
| Node.js (optional) | 16+ (for frontend dev) |
| Git | 2.0+ |
| RAM | Minimum 2GB, Recommended 4GB+ |
| Disk Space | ~500MB for dependencies |
### Detailed Setup Steps
#### Step 1: Clone Repository
```bash
git clone https://github.com/rupali-chauksey/intellidocs-ai-enterprise-rag-mcp.git
cd intellidocs-ai-enterprise-rag-mcp
```
#### Step 2: Virtual Environment Setup
```bash
# Create virtual environment
python -m venv venv
# Activate it
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# You should see (venv) in your terminal
```
#### Step 3: Install Dependencies
```bash
pip install --upgrade pip
pip install -r requirements.txt
```
#### Step 4: Environment Configuration
```bash
# Copy template
cp .env.example .env
# Edit .env file and add your keys:
# GROQ_API_KEY=your_api_key_here
# CHROMA_DB_PATH=./chroma_db
# DATABASE_PATH=./company.db
```
**โ ๏ธ Important:** Never commit `.env` file to Git!
#### Step 5: Database Setup
```bash
# Create and populate SQLite database
python setup_db.py
# Verify database
sqlite3 company.db ".tables"
```
#### Step 6: Run the Application
```bash
# Development mode (with auto-reload)
python -m uvicorn app.main:app --reload --port 8002
# Production mode
python -m uvicorn app.main:app --port 8002 --workers 4
```
#### Step 7: Access the Application
```
๐ฑ Open your browser: http://localhost:8002
```
---
## โจ Key Features
### ๐ 1. Retrieval-Augmented Generation (RAG)
Answer questions from uploaded enterprise documents with source awareness.
**Supported Formats:**
- ๐ PDF
- ๐ TXT
- ๐ Markdown
- ๐ DOCX
**RAG Pipeline:**
```
Document Upload
โ
Text Extraction & Preprocessing
โ
Smart Chunking (Overlap Detection)
โ
Embedding Generation (Sentence Transformers)
โ
ChromaDB Vector Storage
โ
User Query Processing
โ
Semantic Similarity Search
โ
Relevance Threshold Filtering
โ
LLM Answer Generation
โ
Source-Aware Response
```
**RAG Capabilities:**
- โ
Document upload & automatic indexing
- โ
Incremental ChromaDB indexing
- โ
Document re-upload with replacement
- โ
Duplicate vector prevention
- โ
Document status & chunk count tracking
- โ
Safe document deletion with vector cleanup
- โ
Configurable relevance threshold filtering
- โ
Source-aware answer generation
- โ
Web fallback when context is unavailable
### ๐ 2. Model Context Protocol (MCP)
A real MCP server exposes company database functionality as intelligent tools. The system dynamically discovers available tools and selects the best one for each query.
**Available MCP Tools:**
| Tool | Purpose |
|------|---------|
| `get_department_stats` | Department statistics & metrics |
| `query_employees` | Employee records & information |
| `get_top_products` | Product revenue rankings |
| `get_sales_performance` | Sales team performance data |
| `get_company_overview` | Company-wide metrics |
| `run_custom_query` | Safe SELECT queries |
**Smart Tool Selection:**
- ๐ฏ Analyzes query intent
- ๐ Validates argument types
- ๐ก๏ธ Prevents SQL injection
- ๐ Returns structured data
### ๐๏ธ 3. Company Database
A production-ready SQLite database covering:
**Employees Module:**
- Employee ID, name, email, department
- Salary, hire date, job title
- Performance metrics
**Products Module:**
- Product ID, name, category
- Price, revenue, stock
- Performance metrics
**Sales Module:**
- Salesperson details
- Revenue data, commissions
- Transaction records
**Recreate Database Anytime:**
```bash
python setup_db.py
```
### ๐ง 4. Intelligent Query Routing
The system identifies query type and routes to the optimal source using deterministic patterns.
| Query Type | Route | Example |
|---|---|---|
| Document Question | RAG | "What is the AI course content?" |
| Database Query | MCP | "Who is the highest paid employee?" |
| Current Information | Web | "What is latest tech news?" |
| Hybrid Query | RAG + MCP | "What is our policy AND who leads sales?" |
**Routing Decision Tree:**
```
User Query
โ
Pattern Matcher
โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโ
โผ โผ โผ
RAG Only Database Only Web Only
โ โ โ
โโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโ
โผ
Check for Hybrid Patterns
โ
Route to Appropriate Handler
```
### ๐ 5. Hybrid RAG + MCP Processing
Answer complex questions requiring multiple sources simultaneously.
**Example Query:**
> "What is our sales incentive policy, and who are our top 3 salespeople?"
**Processing Flow:**
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ User Query (Hybrid Pattern) โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโดโโโโโโโโโ
โ โ
RAG Retrieval MCP Database
(Policy) (Sales Data)
โ โ
โโโโโโโโโโฌโโโโโโโโโ
โ
Response Synthesis
(LLM Combination)
โ
โโโโโโโโโโโโโโโโโโโโโ
โ Final Answer โ
โ (Policy + Data) โ
โโโโโโโโโโโโโโโโโโโโโ
```
**Benefits:**
- Combines unstructured knowledge with structured data
- Single coherent response
- Reduces user query count
- More complete answers
### ๐ 6. Web Search Fallback
Fetch current external information when needed.
**Used For:**
- Current events & news
- Real-time data (weather, exchange rates)
- External reference information
- Fallback when RAG has no relevant context
**Example Queries:**
- "Who is the current PM of India?"
- "What is latest AI news?"
- "Current USD to INR rate?"
### ๐ฌ 7. Conversation Memory
Maintain context across multiple turns for natural conversation flow.
**Example Conversation:**
```
User: "Who are the top 3 salespeople?"
AI: "Returns: Alice ($500K), Bob ($450K), Carol ($400K)"
User: "What are their salaries?"
AI: [Uses previous context, identifies 'their' = top 3 salespeople]
"Returns their individual salaries from database"
User: "What department are they in?"
AI: [Maintains full conversation context]
"Returns department info from database"
```
**Memory Features:**
- โ
Context window management
- โ
Follow-up question resolution
- โ
Pronoun disambiguation
- โ
Multi-turn understanding
### ๐ 8. Document Management
Complete document lifecycle with status tracking.
**Operations:**
- โ
**Upload** โ Add new documents to knowledge base
- โ
**Index** โ Automatic chunking & embedding
- โ
**Search** โ Semantic similarity search
- โ
**Re-upload** โ Replace old document versions
- โ
**Delete** โ Remove with vector cleanup
- โ
**Status Check** โ View indexing status & chunk count
**Document Status Values:**
| Status | Meaning |
|--------|---------|
| `pending` | Upload received, waiting to index |
| `indexing` | Currently being processed |
| `indexed` | Ready for queries |
| `error` | Failed indexing, check logs |
### ๐ฏ 9. Relevance Filtering
Never blindly trust retrieval results. Configurable threshold prevents weak context.
**Relevance Checking:**
```
Query Input
โ
Vector Similarity Search
โ
Retrieved Chunks Scored
โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ Relevance Threshold? โ
โโโโโโโโโโโโโฌโโโโโโโโโโโโ
โโโโโโโโโดโโโโโโโโโ
โผ โผ
PASS FAIL
โ โ
Use RAG Fallback to
Context Web Search
```
**Configuration in `.env`:**
```
RELEVANCE_THRESHOLD=0.7
```
### ๐งฉ 10. LangGraph Workflow Orchestration
Sophisticated state machine for complex multi-source queries.
**Workflow Diagram:**
```
START
โ
Classify Query
โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโ
โผ โผ โผ
RAG Database Web
โ โ โ
Retrieve MCP Agent Web Search
โ โ โ
Relevance Grade Database Tool โ
โโโโโโโโโโโโโโฌโโโโโดโโโโโโโโโโโโโโโโโ
โผ
Response Synthesis
(Combine Results)
โผ
Final Answer
โ
โผ
Stream to User
```
**Hybrid Query Processing:**
```
Input: RAG + Database Question
โ
โโโ [Parallel] RAG Retrieval
โ โโ Vector Search
โ โโ Relevance Filter
โ
โโโ [Parallel] MCP Database
โ โโ Tool Selection
โ โโ Database Query
โ
โโโ [Merge] Response Synthesis
โโ Combine contexts
โโ LLM generates unified answer
```
---
## ๐๏ธ System Architecture
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ User Interface (Browser) โ
โ (HTML/CSS/JavaScript) โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ HTTP/WebSocket
โโโโโโโโโโโผโโโโโโโโโโโ
โ FastAPI Backend โ
โ (Uvicorn Server) โ
โโโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ
โ LangGraph Router (Agent) โ
โ โข Query Classification โ
โ โข Tool Selection โ
โ โข Response Synthesis โ
โโโฌโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโ
โ โ
โโโโโโโโผโโโโโโ โโโโโโโโผโโโโโโโ
โ RAG โ โ MCP/DB โ
โ Pipeline โ โ Agent โ
โ โ โ โ
โ ChromaDB โโโผโโโโโโบโ MCP Server โ
โ (Vectors) โ โ SQLite DB โ
โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ โ
โโโโโโโโโโฌโโโโโโโโโโโโ
โ
โโโโโโโโโผโโโโโโโโโโ
โ Web Search โ
โ (Fallback) โ
โโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโผโโโโโโโโโโโโโโโ
โ Response Synthesis โ
โ (LLM Combination) โ
โโโโโโโโโฌโโโโโโโโโโโโโโโ
โ
โโโโโโโโโผโโโโโโโโโโโโโโโ
โ Final Response โ
โ (with Sources) โ
โโโโโโโโโโโโโโโโโโโโโโโโ
```
---
## ๐งฑ Technology Stack
| Component | Technology | Purpose |
|---|---|---|
| **Language** | Python 3.9+ | Core application |
| **Backend Framework** | FastAPI | REST APIs & WebSocket |
| **Workflow Orchestration** | LangGraph | Multi-source routing |
| **Vector Database** | ChromaDB | Semantic search |
| **Structured Data** | SQLite | Company database |
| **LLM** | Groq (LLaMA) | Fast inference |
| **Embeddings** | Sentence Transformers | Local embeddings |
| **Protocol** | MCP | Database tool integration |
| **Frontend** | HTML/CSS/JavaScript | User interface |
| **Server** | Uvicorn | ASGI application server |
| **Containerization** | Docker & Docker Compose | Production deployment |
---
## ๐ Project Structure
```
IntelliDocs_AI_Enterprise_RAG_MCP/
โ
โโโ ๐ app/
โ โโโ __init__.py
โ โโโ config.py # Configuration & settings
โ โโโ db_tools.py # Database tool definitions
โ โโโ graph.py # LangGraph workflow
โ โโโ ingestion.py # Document ingestion pipeline
โ โโโ main.py # FastAPI application
โ โโโ mcp_agent.py # MCP agent logic
โ โโโ mcp_server.py # MCP server implementation
โ โโโ tools.py # Tool definitions
โ โ
โ โโโ ๐ routes/
โ โ โโโ documents.py # Document management endpoints
โ โ โโโ upload.py # Upload handling endpoints
โ โ
โ โโโ ๐ services/
โ โ โโโ chunker.py # Text chunking logic
โ โ โโโ document_loader.py # Format-specific loaders
โ โ โโโ embedding.py # Embedding generation
โ โ โโโ uploader.py # File upload service
โ โ โโโ vector_store.py # ChromaDB operations
โ โ
โ โโโ ๐ static/
โ โ โโโ index.html # Main UI
โ โ โโโ ๐ assets/
โ โ โโโ style.css # Styling
โ โ โโโ script.js # Frontend logic
โ โ
โ โโโ ๐ uploads/ # Uploaded documents
โ
โโโ ๐ data/
โ โโโ company_policy.txt # Sample company docs
โ
โโโ ๐ tests/
โ โโโ test_basic.py # Unit tests
โ
โโโ ๐ Assets/
โ โโโ test_1.png
โ โโโ test_2.png
โ
โโโ ๐ docs/
โ โโโ API.md # API documentation
โ โโโ ARCHITECTURE.md # Detailed architecture
โ โโโ TROUBLESHOOTING.md # Common issues
โ
โโโ setup_db.py # Database initialization
โโโ requirements.txt # Python dependencies
โโโ .env.example # Environment template
โโโ .gitignore # Git ignore rules
โโโ Dockerfile # Docker image
โโโ docker-compose.yml # Docker Compose config
โโโ README.md # This file
โโโ LICENSE # MIT License
```
---
## ๐ ๏ธ Configuration
### Environment Variables
Create `.env` file from `.env.example`:
```bash
cp .env.example .env
```
**Required Variables:**
```env
# LLM Configuration
GROQ_API_KEY=your_groq_api_key_here
MODEL_NAME=mixtral-8x7b-32768
# Database Configuration
DATABASE_PATH=./company.db
CHROMA_DB_PATH=./chroma_db
# Server Configuration
API_PORT=8000
API_HOST=0.0.0.0
# RAG Configuration
CHUNK_SIZE=500
CHUNK_OVERLAP=50
RELEVANCE_THRESHOLD=0.7
# MCP Configuration
MCP_ENABLED=true
MCP_PORT=5678
```
**โ ๏ธ Security:** Never commit `.env` to version control!
---
## ๐ Usage Examples
### Example 1: RAG Query
```
User: "What is the pricing of the AI course?"
System Flow:
1. Classify as RAG query
2. Search documents
3. Find relevant sections
4. Generate answer with sources
Response: "The AI course costs $299..."
```
### Example 2: Database Query
```
User: "Who is the top salesperson this quarter?"
System Flow:
1. Classify as Database query
2. Select MCP tool: get_sales_performance
3. Execute database query
4. Synthesize response
Response: "Alice Johnson leads with $500K revenue..."
```
### Example 3: Hybrid Query
```
User: "What is our sales incentive policy and who qualifies?"
System Flow:
1. Classify as Hybrid (RAG + Database)
2. [Parallel] RAG retrieval โ Policy documents
3. [Parallel] MCP query โ Top performers
4. Synthesize both contexts
5. Generate unified answer
Response: "Our policy offers 5-15% bonus... Top qualifiers: Alice ($500K), Bob ($450K)..."
```
### Example 4: Web Fallback
```
User: "What is the current USD to INR exchange rate?"
System Flow:
1. Not found in documents or database
2. Trigger web search
3. Fetch current rate
4. Return real-time data
Response: "1 USD = 83.45 INR (as of today)"
```
---
## ๐ Security Best Practices
### Never Commit to Git
```gitignore
.env # API keys & secrets
venv/ # Virtual environment
chroma_db/ # Vector database
company.db # Company data
__pycache__/ # Python cache
.pytest_cache/ # Test cache
.vscode/ # IDE settings
*.pyc # Compiled Python
.DS_Store # macOS files
```
### Secrets Management
โ
**Do:**
- Store API keys in `.env` locally
- Use environment variables in production
- Rotate keys regularly
- Use separate keys for dev/prod
โ **Don't:**
- Commit `.env` to Git
- Hardcode API keys
- Share API keys in chat/email
- Use same key for multiple environments
### If Secret is Accidentally Committed
```bash
# 1. Revoke the compromised key immediately
# 2. Create a new key
# 3. Remove from Git history
git rm --cached .env
git commit --amend --no-edit
git push
```
---
## ๐ Deployment
### Docker Deployment (Recommended)
```bash
# Build and run with Docker Compose
docker compose up --build
# Run in background
docker compose up -d
# View logs
docker compose logs -f
# Stop services
docker compose down
```
### Manual Deployment
```bash
# Production setup
python -m uvicorn app.main:app --host 0.0.0.0 --port 8002 --workers 4
# With logging
python -m uvicorn app.main:app --host 0.0.0.0 --port 8002 --workers 4 --log-level info
```
### Cloud Deployment (Coming Soon)
- AWS EC2/ECS
- Google Cloud Run
- Azure Container Instances
- Heroku
---
## ๐งช Testing
### Run Unit Tests
```bash
# Install test dependencies
pip install pytest pytest-asyncio
# Run all tests
pytest
# Run specific test
pytest tests/test_basic.py
# With coverage
pytest --cov=app tests/
```
### Manual Testing Checklist
- [ ] Document upload
- [ ] Document search
- [ ] Database queries
- [ ] Web search fallback
- [ ] Hybrid queries
- [ ] Conversation memory
- [ ] Error handling
---
## ๐ Troubleshooting
### Issue: Module Import Error
**Error:** `ModuleNotFoundError: No module named 'app'`
**Solution:**
```bash
source venv/bin/activate # Activate virtual environment
pip install -r requirements.txt # Reinstall dependencies
python -m uvicorn app.main:app --reload --port 8002 # Run with correct import path
```
---
### Issue: GROQ API Key Error
**Error:** `GROQ_API_KEY not found or invalid`
**Solution:**
```bash
# Check .env file exists
cat .env
# Update .env with correct key
GROQ_API_KEY=sk_xxxxxxxxxxxxxxxxxxxx
# Restart application
```
---
### Issue: Document Not Searchable
**Error:** Document uploaded but not returning in searches
**Solution:**
```bash
# Check document status
curl http://localhost:8000/api/documents/status
# If status is "error", check logs:
# Look for chunking or embedding errors
# Re-upload document
# Or recreate ChromaDB:
rm -rf chroma_db/
# Restart application
```
---
### Issue: Port Already in Use
**Error:** `Address already in use: ('127.0.0.1', 8002)`
**Solution:**
```bash
# Option 1: Use different port
python -m uvicorn app.main:app --port 8003
# Option 2: Kill process using port (Linux/macOS)
lsof -ti:8002 | xargs kill -9
# Option 3: Find and kill process (Windows)
netstat -ano | findstr :8002
taskkill /PID <PID> /F
```
---
### Issue: Upload Files Interfering with Auto-Reload
**Error:** File size mismatch or incomplete uploads during `--reload`
**Solution:**
```bash
# Don't use --reload when testing uploads
python -m uvicorn app.main:app --port 8002
# Or use production mode:
python -m uvicorn app.main:app --port 8002 --workers 4
```
---
## ๐ฉบ Diagnostics & Monitoring
### Health Check Endpoint
```bash
curl http://localhost:8002/api/health
```
**Response:**
```json
{
"status": "healthy",
"components": {
"api": "โ Running",
"database": "โ Connected",
"vector_store": "โ Initialized",
"mcp_server": "โ Running"
}
}
```
### Document Diagnostics
```bash
# Get all documents status
curl http://localhost:8002/api/documents/status
# Get specific document details
curl http://localhost:8002/api/documents/<doc_id>
```
### Logs
```bash
# View application logs
tail -f app.log
# Check for errors
grep "ERROR" app.log
# Monitor MCP server
grep "MCP" app.log
```
---
## ๐ ๏ธ Development Guide
### Setting Up Development Environment
```bash
# Install dev dependencies
pip install -r requirements-dev.txt
# Run with debug mode
export PYTHONUNBUFFERED=1
python -m uvicorn app.main:app --reload --port 8002 --log-level debug
# Format code
black app/
# Lint
flake8 app/
# Type check
mypy app/
```
### API Documentation
Auto-generated documentation available at:
- Swagger UI: `http://localhost:8002/docs`
- ReDoc: `http://localhost:8002/redoc`
---
## ๐งฉ MCP Tools Reference
### Tool: `get_department_stats`
**Description:** Get department statistics and metrics
**Query Examples:**
- "Give me statistics for the Engineering department"
- "How many employees in Sales?"
- "Department performance metrics"
---
### Tool: `query_employees`
**Description:** Search and filter employees
**Query Examples:**
- "List all employees in Marketing"
- "Who earns above $100K?"
- "Show me employees hired in 2023"
---
### Tool: `get_top_products`
**Description:** Ranking products by revenue
**Query Examples:**
- "What are our top 5 products by revenue?"
- "Which product has highest revenue?"
---
### Tool: `get_sales_performance`
**Description:** Sales team performance data
**Query Examples:**
- "Who is the top salesperson?"
- "Sales rankings this quarter"
- "Revenue by salesperson"
---
### Tool: `get_company_overview`
**Description:** Company-wide metrics
**Query Examples:**
- "Company overview"
- "Total revenue and employees"
- "Company statistics"
---
### Tool: `run_custom_query`
**Description:** Safe SELECT queries (restricted)
**Allowed Operations:**
- โ
SELECT statements
- โ
WHERE clauses
- โ
JOIN operations
- โ INSERT, UPDATE, DELETE
- โ DROP, ALTER
---
## ๐ฏ Performance Optimization
### Query Optimization
```
Time Complexity:
- Vector Search: O(n) โ ~100ms for 1M vectors
- Database Query: O(log n) โ ~10ms with indexes
- LLM Inference: ~2-3 seconds
- Total Response: ~3-4 seconds
```
### Caching Strategy
- Recently retrieved documents cached in memory
- Embedding results cached in ChromaDB
- MCP tool results cached for 5 minutes
### Scaling Recommendations
- **Small deployments:** Single FastAPI instance
- **Medium deployments:** Load balancer + 2-3 instances
- **Large deployments:** Kubernetes + autoscaling + CDN
---
## ๐ฎ Future Improvements
**๐ Security & Access**
- ๐ User authentication & authorization
- ๐ฅ Multi-user workspaces with role-based access
- ๐ Enterprise SSO (SAML, OAuth2)
- ๐ข Organization-level management
- ๐๏ธ Document-level & field-level access control
**๐ก๏ธ Safety & Reliability**
- ๐งญ Hallucination detection & response confidence scoring
- ๐ฆ Fallback mechanism when RAG/MCP/Web search all fail
- โฑ๏ธ Rate limiting & API throttling
- โก Caching layer for repeated queries
**๐ Data Governance**
- ๐ Audit logs for queries & responses
- ๐ PII / sensitive data masking in responses
- ๐๏ธ Data retention & deletion policies (GDPR-style compliance)
**โ๏ธ Infrastructure**
- โ๏ธ Cloud deployment templates
- ๐๏ธ PostgreSQL & MongoDB support
- ๐ฆ Vector DB options (Pinecone, Weaviate, Milvus)
- ๐ Distributed deployment architecture
**๐ Performance & Product**
- โก Streaming responses with Server-Sent Events
- ๐ Advanced analytics & observability
- ๐ Enhanced citation & source tracking
- ๐ Production monitoring & alerting
- ๐จ Advanced UI customization
- ๐งช Comprehensive test coverage
- ๐ค Multi-agent collaboration
- ๐ฌ User feedback loop (thumbs up/down on answers)
*Contributions welcome for any of the above.*
---
## ๐ What This Project Demonstrates
This is a **production-grade implementation** of modern AI systems covering:
| Area | Technologies |
|------|--------------|
| **LLM Applications** | Groq, Claude integration |
| **RAG Systems** | ChromaDB, Sentence Transformers |
| **Vector Databases** | Semantic search, embeddings |
| **Agentic Workflows** | Tool calling, agent patterns |
| **Orchestration** | LangGraph state machine |
| **Protocols** | Model Context Protocol (MCP) |
| **Database Integration** | SQLite, custom SQL tools |
| **Web Integration** | Web search APIs |
| **Backend Development** | FastAPI, REST APIs |
| **Document Processing** | PDF/DOCX/TXT parsing |
| **DevOps** | Docker, Docker Compose |
| **Testing** | pytest, integration tests |
---
## ๐ Final Note
IntelliDocs AI brings together the best of modern AI technologies to create a practical, production-ready system for enterprise knowledge management.
```
INTELLIDOCS AI
โโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโ
โ โ โ โ
RAG MCP WEB MEMORY
โ โ โ โ
โผ โผ โผ โผ
Documents Database Internet Context
โ โ โ โ
โโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโ
โ
โผ
LangGraph Router
โ
โผ
Intelligent Answer
```
**Enterprise Knowledge + Business Data + Web Intelligence = IntelliDocs AI**
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessUnresponsive