Relevance as a Vulnerability: How Web Retrieval Degrades Safety Alignment in LLM Agents Warning: This paper may include model-generated content that could be considered offensive.

Aditya Nawal, Manit Baser, Mohan Gurusamy · 2026

Read Relevance as a Vulnerability: How Web Retrieval Degrades Safety Alignment in LLM Agents Warning: This paper may include model-generated content that could be considered offensive. by Aditya Nawal, Manit Baser, Mohan Gurusamy (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2605-29224.txt.

Introduction

Aditya Nawal and colleagues ask how web retrieval weakens the safety alignment of language-model agents. They introduce AgentREVEAL, a diagnostic framework that studies both how retrieval is wired into the agent and what the retrieved content looks like. Binding tool calls and answer generation into a single step amplifies harmful outputs. Strikingly, even safety-oriented sources such as warning pages can raise harmful compliance, a pattern they call the Safe Source Paradox. They also release HarmURLBench, a benchmark of real-world URLs paired with harmful behaviors.

Catalog record

CREATORAditya Nawal, Manit Baser, Mohan Gurusamy
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE92728
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2605.29224

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Relevance as a Vulnerability: How Web Retrieval Degrades Safety Alignment in LLM Agents Warning: This paper may include model-generated content that could be considered offensive. Aditya Nawal, Manit Baser, Mohan Gurusamy Abstract AI agents augment large language models with external tools such as web retrieval, enabling grounded and up-to-date responses. However, incorporating external content into the generation pipeline can weaken the safety alignment mechanisms that govern model outputs. Prior work shows that enabling retrieval in agents increases compliance with harmful requests. We introduce AgentREVEAL , a diagnostic framework for analyzing retrieval-induced safety degradation in LLM agents. The framework examines two axes: how retrieval is integrated into the agent pipeline and the properties of the retrieved content. Along the integration axis, we find that binding tool invocation and response generation in a single step amplifies harmful outputs. Along the content axis, we uncover the Safe Source Paradox : even oppositional or safety-oriented sources, such as pages containing warnings or risk disclaimers, can increase harmful compliance by an average of 25% compared to the no-retrieval baseline. Finally, we show that relevance acts as a shared activation condition for both vulnerabilities. Similar patterns appear on frontier closed models, and harmful compliance remains elevated under several representative pipeline interventions, with some agents also entering this regime under autonomous retrieval. Because relevance is also what makes retrieval useful, these results expose a safety-utility trade-off for retrieval-enabled agents. We introduce HarmURLBench, a benchmark containing 1,405 real-world URLs paired with 320 harmful behaviors to support future evaluations. 1 Introduction Figure 1: Web retrieval with safety-oriented documents can lead to unsafe outputs in agents. Large language models (LLMs) increasingly serve as the backbone of intelligent agents ( Xi et al. 2025 ) , which perceive information, make decisions, and take actions on behalf of users. However, standalone LLMs are limited by a fixed training cutoff: they cannot access information beyond their training data, and when queried about current events or emerging facts, they may generate confident but incorrect responses rather than acknowledging uncertainty. To address this limitation, developers have built web-retrieval agents ( Nakano et al. 2021 ; Gao et al. 2023 ) , LLM-powered systems that browse, fetch, and synthesize information from external online sources in real time (Figure 1 ). These systems are now widely deployed in search assistants, research copilots, enterprise knowledge platforms, and customer support automation ( Kumar et al. 2025 ) . Contemporary alignment techniques ( Ouyang et al. 2022 ; Bai et al. 2022 ) were designed for models that generate without external information, and do not directly account for the extended decision pipeline introduced by retrieval-enabled agents ( Kumar et al. 2025 ; Zhang et al. 2025a ) . Since safety training can fail when competing objectives produce mismatched generalization ( Wei et al. 2023 ) , retrieval introduces such an objective: completing the tool-mediated pipeline before responding. This decomposes generation into four stages ( Gao et al. 2023 ; Yao et al. 2022 ) : ❶ query formulation, ❷ document retrieval, ❸ context augmentation, and ❹ response generation. Recent work shows that granting models access to web or tool-based information reduces refusal rates and increases harmful outputs even for strongly aligned models ( Kumar et al. 2025 ; Yu et al. 2025 ) . Mitigation has focused on the visible endpoints: constraining unsafe query generation at ❶ ( Zhan et al. 2025 ) or filtering outputs after ❹ response generation ( Inan et al. 2023 ) . The intermediate stages, ❷ document retrieval and ❸ context augmentation, which determine what information enters generation and how, remain less understood. We study externally specified URL retrieval , a deployment setting where the retrieval target is supplied by the user, application state, or surrounding system rather than chosen by the model. This setting covers assistants that process pasted links or attachments, copilots grounded in selected documents, enterprise RAG over pre-selected corpora, and support or developer agents grounded in fixed documentation. Fixing source selection isolates the post-selection stages of the pipeline: which document reaches the context, how it is integrated, and how the final response changes. We formalize this as AgentREVEAL ( R etrieval- E nabled V ulnerability E licitation in Al igned agents; Figure 2 ), a framework for isolating how retrieved content and its integration pathway influence safety outcomes. For the content axis, we construct HarmURLBench , pairing real-world URLs with HarmBench ( Mazeika et al. 2024 ) harmful behaviors and annotating each along two dimensions: stance (discouraging \rightarrow neutral \rightarrow instructional) and relevance to the target behavior. For the architectural axis, we vary ❸ context augmentation to change how the same document is integrated, while ❹ response generation serves as the measurement stage scored for harmful compliance. Across eight models spanning five families, we observe two systematic effects. Along the integration axis, the same retrieved content is more harmful through an agentic tool pathway than when passively inserted into the prompt; decoupling tool invocation from response generation mitigates this, consistent with temporal coupling as the primary driver of the architectural effect. Along the content axis, safety-oriented pages including warnings and risk disclaimers increase harmful compliance relative to no-retrieval baselines, a counterintuitive phenomenon we term the Safe Source Paradox . Both effects are strongest when retrieved content is topically relevant, indicating that the same property making retrieval useful is also the shared activation condition for safety degradation, with similar patterns observed on several frontier closed models. Diagnostics further confirm this is not confined to the fixed-URL setup: harmful compliance remains elevated under representative pipeline interventions (Llama-Guard input/output filtering, summarization, and chunking), and some agents also enter this regime under autonomous retrieval. Our contributions are as follows: 1. We introduce AgentREVEAL , a diagnostic framework that decomposes retrieval-induced safety failures along two axes: the architectural axis (how retrieval is integrated) and the content axis (properties of retrieved material). 2. Analysis along the architectural axis shows that agentic integration amplifies harmful compliance beyond passive context exposure. We further identify a commitment bias : coupling retrieval and response generation increases harm, while DEFER , a decoupled tool-use design, reduces this effect without compromising utility. 3. Analysis along the content axis uncovers the Safe Source Paradox : safety-oriented retrieved content increases harmful compliance by 25% on average relative to no-retrieval baselines. The relevance of the content acts as the shared activation condition that triggers both vulnerabilities. 4. We release HarmURLBench , a benchmark of 1,405 stance-stratified URLs paired with 320 harmful behaviors, enabling controlled evaluation of retrieval-induced safety degradation. 2 Related Work Retrieval Safety. Retrieval-Augmented Generation grounds language models in external knowledge ( Lewis et al. 2020 ) , but can destabilize safety: benign retrieved contexts degrade guardrails ( An et al. 2025 ; She et al. 2025 ) , while poisoned corpora can induce harmful outputs ( Zou et al. 2025 ; Deng et al. 2024 ) . Existing RAG-safety studies typically treat retrieved content as neutral context or malicious instruction, leaving untested whether oppositional sources, such as safety warnings discouraging the behavior, can still increase compliance. Agentic Tool Use. LLM tool-use frameworks ( Yao et al. 2022 ; Schick et al. 2023 ; Qin et al. 2023 ) expand model capabilities, but safety work

Read the complete text