Mindoc is a privacy-focused, fully offline AI assistant that allows you to search and chat with your PDFs and PPTs locally. No cloud, no API keys — everything runs 100% on your device using efficient Small Language Models (SLMs).
- No OpenAI
- No cloud dependencies
- No data leaves your device
- All models stored locally
- Upload multiple PDFs and PPTs
- Fully private, local processing
- Fast and accurate extraction
Powered by LaMini-Flan-T5 (248M) optimized for CPU inference.
Semantic Vector Search + Cross-Encoder Reranking
- Vector Model:
all-MiniLM-L6-v2 - Reranker:
ms-marco-MiniLM-L12-v2
- Quick Mode: Fast, short answers (Top-2 docs)
- Deep Research: Multi-doc reasoning using Map-Reduce
- Evidence-based answers
- Click on a citation → open PDF → auto-scroll to exact page
- Loader: PyMuPDFLoader
- Chunking: RecursiveCharacterTextSplitter
- Chunk size: 1000 chars
- Overlap: 200 chars
- Embeddings: SentenceTransformer (384-dim)
- Storage: ChromaDB (Local persistence)
- Retrieve top-10 chunks with vector search
- Re-rank with cross-encoder, keep best 3
- Feed context → LaMini LLM → generate answer
┌────────────┐
│ Files │
│ PDF / PPTX │
└──────┬─────┘
│
▼
┌────────────────┐
│ Document Loader│
└───────┬────────┘
│Chunks
▼
┌────────────────────────┐
│Embeddings (Local Model)│
└───────────┬────────────┘
│Vectors
▼
┌──────────────────┐
│ Vector Store │
│ FAISS / Chroma │
└─────────┬────────┘
│
▼
┌───────────────────┐
│ RAG Pipeline │
│ (Retrieve + LLM) │
└─────────┬─────────┘
│
▼
┌─────────────┐
│ FastAPI │
│ /query │
└─────────────┘
- Python 3.10+ (3.12 recommended)
- Node.js & npm
cd backend
# Virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Download models (run once)
python download_model.py
python download_reranker.py
# Start backend server
uvicorn app.main:app --reloadcd frontend
npm install
npm run dev- Drag & drop PDFs
- Supports batch uploads
- Wait for “✅ Indexed” confirmation
- Fast
- Lightweight
- Best for direct questions
- Reads many chunks
- Map-Reduce summarization
- Great for reports & summaries
- Each answer includes clickable citations
- Opens full PDF and auto-scrolls to correct page
mindoc/
├── backend/
│ ├── app/
│ │ ├── api/
│ │ ├── rag/
│ │ ├── services/
│ │ └── main.py
│ ├── data/
│ │ ├── chroma/
│ │ ├── models/
│ │ └── uploads/
│ ├── download_model.py
│ ├── download_reranker.py
│ └── requirements.txt
│
└── frontend/
├── src/
│ ├── App.jsx
│ ├── App.css
│ └── main.jsx
└── package.json
Install SQLite shim:
pip install pysqlite3-binaryLong chunks → crash. Fixed by enabling:
truncation=TrueUsually caused by a missing reranker model. Run again:
python download_reranker.py- OCR for scanned documents
- Model switching (LaMini ↔ Phi-2 ↔ Qwen 0.5B)
- Persistent conversation history
- Voice mode (offline ASR)