MixRAG: a Low-cost alternative to a Graph RAG for scientific papers - de Azevedo, Luis Cesar; Machado, Arthur P.; Prati, Ronaldo C. (Anais do Brazilian e-Science Workshop (BreSci); 2026: Anais do XX Brazilian e-Science Workshop, 2026)
Retrieval-Augmented Generation (RAG) combines Large Language Models (LLMs) with retrieval systems to enhance the relevance and accuracy of AI-generated responses. For complex texts, such as academic papers, GraphRAG, a variant of RAG, further refines context quality by integrating Knowledge Graphs (KGs) into the retrieval process. Unlike traditional RAG, GraphRAG uses KGs to model entities, relationships, and hierarchies explicitly, capturing richer semantic connections (e.g., causal links in research findings or experimental dependencies). This structured, graph-based approach enables LLMs to reason over interconnected concepts, improving both the accuracy and coherence of outputs in technical or nuanced domains. However, the use of LLMs for constructing KGs becomes costly for large text sets, as the process requires repeated LLM processing of text to extract and structure entities and relationships. In this paper, we introduce MixRAG, a cost-effective RAG/GraphRAG hybrid approach. MixRAG optimizes resource usage by strategically generating a KG only from document abstracts, while storing the remainder as raw text in the vector database. This selective structuring balances the efficiency of a simple RAG with the informational depth of GraphRAG. Our experiments show that MixRAG reduces KG construction costs by more than 95%, while improving the response quality.