Mi:RAG is a local document search and question answering tool. It indexes PDFs, Word documents, and images directly on your machine, extracts diagrams and figures, and answers questions using local Ollama models and ChromaDB vector search. Optional cloud API connections (OpenAI, Gemini, Claude, Groq) are also supported.
Windows 1-Line Installer
# Run in PowerShell (Windows 10 or 11)irm https://mirag.me/install | iex
Linux & macOS 1-Line Installer
# Run in Terminal (Ubuntu, Debian, Fedora, Arch, macOS)curl -fsSL https://mirag.me/install.sh | bash
Instant Launch: Global 'mirag' Command
After the first run, the installer registers the mirag command in your terminal's PATH. You can launch your studio anytime from any directory:
# Launch Mi:RAG Studio from any terminal (PowerShell, CMD, Bash, Zsh)mirag
Manual Installation (Git / All Platforms)
# Clone and start the factory server
git clone https://github.com/AryanSingh64/Mi-RAG.git
cd Mi-RAG
pip install -r requirements.txt
python run_factory.py
Automatic Hardware Check
Detects available NVIDIA VRAM, Apple Silicon MPS, or CPU cores to configure quantization.
Rather than failing on resource-constrained machines, the hardware engine automatically scales quantization and model parameters to fit your machine's exact specifications:
High VRAM (>= 12GB)
Runs Qwen2.5 (7B / 14B) with full context windows and high-resolution visual processing.
Mid-Range (6GB - 11GB)
Selects Llama3.2 (3B) with Q4_K_M quantization for rapid inference and low memory overhead.
CPU Only / Ultrabook
Employs CPU ONNX runtime, multi-threaded batching, and lightweight 1.5B/3B models.
EMBEDDINGS
Dense Embedding Models Guide
Select the optimal dense vector embedding model for your specific document corpus and hardware profile:
When to Use
Model ID
Vector Dim
Optimization Target
Best Overall
BAAI/bge-base-en-v1.5
768-dim
Default recommendation. SOTA MTEB retrieval accuracy for standard documents, technical manuals, and general corpora.
Fastest
all-MiniLM-L6-v2
384-dim
Ultra-fast CPU indexing with minimal memory footprint. Best for rapid prototyping or lower-spec hardware.
Multilingual
BAAI/bge-m3
1024-dim
Multi-lingual support across 100+ languages with extended 8192-token context window for long-document attention.
Deep Research
BAAI/bge-large-en-v1.5
1024-dim
Maximum semantic precision for dense academic research papers, legal contracts, and engineering specifications.
Long Documents
nomic-ai/nomic-embed-text-v1.5
768-dim
Full-chapter retrieval with 8192-token attention span and Matryoshka dimensionality support.
MULTIMODAL
High-Recall Multimodal Parser
Standard RAG solutions discard charts, flowcharts, and diagrams by stripping documents to raw text. Mi:RAG uses a high-recall multi-mode extractor supporting raster images, vector drawings, and embedded office graphics:
Vector Drawing Plots & Charts
Isolates and renders canvas drawing paths directly from research and technical PDFs (e.g. arXiv / IEEE papers).
Extracts and indexes embedded graphics and images packaged within Microsoft Word documents.
Reverse Visual Search
Allows users to paste or upload an image (Ctrl+V) to find matching diagrams and formulas across documents.
PRIVACY & GUARDRAILS
Anti-Hallucination & Local-First Privacy
Cloud models frequently reject sensitive or proprietary documents due to third-party data transmission policies. Mi:RAG provides a local-first pipeline where document chunking, visual layout detection, and vector indexing always remain private on your machine, with optional BYOK cloud models for synthesis.
Anti-Hallucination Verification
Every generated response is cross-checked against retrieved source chunks. Answers unsupported by source text are flagged with confidence metrics and grounded badges.
DEPLOYMENT
Standalone Package Export
Once your documents are indexed, you can export a self-contained ZIP bundle that can run on other local machines:
What's Inside the Exported Bundle:
vector_db/
Pre-indexed ChromaDB vector database with all document embeddings.
images/
Extracted high-resolution diagram crops and figures ready for visual search.
run.bat & run.sh
1-click launchers with system package cache detection for startup under 0.1s.
server.py & index.html
Standalone FastAPI microservice with persistent LocalStorage auto-save and Quit controls.
Running Your Standalone Package
# On Windows: Double-click or run from terminal
run.bat
# On Linux or macOS:
chmod +x run.sh
./run.sh
DEVELOPERS
REST API Reference
Integrate the Mi:RAG engine into your own frontends, Discord bots, or internal tools using the standard REST API:
Method
Endpoint
Description
POST
/api/sessions/create
Creates an isolated RAG session with private vector storage.
POST
/api/sessions/{id}/upload
Uploads and parses a PDF, Word document, or image.
POST
/api/sessions/{id}/chat
Submits a query with multi-turn memory and diagram matching.
GET
/api/sessions/{id}/export
Exports the standalone ZIP package.
POST
/api/shutdown
Gracefully stops and halts the local standalone server.