arXiv(opens in a new tab)cs.AIOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.25827

When Retrieval Partially Conflicts with Skills: Understanding Procedural Hallucination in Language Models

Guanqun Jiang, Pengfei Cao, Kang Liu, Jun Zhao

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Language models increasingly use skills that provide reusable instructions and procedures for task execution. After a relevant skill has been selected, the model may need to apply its governing procedure together with retrieved task context. When the retrieved context is useful but contains cues that violate the skill, the model must retain compatible information while rejecting the conflicting cues. We study failures in which the model adopts such cues and produces a retrieval-supported but skill-invalid answer, which we call procedural hallucination. We introduce SOURCECLASH, a matched benchmark with 1,271 bundles and 6,355 prompts across ten procedural domains. Each bundle fixes the task, skill specification, and answer space while varying the relation between the skill and retrieval. Across nine models, valid-answer rates average 25.7% under conflicting retrieval, compared with 78.2% and 72.8% under two supportive retrieval settings. Mechanistic analysis of open-weight models shows that the answer-preference difference typically reaches its maximum shortly after generation begins. Residual replacement moves the model toward valid answers, while attention decomposition attributes most of the repair to value vectors. Intervention at the identified value pathway also improves final answer validity. These results characterize how partly conflicting retrieval changes skill-guided generation.

1 Introduction

Large language models (LLMs) increasingly operate as procedural agents: they must not only state facts, but also follow precise instructions, execute ordered procedures, and remain faithful to tool- or task-specific rules (Ouyang et al., 2022; Wei et al., 2021). In agentic and tool-using systems (Liu et al., 2024; Qin et al., 2024), reusable skills can provide

Figure

Figure 1: A selected skill requires a vegan procedure, while the retrieved context contains useful information about tiramisu together with non-vegan ingredients. The failure occurs when the model adopts the conflicting retrieved cues instead of applying the procedure specified by the skill.

task-specific instructions, procedures, scripts, and supporting resources. We study the execution stage after a relevant skill has been selected and its governing instructions are available to the model. The model must apply the selected skill while using information from a separately retrieved context.

A central challenge arises when the retrieved context is only partly compatible with the selected skill. It may provide information needed for the task while also containing cues that the skill rules out. The model must therefore use retrieval selectively. Figure 1 illustrates this setting with a vegan-cooking skill: a classic tiramisu recipe provides useful context, while its eggs and mascarpone cues must be rejected under the selected skill. We use procedural hallucination as an operational term for failures in which the model adopts such retrieved cues and produces an answer that is supported by retrieval but invalid under the skill.

This setting connects Agent Skill execution, retrieval conflict, and instruction following. Prior work often asks whether generated content is true,

  • Corresponding author.

supported by evidence, or consistent with competing factual sources (Lin et al., 2022; Li et al., 2023; Min et al., 2023; Maynez et al., 2020). In our setting, the selected skill defines the governing procedure, while the retrieved context supplies additional task information. The retrieved context can remain factually plausible and task-relevant while containing a cue that is incompatible with the skill. The model must retain compatible retrieved information and reject the conflicting cue. We therefore ask: how do skill-conflicting retrieved cues shift the model toward answers that are locally supported by retrieval but invalid under the selected skill?

To study this problem, we construct SOURCE-CLASH, a matched benchmark for skill-retrieval conflict with 1,271 bundles and 6,355 prompts across ten procedural domains. Each bundle fixes the task, skill specification, answer ontology, and diagnostic targets while varying the relation between the skill and retrieved context. Across the original seven models, valid-answer rates fall to 22.8% under CONFLICT, compared with 76.0% under SUPPORTIVE-REDUNDANT and 70.1% under SUPPORTIVE-COMPLEMENTARY. Additional evaluations on Qwen3-32B and Llama-3.1-70B-Instruct retain supportive-conflict gaps of 51.1 and 48.8 percentage points. These results show that models use compatible retrieval effectively, while conflicting cues can shift generation away from the procedure specified by the selected skill.

We further analyze how this answer shift forms inside the model. The supportive–conflict difference typically reaches its maximum during the first few generation steps. Residual replacement identifies the early answer-generation state that causally controls this difference. Attention decomposition shows that most of the repair comes from value vectors rather than attention weights. Held-out interventions further separate the value signal into the retrieved answer information and the surrounding context that affects whether this information is usable under the skill.

Our main contributions are as follows:

• We introduce SOURCECLASH, a matched benchmark for studying procedural hallucination during Agent Skill execution. The benchmark contains 1,271 bundles and 6,355 prompts across ten procedural domains.

• We show that conflicting retrieval produces a large and consistent reduction in valid answers across the original seven models and two additional large open-weight models. The effect remains under source-order and generated-prefix controls.

• We provide a causal analysis of the answer shift. The supportive–conflict difference reaches its maximum near the start of generation, is concentrated in the residual state at the selected generation step, and is carried mainly by value vectors. Intervention at the identified value pathway also improves final answer validity.

References (57)

  • Guillaume Alain and Yoshua Bengio. 2016. Understanding intermediate layers using linear classifier probes. arXiv preprint arXiv:1610.01644. (opens arXiv in a new tab)
  • Gemma 3 Technical Report
  • The Llama 3 Herd of Models
  • Weihang Su, Jianming Long, Qingyao Ai, Qiaozhi He, Yichen Tang, Changyue Wang, Yiteng Tu, Yingbo Wang, and Yiqun Liu. 2026. Skill retrieval augmentation for agentic ai. arXiv preprint arXiv:2604.24594. (opens arXiv in a new tab)
  • Llama 2: Open Foundation and Fine-Tuned Chat Models
  • Finetuned Language Models Are Zero-Shot Learners
  • Qwen3 Technical Report
  • Instruction-Following Evaluation for Large Language Models
  • Representation Engineering: A Top-Down Approach to AI Transparency
  • The benchmark studies the execution stage after a relevant skill has been selected
  • A bundle specification contains the following fields:
  • Each bundle is expanded into five source relation conditions, giving 6,355 prompts from 1,271 matched bundles
  • A language model is used only to realize these fixed records in natural language
  • These fields are used only for dataset construction, automatic evaluation, and error analysis
  • The answer space contains required atoms associated with $Y^{+}$ and forbidden atoms associated with $Y^{-}$
  • block the deployment
  • A bundle is retained only if it satisfies all of the following criteria:
  • Two annotators label the source relation and score relevance, plausibility, specificity, and actionable information on five-point scales
  • These results show that the paired contexts preserve comparable task-relevant information while changing their relation to the selected skill
  • The key point is that an answer is valid when it follows the procedure required by the skill
  • Qwen3 thinking mode is disabled
  • Let match$(a, o)$ indicate that atom $a$ is present in output $o$ after normalization
  • We lowercase text, normalize whitespace, and remove punctuation that does not affect the meaning of the atom
  • \tag {12} $$
  • Two annotators independently label each sampled output using the same criterion as the main evaluation: an answer is valid if it follows the procedure required by the skill, and invalid if it adopts retrieved information that should be rejected under the skill
  • Annotators are asked to determine whether the output satisfies the required atoms and avoids the forbidden atoms under the skill
  • It does not involve personal data, real user records, or sensitive human-subject information
  • When confidence intervals are reported, we use bootstrap resampling over bundles, keeping the five conditions from the same bundle together
  • The two runs share the same task, skill, and answer space
  • The invalid answer set $Y^{-}$ is built from the retrieval-supported invalid target and its listed acceptable verbalizations
  • For example, with several acceptable phrasings, Y contains all listed verbalizations
  • The margin gap is
  • They retain 67.3–76.4% of the corresponding free-running gaps
  • Let G denote the evaluated generation steps
  • This ensures that different interventions are compared on the same probability gap
  • The maximum rarely occurs during prompt processing
  • For each matched bundle, we run the model with supportive retrieval and with conflicting retrieval
  • The patching effect is measured as
  • For open-weight models, we install hooks on the residual stream at the selected layer and position
  • The patch is applied during the conflict run only
  • The contribution from all heads is
  • All interventions are evaluated at the same decisive step $t^{*}$ for the same example, and the score is always computed with the answer set scoring rule in Appendix D.1
  • The outputs are evaluated with the same deterministic checker as the behavioral experiments
  • Conflicting-cue adoption decreases from 126/219 to 113/219, a change of -5.94 points ([-10.50, -1.37])
  • We compute directions from three input scopes: the RAG span, the non-retrieval part of the same prompt, and the full prompt
  • Directions estimated from this scope should not be read as showing that conflict is semantically copied into every non-retrieval position
  • The first is a linear classifier concept activation vector trained with logistic regression
  • SOURCECLASH is intended for research on retrieval use, instruction following, and procedural hallucination
  • The benchmark is synthetic and does not contain personal data from real users
  • The software environment uses Python 3.10.10, PyTorch 2.0.0, and CUDA 11.7
  • Mechanistic experiments are more expensive because residual replacement, attention decomposition, and steering require repeated forward passes with activation hooks
  • Hosted model experiments were run via provider APIs in April 2026, using deterministic or, when supported, lowest-temperature decoding
  • The examples are designed as procedural decision probes, not as operational advice
  • The license will permit research use of the benchmark and require users to preserve the intended-use statement
  • Hosted model results may depend on provider-side model versions; we therefore report the model names, decoding settings, and access dates used in our experiments
  • This provides a fixed, auditable criterion across all models, together with human validation on 300 outputs
  • The interventions identify causal sites for the observed answer shift and provide a basis for studying training- or inference-time methods that improve selective retrieval use