StitchRAG: Constructing Compact and Evidence-Preserving Contexts for RAG with Diffusion-Based Stitching
Minsang Kim, Junpyo Lim, Heeje Cho, Seungjun Baek
Abstract
Retrieval-augmented generation (RAG) improves factuality by grounding large language models (LLMs) in external evidence. However, long retrieved contexts incur computational overhead and can even hurt performance due to noisy or irrelevant content. We propose StitchRAG, a framework for constructing compact context in RAG. StitchRAG builds a faithful, information-dense context while dynamically compressing the retrieved passages. We adapt the size reduction ratio to each passage by formulating a utility maximization trading-off the retained information and computation costs. We then extract answer candidates and query-related keywords from passages as anchors and collect passage sentences containing anchors under the derived size constraint. Finally, we connect or stitch the collected sentences together using text diffusion to form a coherent and natural context. Experiments on five open-domain QA benchmarks show that StitchRAG consistently outperforms diverse multi-step and compression baselines. Extensive ablations show the effectiveness of dynamic size allocation, anchor preservation, and diffusion-based stitching.
Create a lesson
Related papers
Auditing Post-Training Unlearning in Diffusion Language Models using Sparse Autoencoders
Shared title terminology · Yunha Seo, Changhoon Kim
Open CDLM: A Benchmark and Library for Continuous Diffusion Language Models
Shared title terminology · Hao Jiang, Ruixi Chen, Jiayi Han et al.
LongCat Recall Sparse Attention: Co-Designing Key Organization and Retrieval for Long-Context Inference
Shared title terminology · Hao Zhang, Bin Xiao, Kefeng Zhang
Your Judge Inherits Your Prompt: In-Context Label Bias in an LLM-as-Judge Is Directional, Not Symmetric
Shared title terminology · Abdullah Ahmad, Ahmed J. O. Ahmed, Luca Citi
Weight-Space Programming Writes In-Context Learning and Matches Fine-Tuning in Language Models
Shared title terminology · Konstantinos Skianis, Aristidis Likas
Cross-Linguistic Distinctive-Feature Constraints on Segmental Triphones: Evidence for Contrastive Dispersion
Shared title terminology · Leonardo Araújo