Kore-Ai is a sophisticated Retrieval-Augmented Generation (RAG) chatbot built to solve the challenge of manual document review. It allows users to upload multiple PDF documents, ingests them into a vector database, and uses local LLMs to perform detailed comparison, summarization, and gap analysis in real-time.
- Dual-Document Ingestion: Upload and analyze two distinct PDF documents simultaneously (e.g., Document A vs. Document B).
- Semantic Search: Uses MongoDB Atlas Vector Search to retrieve context based on meaning, not just keywords.
- Local AI Power: Privacy-focused architecture using Ollama and Llama 3.2 running locally.
- Persistent Memory: All chat history and user interactions are securely stored in MongoDB, allowing for long-term context retention.
- Real-Time Streaming: Fast, typewriter-style responses for a smooth user experience.
- Modern UI: Fully responsive, dark-themed interface built with React and Tailwind CSS.
| Component | Technology | Description |
|---|---|---|
| Frontend | React.js, Tailwind CSS | Responsive UI for document upload and chat. |
| Backend | Python (Flask/FastAPI) | API server handling ingestion and LLM requests. |
| Database | MongoDB Atlas | Stores Vector Embeddings (document_chunks) & Chat History. |
| AI Model | Llama 3.2 (via Ollama) | Lightweight, high-speed local LLM for reasoning. |
| Embeddings | Nomic-Embed-Text | Converts PDF text into vector representations. |
Before running the project, ensure you have the following installed:
- Python 3.10+
- Node.js & npm
- Ollama (Running locally)
- MongoDB Atlas Account (With a dedicated Cluster)
git clone [https://github.com/Adesh2204/Kore-Ai.git](https://github.com/Adesh2204/Kore-Ai.git)
cd Kore-Ai
Navigate to the backend directory:
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
🔐 Security Configuration (Important):
Create a file named .env in the root directory. This file is not tracked by git to protect your secrets. Add your specific credentials:
MONGO_URI=your_mongodb_connection_string_here
DB_NAME=rag_chatbot
COLLECTION_NAME=document_chunks
⚠️ Note: Never commit your.envfile to GitHub. Ensure it is listed in your.gitignorefile.
Navigate to the frontend folder:
cd frontend
npm install
Ensure Ollama is running and pull the required models:
ollama pull llama3.2
ollama pull nomic-embed-text
Step 1: Start the Backend Server
# In your backend terminal
python api_server.py
Step 2: Start the Frontend Client
# In your frontend terminal
npm run dev
Step 3: Access the App
Open your browser and navigate to http://localhost:5173 (or the port shown in your terminal).
Kore-Ai/
├── frontend/ # React Source Code
├── uploads/ # Temporary storage for uploaded PDFs
├── api_server.py # Main Backend API entry point
├── ingest.py # Script for chunking & vectorizing PDFs
├── requirements.txt # Python dependencies
└── .gitignore # Ensures secrets (.env) are not uploaded
Contributions are welcome! Please fork the repository and submit a pull request for any enhancements.
This project is open-source and available under the MIT License.