Pandora's Box or Aladdin's Lamp: A Comprehensive Analysis Revealing the Role of RAG Noise in Large Language Models

Jinyang Wu, Feihu Che, Chuyuan Zhang, Jianhua Tao, Shuai Zhang, Pengpeng Shao

Abstract

Retrieval-Augmented Generation (RAG) is the industry standard for grounding Large Language Models (LLMs) in external facts to mitigate hallucinations. However, retrieved contexts often contain a mix of irrelevant, garbled, or misleading information. This paper introduces NoiserBench, a comprehensive framework designed to study seven distinct types of retrieval noise. Our analysis reveals a "dual nature" of noise: while "harmful noise" (e.g., counterfactual facts) severely degrades performance, certain "beneficial noises" (e.g., garbled sentences or mixed data types) can actually improve LLM accuracy and reasoning clarity by forcing the model to focus more intently on the correct information.

Introduction

Most RAG research operates under the assumption that all noise is detrimental, leading to significant efforts in building filters and rerankers to ensure pristine context. However, real-world retrieval is rarely perfect. This study seeks to move beyond the binary "noise vs. signal" view by developing a nuanced taxonomy of how different distractions affect model behavior. By categorizing noise properly, we can better understand how LLMs navigate conflicting or low-quality information.

The NoiserBench Framework

The researchers developed a systematic pipeline to create NoiserBench, defining seven linguistic noise types split into two categories:

  • Harmful Noise: Includes Counterfactual (fake facts), Supportive (relevant but answer-less), Orthographic (typos), and Prior (false premises in the query).
  • Beneficial Noise: Includes Semantic (off-topic), Datatype (mixed URLs/code), and Illegal Sentence (grammatically garbled text).
Figure 2: Taxonomy of the seven types of noise in RAG and illustrative examples for each category.

Using ChatGPT and Natural Language Inference (NLI) models, the authors generated noisy documents that mimic real-world web scrapings. For instance, "Illegal Sentence Noise" (ISN) was created by randomly shuffling vocabulary to create garbled but recognizable distractions.

Experimental Setup

The study evaluated eight representative LLMs (including Llama 3, Qwen 2, and Mistral) across diverse benchmarks categorized by reasoning complexity:

  • Single-hop: Natural Questions (NQ) and RGB.
  • Multi-hop: HotpotQA, 2WikiMQA, StrategyQA, and TempQA.
  • PriorQA: A new benchmark specifically designed to test "Prior Noise"—questions based on false premises.

Key Results and the "Aladdin’s Lamp" Effect

The most striking discovery is that Illegal Sentence Noise (ISN) and Datatype Noise (DN) consistently improved model performance. This phenomenon, dubbed the "Aladdin’s Lamp" effect, suggests that these noises act as a form of inference-time adversarial training. Because the noise is so obviously low-quality, the model's attention mechanism instinctively filters it out and anchors more strongly to the "Golden Context" (the correct information).

Figure 6: Accuracy comparison across different context types with and without Illegal Sentence Noise (ISN), demonstrating the performance boost provided by beneficial noise.

Key Findings:

  • Accuracy Boosts: Introducing ISN improved the weighted average accuracy of Llama3-8B by 3.32% and Qwen2-7B by 1.65% across all datasets.
  • The Fragility of Fact: Counterfactual Noise (CN) remains the true "Pandora’s Box." When retrieved documents contain plausible but incorrect facts, LLMs are easily misled, with Llama3-8B's accuracy plummeting from 86.57% to 45.58%.
  • Attention Shift: Gradient analysis showed that beneficial noise keeps attention scores for the Golden Context high (~0.67), whereas harmful counterfactual noise successfully diverts the model's attention away from the truth.

Conclusion

This research demonstrates that not all noise in RAG systems is a nuisance. While counterfactual information is highly damaging, garbled or irrelevant text can serve as a beneficial distraction that sharpens a model's focus. Future work will explore layer-wise filtering mechanisms and how to intentionally inject beneficial noise to build more robust RAG systems.

Summary updated

BibTeX
@inproceedings{wu2025pandora,
  author = {Jinyang Wu and Feihu Che and Chuyuan Zhang and Jianhua Tao and Shuai Zhang and Pengpeng Shao},
  title = {{Pandora's Box or Aladdin's Lamp: A Comprehensive Analysis Revealing the Role of RAG Noise in Large Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
  url = {https://openreview.net/forum?id=UFjrv2E8IB},
}
Figure