Smart Files is an AI-powered document management system that enables users to upload, search, and query documents using semantic search, Retrieval-Augmented Generation (RAG), and automated SQL generation.
The system is designed with MLOps principles, ensuring scalability, reproducibility, monitoring, and automation.
Organizations deal with scattered unstructured and structured data (PDFs, CSVs, reports), making it difficult to search and extract insights efficiently.
This project solves this by:
- enabling semantic search across documents
- providing AI-powered Q&A (RAG)
- generating SQL queries for structured datasets
- 📂 Multi-source file ingestion (local + AWS S3)
- 🔍 Semantic Search (Vector DB)
- 🤖 RAG-based Question Answering
- 🧾 SQL Query Generation from natural language
- ☁️ Cloud Storage using AWS S3
- 📊 MLflow for experiment tracking
- 📦 DVC for data versioning
- 🧪 Evaluation pipeline for model performance
- 📡 Logging and monitoring system
- 🔁 CI/CD integration (GitHub Actions)
5. Data Ingestion (Add new documents for agent context using link of drive, cloud platforms, local files)
User
↓
FastAPI Backend (Agent)
↓
-----------------------------------
| Semantic Search | RAG | SQL Tool |
-----------------------------------
↓
Vector DB (Chroma)
↓
AWS S3 (Document Storage)
↓
MongoDB (Metadata)
↓
MLflow + Logging (Monitoring)
| Component | Technology |
|---|---|
| Backend | FastAPI |
| Frontend | Streamlit |
| Storage | AWS S3 |
| Database | MongoDB |
| Vector DB | ChromaDB |
| LLM | Ollama (Gemma) |
| Experiment Tracking | MLflow |
| Data Versioning | DVC |
| CI/CD | GitHub Actions |
-
File Upload → stored in S3
-
Metadata stored in MongoDB
-
Document processed (chunking + embedding)
-
Stored in Vector DB
-
Query → Agent decides:
- Semantic Search
- RAG
- SQL generation
-
Results returned to user
-
MLflow logs metrics and performance
- Tracks:
- user queries
- agent decisions
- latency
- errors
- Unified log directory (
logs/):app_runtime.log: System and application runtime logs (Rotating).api_performance.csv: API latency and performance metrics.
- Experiment Tracking:
models/mlflow.db: SQLite backend for MLflow tracking.
-
Tracks:
- document dataset (
data/documents/)
- document dataset (
-
Ensures:
- reproducibility
- version comparison
Tracks:
- retrieval accuracy
- response quality
- latency
- agent tool usage
GitHub Actions is used for automated validation:
- Linting: flake8 checks for code quality.
- Core Module Tests: Validates imports and basic functionality.
- MLflow Tracking Test: Verifies experiment logging integration.
- Evaluation Pipeline: Runs automated evaluation scripts.
- Artifact Management: Stores logs and performance metrics from each run.
- Real-time API using FastAPI
- Frontend via Streamlit
- Cloud storage via AWS S3
- Data Versioning (DVC)
- Experiment Tracking (MLflow)
- Monitoring & Logging
- Modular Pipeline Design
- CI/CD Automation
- Cloud Integration
- Real-time pipeline automation
- Model fine-tuning
- Advanced evaluation metrics
- Full cloud deployment (VM/Kubernetes)