Index-RAG: Storing Text Location in Vector Databases for QA tasks

Author: — Nov 2025

Abstract

This paper introduces Index-RAG (i-RAG), a novel approach to retrieval-augmented generation (RAG) that addresses the critical limitation of citation accuracy in existing RAG systems. Traditional RAG implementations struggle to provide precise source locations for retrieved information, often resulting in vague or inaccurate citations. I-RAG solves this problem by storing document location metadata directly within vector databases alongside content embeddings. The system processes documents at the paragraph level, generates multiple relevant questions for each paragraph using large language models, and stores embeddings for both the questions and paragraphs with precise location coordinates including filename, page number, and line number. Through comprehensive evaluation on question-answering benchmarks, i-RAG demonstrates superior citation accuracy while maintaining competitive retrieval performance. The approach represents a significant advancement in making RAG systems more trustworthy and suitable for applications requiring source verification, such as academic research, legal analysis, and compliance documentation. The source code is available at github.com/Pro-GenAI/Index-RAG.

Keywords: Large Language Models, LLMs, Retrieval-Augmented Generation, Vector Databases, Citation Accuracy, Question Answering, Document Location Tracking, Artificial Intelligence, AI

PDF

PDF of "Index-RAG: Storing Text Location in Vector Databases for QA tasks"
Download the PDF file