A Sliding-Window Batched Framework: Optimizing Retrieval-Augmented Generation (RAG) for Trustworthy AI under the EU AI Act
At a glance
- Citations
- 0
- References
- 0
- Comments
- 0
Abstract
This study introduces Sliding-Window Batched RAG (SWB-RAG), a novel framework that optimizes both efficiency and contextual accuracy in retrieval-augmented text generation for lengthy and complex documents in terms of leveraging Trustworthy AI. Building upon foundational RAG research (Lewis et al., 2020) and sliding-window techniques (Beltagy et al., 2020), we conducted a two-phase comparative evaluation. In Phase One, when processing a 144-page legal document, SWB-RAG achieved statistical equivalence to Classic Contextual RAG (CC-RAG) across all RAGAS quality metrics while reducing runtime by 92.7% and costs by 97.9%. In Phase Two, across 56 diverse documents, totaling 5,965 pages, SWB-RAG significantly outperformed Traditional RAG (T-RAG) in context of recall (p < 0.001) and context precision (p = 0.008). The framework's innovation lies in its three-component architecture: a global document summarization to capture overarching themes, a batch processing to optimize computational efficiency, and a sliding-window context enrichment to preserve local contextual richness. Our results—including a Human-in-the-Loop expert evaluation—position SWB-RAG as a scalable, cost-effective solution for especially legal, technical, and scientific document processing, effectively addressing the fundamental efficiency-quality tradeoff that has limited the practical application of RAG systems for complex documents in resource-constrained environments.
Publication details
- DOI
- 10.54941/ahfe1006031
- OpenAlex
- W4411755564
- Document type
- conference-paper
- Language
- EN
- Source
- AHFE international
- Last metadata update
Comments
Log in to join the discussion.