MiA-RAG: Mindscape-Aware Retrieval-Augmented Generation
Local reproduction of Mindscape-Aware RAG (arXiv:2512.17220) improving retrieval accuracy by +25% over standard RAG on NarrativeQA using INT4-quantized LoRA-adapted MiA-Emb-8B, Qwen2.5-14B-Instruct via Ollama, 3-channel ChromaDB + BM25 + RRF search, and a Streamlit LLM-as-a-judge evaluation UI.
PythonOllamaLoRA/PEFTINT4 QuantizationChromaDBBM25Streamlit
Overview
MiA-RAG is a local reproduction of Mindscape-Aware Retrieval-Augmented Generation (arXiv:2512.17220) engineered to overcome flat chunk retrieval failures on long-context narrative and technical corpora. Instead of embedding chunks in isolation, the pipeline builds a hierarchical global summary (mindscape) and conditions both query embeddings and generation on that global scaffold.
Architecture & Implementation
- Hierarchical Mindscape Construction: Documents are segmented into chunks, summarized at the chunk level, and recursively aggregated into a document-wide semantic scaffold.
- INT4 LoRA Embeddings + Local Inference: Runs INT4-quantized, LoRA-adapted
MiA-Emb-8BalongsideQwen2.5-14B-Instructlocally via Ollama, enabling reproducible long-context evaluation at zero external API cost. - 3-Channel Hybrid Retrieval + Reranking: Fuses dense chunk similarity (
ChromaDB), mindscape-conditioned embeddings, and lexicalBM25scores via Reciprocal Rank Fusion (RRF), followed by an LLM reranking pass. - LLM-as-a-Judge Evaluation UI: Includes a
Streamlitinterface for interactive document ingestion, retrieval inspection, and side-by-side LLM-as-a-judge benchmarking against baseline RAG.
Evaluation Results
| Metric / Setup | Outcome |
|---|---|
| Benchmark Dataset | NarrativeQA |
| Retrieval Accuracy vs. Standard RAG | +25% improvement |
| Embedding Backbone | MiA-Emb-8B (INT4-quantized, LoRA/PEFT) |
| Generator Model | Qwen2.5-14B-Instruct via Ollama |
| Inference Cost | $0 (100% local execution) |