Grounding Long-Context Reasoning with Contextual Normalization for Retrieval-Augmented Generation
Jiamin Chen, Yuchen Li, Xinyu Ma, Xinran Chen, Xiaokun Zhang, Shuaiqiang Wang, Chen Ma, Dawei Yin
TL;DR
This work shows that how retrieved content is presented—its surface format—has a profound impact on long-context reasoning in retrieval-augmented generation. It identifies tokenization and attention attribution as key mechanisms driving format sensitivity and introduces Contextual Normalization (C-Norm), a training-free, model-aware pipeline that adaptively normalizes context formatting using an Attention Balance Score. Across controlled and real-world benchmarks, C-Norm consistently improves robustness to order variation and enhances long-context utilization, achieving substantial gains especially in challenging long-context settings. The findings highlight the practical importance of input formatting in RAG, offering a simple yet effective method to stabilize and scale long-context reasoning.
Abstract
Retrieval-Augmented Generation (RAG) has become an essential approach for extending the reasoning and knowledge capacity of large language models (LLMs). While prior research has primarily focused on retrieval quality and prompting strategies, the influence of how the retrieved documents are framed, i.e., context format, remains underexplored. We show that seemingly superficial choices, such as delimiters or structural markers in key-value extraction, can induce substantial shifts in accuracy and stability, even when semantic content is identical. To systematically investigate this effect, we design controlled experiments that vary context density, delimiter styles, and positional placement, revealing the underlying factors that govern performance differences. Building on these insights, we introduce Contextual Normalization, a lightweight strategy that adaptively standardizes context representations before generation. Extensive experiments on both controlled and real-world RAG benchmarks across diverse settings demonstrate that the proposed strategy consistently improves robustness to order variation and strengthens long-context utilization. These findings underscore that reliable RAG depends not only on retrieving the right content, but also on how that content is presented, offering both new empirical evidence and a practical technique for better long-context reasoning.
