ahad.

Home/Projects/MiA-RAG: Mindscape-Aware RAG

MiA-RAG: Mindscape-Aware RAG

Paper-accurate implementation of Mindscape-Aware RAG (arXiv:2512.17220) achieving +12% recall over baseline retrievers. Uses MiA-Emb-0.6B with hierarchical summarization and residual score fusion for context-enriched retrieval.

PythonStreamlitPyTorchQwen3LoRA

Overview

MiA-RAG is an implementation of the Mindscape-Aware Retrieval Augmented Generation paper (arXiv:2512.17220). It goes beyond standard RAG by building a global understanding of the ingested document before answering questions, resulting in more contextually relevant responses.

How It Works

  1. Document → Chunks → Summaries → Global Mindscape — Hierarchical summarization builds a holistic document understanding
  2. Mindscape-Conditioned Queries (Eq. 5) — Enriches user queries with document context before retrieval
  3. Residual Score Fusion — Combines main and residual embeddings for superior retrieval accuracy

Key Features

  • Official MiA-Emb-0.6B Model: LoRA adapter on Qwen3-Embedding for mindscape-aware embeddings
  • Mac M4 Optimized: MPS acceleration with automatic CPU fallback
  • Persistent Storage: Saves chunks, summaries, and embeddings to disk
  • Interactive UI: Streamlit app with document upload and Q&A