Commit ยท
a51fb11
1
Parent(s): 6a91298
removed readme
Browse files
README.md
DELETED
|
@@ -1,105 +0,0 @@
|
|
| 1 |
-
# ๐ง Knowledge Management RAG System
|
| 2 |
-
|
| 3 |
-
A powerful, local-first Retrieval-Augmented Generation (RAG) system designed to manage your personal knowledge base. Built with a modern client-server architecture, it allows you to upload documents, persist them in a vector database, and chat with your data using Google's Gemini models.
|
| 4 |
-
|
| 5 |
-

|
| 6 |
-

|
| 7 |
-

|
| 8 |
-

|
| 9 |
-
|
| 10 |
-
## โจ Key Features
|
| 11 |
-
|
| 12 |
-
- **๐ Document Ingestion**: Seamlessly upload PDF, DOCX, and TXT files.
|
| 13 |
-
- **๐ค Advanced Parsing**: Powered by [Docling](https://github.com/DS4SD/docling) for high-fidelity document parsing and chunking.
|
| 14 |
-
- **๐ง Smart Retrieval**: Uses `sentence-transformers/all-MiniLM-L6-v2` embeddings stored in a local ChromaDB instance.
|
| 15 |
-
- **๐ฌ Context-Aware Chat**: Chat interface powered by Google Gemini 2.5 Flash Lite.
|
| 16 |
-
- **STORAGE**: Uses ChromaDB for vector storage and **SQLite** for state management.
|
| 17 |
-
- **โก High Performance**: Optimized architecture with model caching (LRU) to prevent redundant reloading.
|
| 18 |
-
- **๐งน Management**: View and delete uploaded documents directly from the UI.
|
| 19 |
-
|
| 20 |
-
## ๐ ๏ธ Architecture
|
| 21 |
-
|
| 22 |
-
The project follows a clean segregation of duties:
|
| 23 |
-
|
| 24 |
-
```
|
| 25 |
-
/
|
| 26 |
-
โโโ ๐ app/ # FastAPI Backend
|
| 27 |
-
โ โโโ main.py # API Entry point & Dependency Injection
|
| 28 |
-
โ โโโ ๐ services/ # Core Business Logic
|
| 29 |
-
โ โโโ document_ingester.py # Docling + ChromaDB ingestion
|
| 30 |
-
โ โโโ retriever.py # Semantic Search Logic
|
| 31 |
-
โ โโโ generation.py # Gemini LLM Interface
|
| 32 |
-
โโโ ๐ ui/ # Streamlit Frontend
|
| 33 |
-
โ โโโ Home.py # Landing Page
|
| 34 |
-
โ โโโ ๐ pages/ # Chat & Document Management Modules
|
| 35 |
-
โโโ ๐ data/ # Persistent Storage
|
| 36 |
-
โ โโโ ๐ chroma_db/ # Vector Database
|
| 37 |
-
โ โโโ ๐ sqlite_db/ # State Management (Metadata)
|
| 38 |
-
โ โโโ ๐ uploads/ # Raw Files
|
| 39 |
-
โโโ requirements.txt # Dependencies
|
| 40 |
-
```
|
| 41 |
-
|
| 42 |
-
## ๐ Getting Started
|
| 43 |
-
|
| 44 |
-
### Prerequisites
|
| 45 |
-
|
| 46 |
-
- Python 3.10 or higher
|
| 47 |
-
- A Google AI Studio API Key
|
| 48 |
-
|
| 49 |
-
### Installation
|
| 50 |
-
|
| 51 |
-
1. **Clone the repository**
|
| 52 |
-
```bash
|
| 53 |
-
git clone https://github.com/yourusername/rag-knowledge-management.git
|
| 54 |
-
cd rag-knowledge-management
|
| 55 |
-
```
|
| 56 |
-
|
| 57 |
-
2. **Create a virtual environment**
|
| 58 |
-
```bash
|
| 59 |
-
python -m venv .venv
|
| 60 |
-
# Windows
|
| 61 |
-
.venv\Scripts\activate
|
| 62 |
-
# Mac/Linux
|
| 63 |
-
source .venv/bin/activate
|
| 64 |
-
```
|
| 65 |
-
|
| 66 |
-
3. **Install dependencies**
|
| 67 |
-
```bash
|
| 68 |
-
pip install -r requirements.txt
|
| 69 |
-
```
|
| 70 |
-
|
| 71 |
-
4. **Configure Environment**
|
| 72 |
-
Create a `.env` file in the root directory:
|
| 73 |
-
```env
|
| 74 |
-
GOOGLE_API_KEY=your_google_api_key_here
|
| 75 |
-
API_URL=http://localhost:8000/
|
| 76 |
-
DATA_DIR=data/
|
| 77 |
-
```
|
| 78 |
-
|
| 79 |
-
### Running the Application
|
| 80 |
-
|
| 81 |
-
You will need two terminal windows:
|
| 82 |
-
|
| 83 |
-
**Terminal 1: Backend (API)**
|
| 84 |
-
```bash
|
| 85 |
-
uvicorn app.main:app --reload --port 8000
|
| 86 |
-
```
|
| 87 |
-
|
| 88 |
-
**Terminal 2: Frontend (UI)**
|
| 89 |
-
```bash
|
| 90 |
-
streamlit run ui/Home.py
|
| 91 |
-
```
|
| 92 |
-
|
| 93 |
-
## ๐ Usage Guide
|
| 94 |
-
|
| 95 |
-
1. **Upload Info**: Go to the **Documents** page. Upload your PDFs or text files. The system will parse and vectorise them automatically.
|
| 96 |
-
2. **Verify**: Check the file list to ensure your documents are indexed.
|
| 97 |
-
3. **Chat**: Switch to the **Chat** page. Ask questions like "Summarize the document I just uploaded" or specific details contained in your files.
|
| 98 |
-
|
| 99 |
-
## ๐ฎ Roadmap
|
| 100 |
-
|
| 101 |
-
- [ ] Multiple chat history
|
| 102 |
-
- [ ] Docker & Docker Compose support
|
| 103 |
-
|
| 104 |
-
---
|
| 105 |
-
*Built with โค๏ธ by logan*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|