An offline-capable, privacy-focused Retrieval-Augmented Generation (RAG) chatbot. DocuMind allows you to chat with your local documents using purely local AI models (via Ollama), ensuring no data ever leaves your machine.
.txtFiles: Best performance. Raw text is easiest for the AI to understand.- Standard
.pdfFiles: Works well for reports, essays, and contracts where text is selectable.
- Scanned PDFs / Images: Files that are just images (scans) are not supported. The system cannot read text trapped in images (no OCR).
- Complex Tables: PDFs with complex financial tables or multi-column layouts might lose structural context, leading to less accurate answers.
Ensure you have the following installed:
- Python 3.10+
- Ollama (Required for the LLM)
You need to pull the specific models used by this project. Open your terminal/command prompt and run:
ollama pull llama3
ollama pull nomic-embed-textNote: Ensure the Ollama app is running in the background before executing these commands!
Clone the repository and set up your environment:
# 1. Clone the repository (if you haven't already)
git clone https://github.com/your-username/DocuMind.git
cd DocuMind
# 2. Create a virtual environment
# Windows:
python -m venv .venv
.venv\Scripts\Activate
# Mac/Linux:
# python3 -m venv .venv
# source .venv/bin/activate
# 3. Install dependencies
pip install -r requirements.txtOnce installed, run the server:
python app.pyAfter a few seconds, you should see:
INFO: Uvicorn running on http://127.0.0.1:8000
To stop the server, go to the terminal window and press Ctrl + C, or simply close the terminal window.
- Open the App: Go to http://127.0.0.1:8000 in your browser.
- Add Documents:
- Create a folder named
datain the project root (if it doesn't exist). - Place your
.pdfor.txtfiles inside thedata/folder.
- Create a folder named
- Ingest: Click the "Ingest Documents" button on the left sidebar.
- Wait for the "Ingestion successful!" message.
- Chat: Type your question in the chat box and hit Enter!
- Backend: Python, FastAPI
- AI orchestration: LangChain
- Vector Store: FAISS (Facebook AI Similarity Search)
- LLM & Embeddings: Ollama (Llama 3, Nomic Embed Text)
- Frontend: Vanilla HTML/CSS/JavaScript
Feel free to fork this repository and submit pull requests.